Skip to main content
POST
/
v1
/
toolkits
/
{toolkit_id}
/
tools
/
{tool_id}
Invoke Toolkit Tool
curl --request POST \
  --url https://api.xpander.ai/v1/toolkits/{toolkit_id}/tools/{tool_id} \
  --header 'Content-Type: application/json' \
  --header 'x-api-key: <api-key>' \
  --data '
{
  "body_params": {},
  "query_params": {},
  "path_params": {},
  "headers": {}
}
'
{
  "detail": [
    {
      "loc": [
        "<string>"
      ],
      "msg": "<string>",
      "type": "<string>"
    }
  ]
}
Execute a specific tool within a toolkit with provided parameters. This allows direct tool invocation outside of agent execution.

Path Parameters

toolkit_id
string
required
Unique identifier of the toolkit (UUID format)
tool_id
string
required
Identifier of the specific tool to invoke

Request Body

parameters
object
required
Tool-specific parameters matching the tool’s schema from [Get Toolkit Tools](/API reference/v1/toolkits/get-toolkit-tools)

Response

result
object
The tool execution result (format varies by tool)
status
string
Execution status: success, error
execution_time
number
Tool execution time in seconds

Notes

  • This endpoint requires custom toolkits to be configured
  • Tool parameters must match the schema from [Get Toolkit Tools](/API reference/v1/toolkits/get-toolkit-tools)
  • Built-in tools are invoked automatically by agents and don’t require this endpoint
  • Currently, custom toolkits must be configured through the web dashboard

Example Request

curl -X POST -H "x-api-key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  https://api.xpander.ai/v1/toolkits/{toolkit_id}/tools/{tool_id} \
  -d '{
    "parameters": {
      "query": "AI agent frameworks",
      "max_results": 5
    }
  }'

Example Response

{
  "result": {
    "data": [
      {
        "title": "Top AI Agent Frameworks",
        "url": "https://example.com/article",
        "snippet": "Comprehensive guide to AI agent frameworks..."
      }
    ]
  },
  "status": "success",
  "execution_time": 1.23
}

Authorizations

x-api-key
string
header
required

API Key for authentication

Path Parameters

toolkit_id
string
required
tool_id
string
required

Body

application/json
body_params
Body Params · object
query_params
Query Params · object
path_params
Path Params · object
headers
Headers · object

Response

Successful Response