Skip to main content
Glama
purelledhand

MCP Error Relay

by purelledhand

get_recent_errors

Read-onlyIdempotent

Retrieve recent error logs from MCP servers to diagnose the root cause of failed tool calls, preventing blind retries and saving tokens.

Instructions

Get Recent MCP Server Errors

⚠️ CALL THIS IMMEDIATELY when ANY MCP tool fails with vague/unclear error messages!

TRIGGER CONDITIONS - Call this tool when you see:

  • "Error:", "Failed:", "Exception:", "Error occurred"

  • "Permission denied", "Unauthorized", "Forbidden", "Access denied"

  • "Rate limit", "Too many requests", "429"

  • "Timeout", "Timed out", "Connection refused"

  • "Not found", "404", "Invalid", "Malformed"

  • "Network error", "ECONNREFUSED", "ETIMEDOUT"

  • ANY vague error that doesn't explain the root cause

  • BEFORE attempting to retry any failed operation

WHY USE THIS: ❌ Without logs: Blind retry -> fail -> retry -> fail -> retry (wastes 50-200+ tokens) ✅ With logs: Check logs once (10 tokens) -> see real error -> fix immediately

TOKEN ECONOMICS:

  • Cost of checking logs: ~10-20 tokens

  • Cost of 3-4 blind retries: 50-200 tokens

  • ROI: 5-20x token savings per error

WORKFLOW:

  1. MCP tool fails with unclear error

  2. IMMEDIATELY call this tool with server_name

  3. Read the detailed error logs

  4. Identify root cause (permissions? rate limit? invalid input?)

  5. Take correct action (don't retry blindly!)

Args:

  • server_name (string): Name of the MCP server (e.g., 'slack-mcp-server', 'github_mcp')

  • limit (number): Maximum number of errors to return, 1-100 (default: 10)

  • tool_name (string, optional): Filter by specific tool name

  • hours (number, optional): Only show errors from last N hours, 1-168

  • response_format ('markdown' | 'json'): Output format (default: 'markdown')

Returns: For Markdown format: Human-readable error log with timestamps and messages For JSON format: Structured data with schema: { "total": number, // Number of errors found "errors": [ { "timestamp": string, // ISO 8601 timestamp "level": string, // Log level (ERROR) "server_name": string, // MCP server name "tool_name": string, // Tool that caused the error (optional) "message": string, // Error message "error_code": string, // Error code if available (optional) "stack_trace": string, // Stack trace if available (optional) "request_id": string // Request ID for tracing (optional) } ] }

Examples:

  • Slack tool failed -> IMMEDIATELY: { server_name: "slack-mcp-server", limit: 5 }

  • GitHub API error -> BEFORE RETRY: { server_name: "github_mcp", hours: 1 }

  • Repeated failures -> { server_name: "jira-mcp-server", tool_name: "create_issue" }

Error Handling:

  • Returns error if server_name not found. Use list_servers to see available servers.

  • Returns "No errors found" if the log database has no error entries matching the criteria.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
hoursNoOptional: Only return errors from the last N hours
limitNoMaximum number of error entries to return (default: 10)
tool_nameNoOptional: Filter errors by specific tool name
server_nameYesName of the MCP server to query logs from (e.g., 'slack-mcp-server', 'github_mcp')
response_formatNoOutput format: 'markdown' for human-readable or 'json' for machine-readablemarkdown
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already declare readOnlyHint=true, idempotentHint=true, and destructiveHint=false. The description adds substantial context beyond that: return formats (markdown/json), token economics, error handling ('returns error if server_name not found'), and a full JSON response schema. This fully discloses behavior.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is well-structured with clear sections (trigger conditions, why use, token economics, workflow, args, returns, examples, error handling), but it is excessively long. The persuasion and token-economics sections, while informative, could be condensed. Not every sentence earns its place.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Despite having no output schema, the description itself provides a full JSON response schema, detailed parameter explanations, error handling behavior, and multiple examples. It is exceptionally complete for selecting and invoking the tool correctly.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so the schema already documents each parameter. The description adds value through concrete examples ('Slack tool failed -> IMMEDIATELY: { server_name: "slack-mcp-server", limit: 5 }') and contextual usage ('Repeated failures -> { server_name, tool_name }'), elevating the semantics beyond simple field descriptions.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool retrieves recent MCP server errors, with a specific verb ('Get'), resource ('Recent MCP Server Errors'), and scope ('from a specific server'). It distinguishes itself from siblings by focusing on error logs rather than details or server lists.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides extremely explicit trigger conditions and workflow instructions ('CALL THIS IMMEDIATELY when ANY MCP tool fails with vague/unclear error messages', 'BEFORE attempting to retry any failed operation'). However, it does not explicitly contrast with sibling tools (get_error_details, get_server_list) or state when NOT to use this tool, so it falls short of the highest bar.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/purelledhand/mcp-error-relay'

If you have feedback or need assistance with the MCP directory API, please join our Discord server