Skip to main content
POST
Attach a tool to an agent

Authorizations

Authorization
string
header
required

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

agentId
string
required
Maximum string length: 64

Body

application/json
type
enum<string>
required
Available options:
file_search,
mcp,
function
Maximum string length: 64
name
string
Maximum string length: 128
Pattern: ^[a-zA-Z0-9_-]+$
display_name
string
Maximum string length: 256
description
string
Maximum string length: 4096
catalog_id
string
Maximum string length: 128
auth
object
icon_url
string
Maximum string length: 2048
vector_store_id
string

Required for file_search.

Maximum string length: 128
server
string

MCP server URL (for mcp).

Maximum string length: 2048
headers
object
scope
string
Maximum string length: 256
url
string

Required for function.

Maximum string length: 2048
parameters
object

JSON 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).

id
string
type
enum<string>
Available options:
file_search,
mcp,
function
name
string
Pattern: ^[a-zA-Z0-9_-]+$
display_name
string
description
string
catalog_id
string
auth
object
icon_url
string
vector_store_id
string

Required for file_search.

server
string

MCP server URL (for mcp).

headers
object
scope
string
url
string

Required for function.

parameters
object

JSON Schema describing the function tool's parameters.