Skip to main content
GET
/
api
/
mcp-logs
Get MCP tool logs
curl --request GET \
  --url http://localhost:8080/api/mcp-logs
{
  "logs": [
    {
      "id": "<string>",
      "llm_request_id": "<string>",
      "timestamp": "2023-11-07T05:31:56Z",
      "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": 123,
        "error": {
          "type": "<string>",
          "code": "<string>",
          "message": "<string>",
          "param": "<string>",
          "event_id": "<string>"
        },
        "extra_fields": {
          "provider": "openai",
          "model_requested": "<string>",
          "request_type": "<string>"
        }
      },
      "latency": 123,
      "cost": 123,
      "status": "processing",
      "metadata": {},
      "created_at": "2023-11-07T05:31:56Z",
      "virtual_key": {}
    }
  ],
  "pagination": {
    "total_count": 123,
    "limit": 123,
    "offset": 123,
    "sort_by": "<string>",
    "order": "<string>"
  },
  "stats": {
    "total_executions": 123,
    "success_rate": 123,
    "average_latency": 123,
    "total_cost": 123
  },
  "has_logs": true
}

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
enum<string>

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

Available options:
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<date-time>

Start time filter (RFC3339 format)

end_time
string<date-time>

End time filter (RFC3339 format)

min_latency
number

Minimum latency filter (milliseconds)

max_latency
number

Maximum latency filter (milliseconds)

Search in tool arguments and results

limit
integer
default:50

Number of logs to return (default 50, max 1000)

Required range: x <= 1000
offset
integer
default:0

Number of logs to skip

sort_by
enum<string>
default:timestamp

Field to sort by

Available options:
timestamp,
latency,
cost
order
enum<string>
default:desc

Sort order

Available options:
asc,
desc

Response

Successful response

Search MCP logs response

logs
object[]
pagination
object
stats
object

MCP tool log statistics

has_logs
boolean

Whether any logs exist in the system