analyze_perf
Analyze per-tool latency metrics (p50, p95, max, count, error rate) to identify the slowest tools. Supports session or persistent time windows (1h/24h/7d/all). Returns JSON, Markdown, or TOON.
Instructions
Per-tool latency telemetry: p50/p95/max, count, error_rate. Default reads the current session ring; window=1h|24h|7d|all reads from ~/.trace-mcp/telemetry.db (requires telemetry.enabled in config). Sorted by p95 descending so the slowest tools surface first. Read-only. Returns JSON: { tools: [{ tool, p50, p95, max, count, errors, error_rate }], total_tools, source }. Set output_format: "toon" for lossless TOON encoding — cheaper LLM tokens on tabular payloads.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| top | No | Cap on number of tools returned (default 20) | |
| tool | Yes | Filter to a single tool by name | |
| window | No | Time window. "session" (default) uses the in-memory ring. "1h"/"24h"/"7d"/"all" read from the persistent telemetry DB. | |
| output_format | No | Output format. "json" (default) returns JSON, "markdown" returns LLM-friendly fenced markdown (tool-specific), "toon" returns Token-Oriented Object Notation — 30-60% fewer tokens on tabular data, fully lossless. |