MCP Gateway
ApiSdk proxy

Sdk Execute Tool

Execute a tool via the SDK. Validates that the requested tool is in the scoped token's ``allowed_tools`` list (stored in ``api_key.scopes``), resolves the prefixed name to a server + tool, and delegates to the shared ``execute_tool`` function.

POST
/api/v1/sdk/tools/execute

Authorization

User API Key
AuthorizationBearer <token>

User API key (mgw_usr_live_* or mgw_usr_test_*)

In: header

access_token?|

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

curl -X POST "https://loading/api/v1/sdk/tools/execute" \  -H "Content-Type: application/json" \  -d '{    "tool_name": "string"  }'
{
  "result": null,
  "tool_name": "string",
  "duration_ms": 0,
  "error": "string"
}
{
  "detail": [
    {
      "loc": [
        "string"
      ],
      "msg": "string",
      "type": "string",
      "input": null,
      "ctx": {}
    }
  ]
}