Logging

Get top MCP tools by call count

Returns the top 10 MCP tools by call count, with cost totals.

GET
/api/mcp-logs/histogram/top-tools
AuthorizationBearer <token>

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

tool_names?string

Comma-separated list of tool names to filter by

server_labels?string

Comma-separated list of server labels to filter by

status?string

Comma-separated list of statuses to filter by (processing, success, error)

virtual_key_ids?string

Comma-separated list of virtual key IDs to filter by

llm_request_ids?string

Comma-separated list of LLM request IDs to filter by

start_time?string

Start time filter (RFC3339 format)

Formatdate-time
end_time?string

End time filter (RFC3339 format)

Formatdate-time
min_latency?number

Minimum latency filter (milliseconds)

max_latency?number

Maximum latency filter (milliseconds)

content_search?string

Search in tool arguments and results

Response Body

curl -X GET "https://loading/{AI_GATEWAY_URL}/api/mcp-logs/histogram/top-tools?tool_names=string&server_labels=string&status=string&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"
{
  "tools": [
    {
      "tool_name": "string",
      "count": 0,
      "cost": 0
    }
  ]
}
{
  "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"
  }
}
On this page

On this page

No Headings