POST
/
mcp-server
/
call-tool
curl --request POST \
  --url https://api.klavis.ai/mcp-server/call-tool \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "serverUrl": "<string>",
  "toolName": "<string>",
  "toolArgs": {}
}'
{
  "success": true,
  "result": "<any>",
  "error": "<string>"
}

Authorizations

Authorization
string
header
required

Enter your API key with the format: 'Bearer your-api-key'

Body

application/json
serverUrl
string
required

The full URL for connecting to the MCP server via Server-Sent Events (SSE)

toolName
string
required

The name of the tool to call

toolArgs
object

The input parameters for the tool

Response

200
application/json
Successful Response
success
boolean
required

Whether the tool call was successful

result
any | null

The result of the tool call, if successful

error
string | null

Error message, if the tool call failed