Skip to main content
Glama
T1nker-1220

Knowledge Graph Memory Server

update_lesson_success

Update lesson success rates in a knowledge graph memory system to track solution effectiveness and improve future interactions.

Instructions

Update the success rate of a lesson after applying its solution

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
lessonNameYesName of the lesson to update
successYesWhether the solution was successful

Implementation Reference

  • The handler function in KnowledgeGraphManager that finds the lesson by name, updates its metadata with new frequency and success rate based on the provided success boolean, and saves the graph.
    async updateLessonSuccess(lessonName: string, success: boolean): Promise<void> {
      const graph = await this.loadGraph();
      const lesson = graph.entities.find(e => e.name === lessonName && e.entityType === 'lesson') as LessonEntity | undefined;
    
      if (!lesson) {
        throw new Error(`Lesson with name ${lessonName} not found`);
      }
    
      if (!lesson.metadata) {
        lesson.metadata = {
          createdAt: new Date().toISOString(),
          updatedAt: new Date().toISOString(),
          frequency: 0,
          successRate: 0
        };
      }
    
      const currentSuccessRate = lesson.metadata.successRate ?? 0;
      const frequency = lesson.metadata.frequency ?? 0;
    
      lesson.metadata.frequency = frequency + 1;
      lesson.metadata.successRate = ((currentSuccessRate * frequency) + (success ? 1 : 0)) / (frequency + 1);
      lesson.metadata.updatedAt = new Date().toISOString();
    
      await this.saveGraph(graph);
    }
  • The input schema for the update_lesson_success tool, defining lessonName (string) and success (boolean) as required parameters.
      name: "update_lesson_success",
      description: "Update the success rate of a lesson after applying its solution",
      inputSchema: {
        type: "object",
        properties: {
          lessonName: { type: "string", description: "Name of the lesson to update" },
          success: { type: "boolean", description: "Whether the solution was successful" }
        },
        required: ["lessonName", "success"]
      }
    },
  • index.ts:1248-1250 (registration)
    The dispatch case in the CallToolRequestHandler switch statement that calls the handler on knowledgeGraphManager and returns success message.
    case "update_lesson_success":
      await knowledgeGraphManager.updateLessonSuccess(args.lessonName as string, args.success as boolean);
      return { content: [{ type: "text", text: "Lesson success updated successfully" }] };
Behavior2/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It mentions 'Update' which implies a mutation, but fails to specify permissions needed, whether changes are reversible, rate limits, or response format. This leaves significant gaps for a mutation tool.

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 is appropriately sized and front-loaded, making it easy to understand 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 tool's mutation nature, lack of annotations, and no output schema, the description is incomplete. It doesn't cover behavioral aspects like error handling, return values, or integration with sibling tools, leaving the agent with insufficient context for safe and effective use.

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 schema description coverage is 100%, so the input schema already documents both parameters ('lessonName' and 'success') adequately. The description adds minimal value by implying the context ('after applying its solution') but doesn't provide additional syntax or format details beyond the schema.

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 ('Update') and resource ('success rate of a lesson') with context ('after applying its solution'), making the purpose understandable. However, it doesn't explicitly differentiate this tool from sibling tools like 'create_lesson' or 'get_lesson_recommendations' in terms of when to update versus create or retrieve.

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 minimal guidance by implying usage 'after applying its solution,' but it lacks explicit when-to-use rules, alternatives (e.g., vs. 'create_lesson' for initial setup), or prerequisites. No clear boundaries or comparisons to sibling tools are stated.

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