Skip to main content
Glama
T1nker-1220

Knowledge Graph Memory Server

find_similar_errors

Identify and resolve recurring errors by analyzing past issues stored in a knowledge graph. Input error details to receive similar errors and their proven solutions.

Instructions

Find similar errors and their solutions in the knowledge graph

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
errorPatternYes

Implementation Reference

  • Core handler function in KnowledgeGraphManager that filters lesson entities from the graph matching the input errorPattern by type equality, message substring match (case-insensitive), or exact context match, then sorts by descending successRate.
    async findSimilarErrors(errorPattern: ErrorPattern): Promise<LessonEntity[]> { const graph = await this.loadGraph(); return graph.entities .filter((e): e is LessonEntity => { if (e.entityType !== 'lesson') return false; const lessonEntity = e as Partial<LessonEntity>; return ( lessonEntity.errorPattern !== undefined && ( lessonEntity.errorPattern.type === errorPattern.type || lessonEntity.errorPattern.message.toLowerCase().includes(errorPattern.message.toLowerCase()) || lessonEntity.errorPattern.context === errorPattern.context ) ); }) .sort((a, b) => (b.metadata?.successRate ?? 0) - (a.metadata?.successRate ?? 0)); }
  • index.ts:1166-1184 (registration)
    Tool registration in the ListToolsRequestSchema response, including name, description, and input schema definition.
    { name: "find_similar_errors", description: "Find similar errors and their solutions in the knowledge graph", inputSchema: { type: "object", properties: { errorPattern: { type: "object", properties: { type: { type: "string", description: "Category of the error" }, message: { type: "string", description: "The error message" }, context: { type: "string", description: "Where the error occurred" } }, required: ["type", "message", "context"] } }, required: ["errorPattern"] } },
  • Dispatcher in CallToolRequestSchema handler that invokes the KnowledgeGraphManager.findSimilarErrors method with tool arguments and formats the response.
    case "find_similar_errors": return { content: [{ type: "text", text: JSON.stringify(await knowledgeGraphManager.findSimilarErrors(args.errorPattern as ErrorPattern), null, 2) }] };
  • JSON Schema defining the input parameters for the find_similar_errors tool: an errorPattern object with type, message, and context fields.
    inputSchema: { type: "object", properties: { errorPattern: { type: "object", properties: { type: { type: "string", description: "Category of the error" }, message: { type: "string", description: "The error message" }, context: { type: "string", description: "Where the error occurred" } }, required: ["type", "message", "context"] } }, required: ["errorPattern"] }

Other Tools

Related 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/T1nker-1220/memories-with-lessons-mcp-server'

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