Skip to main content
Glama
mariosss

Local Logs MCP Server

by mariosss

get_errors

Retrieve recent error log entries from local application logs to identify and debug issues in Node.js applications, web servers, or other logging systems.

Instructions

Get recent error log entries

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
linesNoNumber of error lines to return (default: 20)

Implementation Reference

  • The handler function for the 'get_errors' tool. It calls tailLog on 'error.log' with the specified number of lines and customizes the response message.
    getErrors(lines = 20) {
      const result = this.tailLog('error.log', lines);
      return {
        ...result,
        message: result.content ? `Found ${result.lines} error entries` : 'No errors found'
      };
    }
  • Registration of the 'get_errors' tool in the tools/list response, including its description and input schema.
    {
      name: 'get_errors',
      description: 'Get recent error log entries',
      inputSchema: {
        type: 'object',
        properties: {
          lines: {
            type: 'number',
            description: 'Number of error lines to return (default: 20)',
            default: 20
          }
        },
        required: []
      }
    },
  • Dispatch logic in handleToolCall that routes 'get_errors' tool calls to the getErrors handler method.
    case 'get_errors':
      result = this.getErrors(args?.lines);
      break;
  • Input schema definition for the 'get_errors' tool, specifying the optional 'lines' parameter.
    inputSchema: {
      type: 'object',
      properties: {
        lines: {
          type: 'number',
          description: 'Number of error lines to return (default: 20)',
          default: 20
        }
      },
      required: []
    }
Behavior2/5

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

No annotations are provided, so the description carries the full burden of behavioral disclosure. It states the tool retrieves 'recent error log entries', implying a read-only operation, but doesn't clarify aspects like rate limits, authentication needs, or whether it accesses live or archived logs. This leaves significant gaps in understanding the tool's behavior.

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

Conciseness5/5

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

The description is a single, efficient sentence with zero waste—'Get recent error log entries'—front-loading the core purpose without unnecessary details. It's appropriately sized for a simple tool with one optional parameter.

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

Completeness2/5

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

Given the lack of annotations and output schema, the description is incomplete for a log retrieval tool. It doesn't explain the return format (e.g., structured data vs. raw text), error handling, or how 'recent' is defined, which are critical for an agent to use it effectively in context with sibling tools.

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

Parameters3/5

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

The input schema has 100% description coverage, with the 'lines' parameter clearly documented in the schema itself. The description adds no additional meaning beyond what the schema provides, such as explaining what 'recent' means or how entries are ordered. Baseline 3 is appropriate since the schema does the heavy lifting.

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

Purpose4/5

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

The description clearly states the tool's purpose with a specific verb ('Get') and resource ('recent error log entries'), making it immediately understandable. However, it doesn't differentiate from sibling tools like 'get_log_files' or 'search_logs', which likely access similar log data, so it doesn't fully distinguish its specific scope.

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

Usage Guidelines2/5

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

The description provides no guidance on when to use this tool versus alternatives like 'get_log_files' or 'search_logs'. It lacks context about prerequisites, such as whether it requires specific permissions or if it's intended for real-time monitoring versus historical analysis, leaving the agent to guess based on tool names alone.

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/mariosss/local-logs-mcp-server'

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