Skip to content

Per-tool error rate + P50/P95 latency (MTP-05)

GET
/api/v1/mcp-tools/metrics
curl --request GET \
--url 'https://api.ultimateteam.ai/api/v1/mcp-tools/metrics?window_hours=24' \
--header 'X-API-Key: <X-API-Key>'

Return per-tool rollup for the last window_hours hours.

Tools with error_rate > 0.05 are flagged with alert=True so the frontend can apply red-badge styling without recomputing the threshold.

window_hours
Window Hours
integer
default: 24 >= 1 <= 168

Successful Response

Media typeapplication/json
MCPToolMetricsResponse

Response body for GET /api/v1/mcp-tools/metrics.

object
generated_at
required
Generated At
string format: date-time
tools
Tools
Array<object>
MCPToolMetric

Per-tool rollup entry within :class:MCPToolMetricsResponse.

object
alert
Alert
boolean
calls_total
required
Calls Total
integer
error_rate
required
Error Rate
number
errors_total
required
Errors Total
integer
p50_latency_ms
required
P50 Latency Ms
integer
p95_latency_ms
required
P95 Latency Ms
integer
tool_name
required
Tool Name
string
window_hours
required
Window Hours
integer
Example
{
"tools": [
{
"alert": false
}
]
}

Validation Error

Media typeapplication/json
HTTPValidationError
object
detail
Detail
Array<object>
ValidationError
object
ctx
Context
object
input
Input
loc
required
Location
Array
msg
required
Message
string
type
required
Error Type
string
Examplegenerated
{
"detail": [
{
"ctx": {},
"input": "example",
"loc": [
"example"
],
"msg": "example",
"type": "example"
}
]
}