Skip to main content
Glama
T1nker-1220

Knowledge Graph Memory Server

find_similar_errors

Locate similar errors and their solutions in the knowledge graph by analyzing error patterns, types, messages, and context to resolve recurring issues.

Instructions

Find similar errors and their solutions in the knowledge graph

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
errorPatternYes

Implementation Reference

  • The main handler function in KnowledgeGraphManager that executes the find_similar_errors tool logic by filtering and sorting lesson entities based on similarity to the provided error pattern.
    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 ListTools response, including name, description, and input schema.
    {
      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"]
      }
    },
  • TypeScript interface defining the input structure for the error pattern used by the tool.
    interface ErrorPattern {
      type: string;
      message: string;
      context: string;
      stackTrace?: string;
    }
  • Dispatcher in the CallToolRequest handler that invokes the findSimilarErrors method with the tool arguments.
    case "find_similar_errors":
      return { content: [{ type: "text", text: JSON.stringify(await knowledgeGraphManager.findSimilarErrors(args.errorPattern as ErrorPattern), null, 2) }] };
  • TypeScript interface defining the structure of lesson entities returned by the tool.
    interface LessonEntity extends Entity {
      errorPattern: ErrorPattern;
      metadata: Metadata;
      verificationSteps: VerificationStep[];
    }
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 mentions 'find similar errors and their solutions' but doesn't clarify what 'similar' means (e.g., based on pattern matching, semantic similarity), how results are returned, or any limitations like rate limits or authentication needs. 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 that directly states the tool's purpose without unnecessary words. It's appropriately sized and front-loaded, making it easy to grasp quickly.

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 complexity (1 parameter with nested objects, no annotations, no output schema), the description is insufficient. It doesn't explain the input structure, output format, or behavioral details needed for effective use. For a tool that likely involves complex pattern matching and result retrieval, more context is required.

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

Parameters2/5

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

Schema description coverage is 0%, so the schema provides no parameter descriptions. The tool description mentions 'errorPattern' implicitly but doesn't explain what it should contain or how it's used to find similar errors. It fails to compensate for the lack of schema documentation, leaving parameters largely undefined.

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 action ('Find') and target ('similar errors and their solutions in the knowledge graph'), making the purpose understandable. However, it doesn't explicitly differentiate from sibling tools like 'search_nodes' or 'get_lesson_recommendations', which might also involve searching or retrieving information from the knowledge graph.

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. With siblings like 'search_nodes' and 'get_lesson_recommendations' that might overlap in functionality, there's no indication of specific use cases, prerequisites, or exclusions for this tool.

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

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