Skip to main content
Glama
shenchensucc

Chen's AI Copy

by shenchensucc

add_learning

Add learnings, patterns, or insights to a personal knowledge base for future reference and professional development.

Instructions

Add a learning, pattern, or insight to Chen's context. Use when Chen adopts a new approach, learns something from a project, or asks to remember something for future use.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
contentYesThe learning or insight to remember
sourceNoOptional: project or context where this was learned
categoryNoOptional: e.g. 'resume', 'coding', 'process'

Implementation Reference

  • The MCP tool request handler for 'add_learning' which validates arguments and calls the underlying service function.
    if (name === "add_learning") {
      const content = safeArgs.content as string;
      if (!content) {
        return {
          content: [{ type: "text", text: "Error: content is required" }],
          isError: true,
        };
      }
      const learning = await addLearning({
        content,
        source: safeArgs.source as string | undefined,
        category: safeArgs.category as string | undefined,
      });
      return {
        content: [
          {
            type: "text",
            text: `Added learning: ${JSON.stringify(learning, null, 2)}`,
          },
        ],
      };
    }
  • The core business logic function that adds a learning item to the storage.
    export async function addLearning(learning: Omit<Learning, "id" | "date">): Promise<Learning> {
      const learnings = await loadJson<Learning[]>("learnings.json", []);
      const newLearning: Learning = {
        ...learning,
        id: `l-${Date.now()}-${Math.random().toString(36).slice(2, 8)}`,
        date: new Date().toISOString(),
      };
      learnings.push(newLearning);
      await saveJson("learnings.json", learnings);
      return newLearning;
    }
  • Registration and definition of the 'add_learning' tool in the ListTools response.
      name: "add_learning",
      description:
        "Add a learning, pattern, or insight to Chen's context. Use when Chen adopts a new approach, learns something from a project, or asks to remember something for future use.",
      inputSchema: {
        type: "object",
        properties: {
          content: { type: "string", description: "The learning or insight to remember" },
          source: { type: "string", description: "Optional: project or context where this was learned" },
          category: { type: "string", description: "Optional: e.g. 'resume', 'coding', 'process'" },
        },
        required: ["content"],
      },
    },
  • Interface definition for the Learning object.
    export interface Learning {
      id: string;
      content: string;
      source?: string;
      category?: string;
      date: string;
    }
Behavior3/5

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

With no annotations, description carries full burden. 'Remember something for future use' implies persistence and retrieval capability, establishing this as a memory tool. However, lacks details on idempotency, storage limits, conflict resolution, or return value confirmation.

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?

Two sentences with zero waste. First sentence establishes purpose immediately; second provides usage contexts. Every word earns its place.

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

Completeness4/5

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

Appropriate for a 3-parameter tool with no output schema. Covers purpose, usage semantics, and parameter intent. Could be improved by noting persistence guarantees or what constitutes a successful operation, but adequate for the complexity level.

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?

Schema coverage is 100%, establishing baseline 3. Description contextualizes content as 'learning' or 'approach' and mentions 'project' which aligns with source parameter semantics. Does not add syntax details or validation constraints beyond schema.

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

Purpose5/5

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

Specific verb 'Add' with clear resource 'learning, pattern, or insight to Chen's context'. Distinguishes from sibling get_context (add vs retrieve), update_preference (learnings vs preferences), and add_interested_company (learnings vs companies) by scope and resource type.

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

Usage Guidelines4/5

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

Provides explicit positive usage scenarios: 'when Chen adopts a new approach,' 'learns something from a project,' or 'asks to remember something.' Lacks explicit 'when not to use' or named alternatives, but clear contextual boundaries are established.

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/shenchensucc/chens-ai-copy'

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