Skip to content

Available MCP Tools

MiniAPM exposes four tools via MCP for querying your application data.

List recent errors with optional filtering.

ParameterTypeRequiredDescription
limitintegerNoMaximum errors to return (default: 10)
statusstringNoFilter by status: open, resolved, ignored
sincestringNoISO 8601 timestamp for time range start
{
"name": "list_errors",
"arguments": {
"limit": 5,
"status": "open"
}
}
Recent Errors (5 open):
1. RuntimeError: Connection timeout
- First seen: 2024-01-15 10:30:00
- Last seen: 2024-01-15 14:45:00
- Occurrences: 23
- Fingerprint: abc123
2. ActiveRecord::RecordNotFound: User not found
- First seen: 2024-01-15 09:00:00
- Last seen: 2024-01-15 14:30:00
- Occurrences: 8
- Fingerprint: def456

Get full details about a specific error, including stack trace and context.

ParameterTypeRequiredDescription
fingerprintstringYesError fingerprint from list_errors
include_occurrencesbooleanNoInclude recent occurrences (default: true)
{
"name": "error_details",
"arguments": {
"fingerprint": "abc123"
}
}
Error: RuntimeError - Connection timeout
Status: open
First seen: 2024-01-15 10:30:00
Last seen: 2024-01-15 14:45:00
Total occurrences: 23
Stack Trace:
app/services/external_api.rb:42 in `fetch_data`
app/controllers/reports_controller.rb:15 in `show`
lib/middleware/timeout.rb:10 in `call`
Context:
user_id: 123
request_id: req_abc123
endpoint: /api/reports/monthly
Recent Occurrences:
- 2024-01-15 14:45:00 (user_id: 456)
- 2024-01-15 14:30:00 (user_id: 123)
- 2024-01-15 14:15:00 (user_id: 789)

Find the slowest routes by P95 latency.

ParameterTypeRequiredDescription
limitintegerNoMaximum routes to return (default: 10)
min_requestsintegerNoMinimum request count to include (default: 10)
periodstringNoTime period: 1h, 24h, 7d (default: 24h)
{
"name": "slow_routes",
"arguments": {
"limit": 5,
"period": "24h"
}
}
Slowest Routes (24h):
1. POST /api/reports/generate
- P50: 1,200ms | P95: 3,400ms | P99: 5,200ms
- Requests: 456 | Errors: 12 (2.6%)
- Avg DB time: 890ms (74%)
2. GET /api/users/:id/history
- P50: 450ms | P95: 1,100ms | P99: 1,800ms
- Requests: 2,345 | Errors: 5 (0.2%)
- Avg DB time: 320ms (71%)
3. GET /api/search
- P50: 280ms | P95: 890ms | P99: 1,200ms
- Requests: 8,901 | Errors: 23 (0.3%)
- Avg DB time: 180ms (64%)

Get an overview of system health and recent activity.

ParameterTypeRequiredDescription
periodstringNoTime period: 1h, 24h, 7d (default: 24h)
{
"name": "system_status",
"arguments": {
"period": "24h"
}
}
System Status (last 24 hours):
Requests:
- Total: 45,678
- Avg response time: 125ms
- Error rate: 0.8%
Errors:
- Total occurrences: 365
- Unique errors: 12
- Open: 8 | Resolved: 3 | Ignored: 1
Top Error:
RuntimeError: Connection timeout (156 occurrences)
Performance:
- Slowest route: POST /api/reports (3.4s P95)
- Most requests: GET /api/health (12,345)
Recent Deploys:
- v1.2.3 (2024-01-15 10:00) by github-actions

When interacting with Claude, you can ask natural language questions:

“What errors are happening?” → Claude calls list_errors

“Tell me more about the timeout error” → Claude calls error_details with the fingerprint

“Which endpoints are slow?” → Claude calls slow_routes

“How’s the system doing?” → Claude calls system_status

Claude can chain multiple tools together:

“Find the slowest route and check if it has errors”

  1. Claude calls slow_routes to find slow endpoints
  2. Claude calls list_errors filtered by that route
  3. Claude synthesizes the information for you

You can ask Claude to perform analysis:

“Compare error rates before and after the last deploy”

Claude will:

  1. Call system_status to find recent deploys
  2. Query error data for time periods before/after
  3. Provide a comparison summary