Run a tool
curl --request POST \
--url https://api.altrum.ai/v1/mcp/tool/execute \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"id": "call_123",
"type": "function",
"function": {
"name": "tickets-search",
"arguments": "{\"query\":\"refund\"}"
}
}
'import requests
url = "https://api.altrum.ai/v1/mcp/tool/execute"
payload = {
"id": "call_123",
"type": "function",
"function": {
"name": "tickets-search",
"arguments": "{\"query\":\"refund\"}"
}
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
id: 'call_123',
type: 'function',
function: {name: 'tickets-search', arguments: '{"query":"refund"}'}
})
};
fetch('https://api.altrum.ai/v1/mcp/tool/execute', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"role": "tool",
"tool_call_id": "call_123",
"content": "3 tickets found."
}{
"type": "budget_exceeded",
"is_gateway_error": true,
"status_code": 402,
"error": {
"type": "budget_exceeded",
"code": "budget_exceeded",
"message": "Budget exceeded: ..."
},
"request_id": "4f9c..."
}{
"type": "budget_exceeded",
"is_gateway_error": true,
"status_code": 402,
"error": {
"type": "budget_exceeded",
"code": "budget_exceeded",
"message": "Budget exceeded: ..."
},
"request_id": "4f9c..."
}{
"type": "budget_exceeded",
"is_gateway_error": true,
"status_code": 402,
"error": {
"type": "budget_exceeded",
"code": "budget_exceeded",
"message": "Budget exceeded: ..."
},
"request_id": "4f9c..."
}{
"type": "budget_exceeded",
"is_gateway_error": true,
"status_code": 402,
"error": {
"type": "budget_exceeded",
"code": "budget_exceeded",
"message": "Budget exceeded: ..."
},
"request_id": "4f9c..."
}MCP
Run a tool
Runs one tool call the model asked for and returns the tool’s result, ready to send back to the model. Your guardrails check the arguments before the tool runs and the result before it returns.
POST
/
v1
/
mcp
/
tool
/
execute
Run a tool
curl --request POST \
--url https://api.altrum.ai/v1/mcp/tool/execute \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"id": "call_123",
"type": "function",
"function": {
"name": "tickets-search",
"arguments": "{\"query\":\"refund\"}"
}
}
'import requests
url = "https://api.altrum.ai/v1/mcp/tool/execute"
payload = {
"id": "call_123",
"type": "function",
"function": {
"name": "tickets-search",
"arguments": "{\"query\":\"refund\"}"
}
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
id: 'call_123',
type: 'function',
function: {name: 'tickets-search', arguments: '{"query":"refund"}'}
})
};
fetch('https://api.altrum.ai/v1/mcp/tool/execute', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"role": "tool",
"tool_call_id": "call_123",
"content": "3 tickets found."
}{
"type": "budget_exceeded",
"is_gateway_error": true,
"status_code": 402,
"error": {
"type": "budget_exceeded",
"code": "budget_exceeded",
"message": "Budget exceeded: ..."
},
"request_id": "4f9c..."
}{
"type": "budget_exceeded",
"is_gateway_error": true,
"status_code": 402,
"error": {
"type": "budget_exceeded",
"code": "budget_exceeded",
"message": "Budget exceeded: ..."
},
"request_id": "4f9c..."
}{
"type": "budget_exceeded",
"is_gateway_error": true,
"status_code": 402,
"error": {
"type": "budget_exceeded",
"code": "budget_exceeded",
"message": "Budget exceeded: ..."
},
"request_id": "4f9c..."
}{
"type": "budget_exceeded",
"is_gateway_error": true,
"status_code": 402,
"error": {
"type": "budget_exceeded",
"code": "budget_exceeded",
"message": "Budget exceeded: ..."
},
"request_id": "4f9c..."
}Authorizations
bearerapiKeygoogleApiKeyaltrumKey
Headers
Query Parameters
Body
application/json
With format=chat, the tool call from the assistant message (id, type, function.name, function.arguments). With format=responses, the Responses function call item (call_id, name, arguments).
Response
The tool message.
The response is of type object.