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
| Name | Required | Description | Default |
|---|---|---|---|
| lines | No | Number of error lines to return (default: 20) |
Implementation Reference
- local-logs-mcp-server.js:330-336 (handler)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' }; }
- local-logs-mcp-server.js:125-139 (registration)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: [] } },
- local-logs-mcp-server.js:219-221 (registration)Dispatch logic in handleToolCall that routes 'get_errors' tool calls to the getErrors handler method.case 'get_errors': result = this.getErrors(args?.lines); break;
- local-logs-mcp-server.js:128-138 (schema)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: [] }