Skip to main content
Glama
shenchensucc

Chen's AI Copy

by shenchensucc

update_preference

Modify user preferences like resume formats or communication styles to personalize AI assistant behavior and responses.

Instructions

Update a preference in Chen's context. Use when Chen expresses a new preference (e.g. resume format, communication style, tool choice).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
keyYesPreference key, e.g. 'resumeFormat.style' or 'communication.tone'
valueYesThe value to set (will be parsed as JSON if possible)

Implementation Reference

  • The implementation of updatePreference, which handles updating a nested preference key in preferences.json.
    export async function updatePreference(key: string, value: unknown): Promise<void> {
      const prefs = await loadJson<Record<string, unknown>>("preferences.json", {});
      const keys = key.split(".");
      let target: Record<string, unknown> = prefs;
      for (let i = 0; i < keys.length - 1; i++) {
        const k = keys[i];
        if (!(k in target) || typeof target[k] !== "object") {
          target[k] = {};
        }
        target = target[k] as Record<string, unknown>;
      }
      target[keys[keys.length - 1]] = value;
      await saveJson("preferences.json", prefs);
    }
  • src/index.ts:156-180 (registration)
    The request handler logic for 'update_preference' in src/index.ts.
    if (name === "update_preference") {
      const key = safeArgs.key as string;
      const valueStr = safeArgs.value as string;
      if (!key || valueStr === undefined) {
        return {
          content: [{ type: "text", text: "Error: key and value are required" }],
          isError: true,
        };
      }
      let value: unknown = valueStr;
      try {
        value = JSON.parse(valueStr);
      } catch {
        // Keep as string
      }
      await updatePreference(key, value);
      return {
        content: [
          {
            type: "text",
            text: `Updated preference ${key} = ${JSON.stringify(value)}`,
          },
        ],
      };
    }
  • Tool schema registration for 'update_preference'.
      name: "update_preference",
      description:
        "Update a preference in Chen's context. Use when Chen expresses a new preference (e.g. resume format, communication style, tool choice).",
      inputSchema: {
        type: "object",
        properties: {
          key: { type: "string", description: "Preference key, e.g. 'resumeFormat.style' or 'communication.tone'" },
          value: { type: "string", description: "The value to set (will be parsed as JSON if possible)" },
        },
        required: ["key", "value"],
      },
    },
Behavior2/5

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

No annotations provided, so description carries full burden. States operation occurs 'in Chen's context' but fails to disclose mutation semantics (create vs. overwrite), persistence behavior, or side effects. The JSON parsing behavior mentioned in schema parameter description is not reinforced in main description.

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 redundancy. First sentence establishes purpose; second establishes trigger condition with examples. Perfectly front-loaded and appropriately sized for tool complexity.

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

Completeness3/5

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

With no annotations and no output schema, description covers basic operation adequately but omits persistence model, overwrite behavior, and relationship to get_context sibling (which presumably reads these preferences). Adequate for simple key-value tool but has gaps.

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 of 3. Description adds domain context through examples (resume format, communication style) but does not add syntax guidance or value constraints beyond what's in the schema. The dot-notation schema hint exists only in parameter description, not main description.

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?

Clear specific verb ('Update') + resource ('preference in Chen's context'). Explicitly distinguishes from sibling tools: add_interested_company and add_learning focus on adding specific entities, while get_context retrieves data; this tool specifically handles user preference updates.

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?

Explicitly states when to use: 'Use when Chen expresses a new preference' with concrete examples (resume format, communication style, tool choice). Lacks explicit 'when not to use' or named alternative tools, though the scope is narrow enough to be clear.

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