Attach a tool to an agent
Adds a tool to the agent’s tools[]. type MUST be one of
file_search, mcp, or function. The tool name must match
^[a-zA-Z0-9_-]+$ (OpenAI tool-name constraint). When the
agent is published, has_draft_changes is set to true.
Authorizations
User-bound credential carrying an identity: either a session JWT
or a user access token (at:*) generated from the user settings UI.
Send as Authorization: Bearer <token>.
Org API keys (iak_*) are not accepted here - they carry
no user identity. Use the x-prismeai-api-key header instead
(see OrgApiKeyAuth).
Path Parameters
64Body
file_search, mcp, function 64128^[a-zA-Z0-9_-]+$25640961282048Required for file_search.
128MCP server URL (for mcp).
2048256Required for function.
2048JSON Schema describing the function tool's parameters.
Response
Tool added.
Tool entry attached to an agent. Discriminated by type -
file_search (requires vector_store_id), mcp (uses server,
headers, scope), or function (uses url, parameters,
headers).
file_search, mcp, function ^[a-zA-Z0-9_-]+$Required for file_search.
MCP server URL (for mcp).
Required for function.
JSON Schema describing the function tool's parameters.