MCP Tool Calls
Execute MCP tools through the governed runtime.
POST /runtime/mcp/call evaluates policies, then invokes tools/call on the registered MCP server. Tool arguments must be a JSON object.
bash
curl -X POST https://app.korclaw.com/api/v1/runtime/mcp/call \
-H "Authorization: Bearer kc_live_your_api_key_here" \
-H "Content-Type: application/json" \
-d '{
"server": "analytics",
"tool": "search_documents",
"arguments": { "query": "Q3 revenue" },
"input": {
"action": "search",
"tool": "search_documents",
"agent": "research-agent",
"resource": "documents"
}
}'Response
{
"data": {
"allowed": true,
"result": "allowed",
"server": "analytics",
"tool": "search_documents",
"execution": {
"content": [{ "type": "text", "text": "Found 3 documents." }],
"isError": false
}
}
}Via runtime/execute
MCP tool calls can also be made through POST /runtime/execute with mode: mcp_proxy, specifying server and tool in the execution block.
json
{
"input": { "action": "search", "agent": "research-agent", "tool": "search_documents" },
"execution": {
"mode": "mcp_proxy",
"server": "analytics",
"tool": "search_documents",
"arguments": { "query": "Q3 revenue" }
}
}