Available MCP Tools
MiniAPM exposes four tools via MCP for querying your application data.
list_errors
Section titled “list_errors”List recent errors with optional filtering.
Parameters
Section titled “Parameters”| Parameter | Type | Required | Description |
|---|---|---|---|
limit | integer | No | Maximum errors to return (default: 10) |
status | string | No | Filter by status: open, resolved, ignored |
since | string | No | ISO 8601 timestamp for time range start |
Example
Section titled “Example”{ "name": "list_errors", "arguments": { "limit": 5, "status": "open" }}Response
Section titled “Response”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: def456error_details
Section titled “error_details”Get full details about a specific error, including stack trace and context.
Parameters
Section titled “Parameters”| Parameter | Type | Required | Description |
|---|---|---|---|
fingerprint | string | Yes | Error fingerprint from list_errors |
include_occurrences | boolean | No | Include recent occurrences (default: true) |
Example
Section titled “Example”{ "name": "error_details", "arguments": { "fingerprint": "abc123" }}Response
Section titled “Response”Error: RuntimeError - Connection timeout
Status: openFirst seen: 2024-01-15 10:30:00Last seen: 2024-01-15 14:45:00Total 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)slow_routes
Section titled “slow_routes”Find the slowest routes by P95 latency.
Parameters
Section titled “Parameters”| Parameter | Type | Required | Description |
|---|---|---|---|
limit | integer | No | Maximum routes to return (default: 10) |
min_requests | integer | No | Minimum request count to include (default: 10) |
period | string | No | Time period: 1h, 24h, 7d (default: 24h) |
Example
Section titled “Example”{ "name": "slow_routes", "arguments": { "limit": 5, "period": "24h" }}Response
Section titled “Response”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%)system_status
Section titled “system_status”Get an overview of system health and recent activity.
Parameters
Section titled “Parameters”| Parameter | Type | Required | Description |
|---|---|---|---|
period | string | No | Time period: 1h, 24h, 7d (default: 24h) |
Example
Section titled “Example”{ "name": "system_status", "arguments": { "period": "24h" }}Response
Section titled “Response”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-actionsUsing Tools in Conversations
Section titled “Using Tools in Conversations”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
Tool Chaining
Section titled “Tool Chaining”Claude can chain multiple tools together:
“Find the slowest route and check if it has errors”
- Claude calls
slow_routesto find slow endpoints - Claude calls
list_errorsfiltered by that route - Claude synthesizes the information for you
Custom Workflows
Section titled “Custom Workflows”You can ask Claude to perform analysis:
“Compare error rates before and after the last deploy”
Claude will:
- Call
system_statusto find recent deploys - Query error data for time periods before/after
- Provide a comparison summary