Get MCP tool logs
Retrieves MCP tool execution logs with filtering, search, and pagination via query parameters.
Bearer token authentication. Use your MPilot virtual-key JWT or admin JWT.
Virtual keys (prefixed with sk-bf-) can also be passed here.
In: header
Query Parameters
Comma-separated list of tool names to filter by
Comma-separated list of server labels to filter by
Comma-separated list of statuses to filter by (processing, success, error)
"processing" | "success" | "error"Comma-separated list of virtual key IDs to filter by
Comma-separated list of LLM request IDs to filter by
Start time filter (RFC3339 format)
date-timeEnd time filter (RFC3339 format)
date-timeMinimum latency filter (milliseconds)
Maximum latency filter (milliseconds)
Search in tool arguments and results
Number of logs to return (default 50, max 1000)
50value <= 1000Number of logs to skip
0Field to sort by
"timestamp""timestamp" | "latency" | "cost"Sort order
"desc""asc" | "desc"Response Body
curl -X GET "https://loading/{AI_GATEWAY_URL}/api/mcp-logs?tool_names=string&server_labels=string&status=processing&virtual_key_ids=string&llm_request_ids=string&start_time=2019-08-24T14%3A15%3A22Z&end_time=2019-08-24T14%3A15%3A22Z&min_latency=0&max_latency=0&content_search=string&limit=50&offset=0&sort_by=timestamp&order=asc"{
"logs": [
{
"id": "string",
"llm_request_id": "string",
"timestamp": "2019-08-24T14:15:22Z",
"tool_name": "string",
"server_label": "string",
"virtual_key_id": "string",
"virtual_key_name": "string",
"arguments": {},
"result": {},
"error_details": {
"event_id": "string",
"type": "string",
"is_bifrost_error": true,
"status_code": 0,
"error": {
"type": "string",
"code": "string",
"message": "string",
"param": "string",
"event_id": "string"
},
"extra_fields": {
"provider": "openai",
"model_requested": "string",
"request_type": "string"
}
},
"latency": 0,
"cost": 0,
"status": "processing",
"metadata": {},
"created_at": "2019-08-24T14:15:22Z",
"virtual_key": {}
}
],
"pagination": {
"limit": 0,
"offset": 0,
"sort_by": "string",
"order": "string",
"total_count": 0
},
"has_logs": true
}{
"event_id": "string",
"type": "string",
"is_bifrost_error": true,
"status_code": 0,
"error": {
"type": "string",
"code": "string",
"message": "string",
"param": "string",
"event_id": "string"
},
"extra_fields": {
"provider": "openai",
"model_requested": "string",
"request_type": "string"
}
}{
"event_id": "string",
"type": "string",
"is_bifrost_error": true,
"status_code": 0,
"error": {
"type": "string",
"code": "string",
"message": "string",
"param": "string",
"event_id": "string"
},
"extra_fields": {
"provider": "openai",
"model_requested": "string",
"request_type": "string"
}
}