Skip to main content
Glama
soil-dev

capsulemcp

update_entry

Edit a timeline entry's content or subject; only supplied fields are changed. Use to correct or extend previous notes.

Instructions

Edit an existing timeline entry — typically a note. Provide the entry id plus the fields you want to change (content, subject). Only the fields you supply are modified; other fields keep their current values. Cannot change the entry's type. Use this to correct or extend a note added previously.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idYesEntry ID to update
contentNoNew body text for the entry. For notes, this is the markdown content; for emails, the body. Provide only if you want to change it.
subjectNoNew subject line. Mostly meaningful on email-type entries; on plain notes Capsule accepts the call (HTTP 200) but **does not store the subject and does not advance `updatedAt`** — a true no-op for inapplicable fields. `entryAt` (when the note was authored) is preserved across edits; `updatedAt` advances only when an applicable field actually changes. To sort/filter by 'when did this happen', use `entryAt`; for 'last touched', use `updatedAt`.

Implementation Reference

  • The handler function that executes the update_entry logic. Extracts id and remaining fields (content, subject), builds a partial body object, and calls capsulePut to PATCH /entries/{id}.
    export async function updateEntry(input: z.infer<typeof updateEntrySchema>) {
      const { id, ...rest } = input;
      const body: Record<string, unknown> = {};
      if (rest.content !== undefined) body["content"] = rest.content;
      if (rest.subject !== undefined) body["subject"] = rest.subject;
    
      if (Object.keys(body).length === 0) {
        throw new Error("update_entry: provide at least one field to update (content or subject)");
      }
    
      return capsulePut<{ entry: unknown }>(`/entries/${id}`, { entry: body });
    }
  • Zod schema for update_entry. Defines required id (positive integer), optional content (string min 1), and optional subject (string).
    export const updateEntrySchema = z.object({
      id: z.number().int().positive().describe("Entry ID to update"),
      content: z
        .string()
        .min(1)
        .optional()
        .describe(
          "New body text for the entry. For notes, this is the markdown content; for emails, the body. Provide only if you want to change it.",
        ),
      subject: z
        .string()
        .optional()
        .describe(
          "New subject line. Mostly meaningful on email-type entries; on plain notes Capsule accepts the call (HTTP 200) but **does not store the subject and does not advance `updatedAt`** — a true no-op for inapplicable fields. `entryAt` (when the note was authored) is preserved across edits; `updatedAt` advances only when an applicable field actually changes. To sort/filter by 'when did this happen', use `entryAt`; for 'last touched', use `updatedAt`.",
        ),
    });
  • src/server.ts:812-818 (registration)
    Registration of the 'update_entry' tool on the MCP server with its description, schema, and handler via registerTool helper.
    registerTool(
      server,
      "update_entry",
      "Edit an existing timeline entry — typically a note. Provide the entry id plus the fields you want to change (content, subject). Only the fields you supply are modified; other fields keep their current values. Cannot change the entry's type. Use this to correct or extend a note added previously.",
      updateEntrySchema,
      updateEntry,
    );
  • The registerTool helper that wraps the handler and registers it with the MCP server (handles JSON-stringify response wrapping).
    export function registerTool<Schema extends z.ZodObject<ZodRawShape>>(
      server: McpServer,
      name: string,
      description: string,
      schema: Schema,
      handler: (input: z.infer<Schema>) => Promise<unknown>,
    ): void {
      // Use the SDK config-form registerTool with the full Zod schema. The
      // deprecated shape overload rebuilds z.object(schema.shape), which drops
      // object-level refinements such as superRefine.
      const registerWithSchema = server.registerTool.bind(server) as (
        toolName: string,
        config: { description: string; inputSchema: Schema },
        callback: (input: z.infer<Schema>) => Promise<CallToolResult>,
      ) => void;
    
      registerWithSchema(name, { description, inputSchema: schema }, async (input) => {
        const result = await handler(input);
        return wrapAsText(result);
      });
    }
Behavior3/5

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

No annotations are provided, so the description carries full burden. It discloses partial update behavior and inability to change entry type, but omits nuances like subject being a no-op for notes and the behavior of entryAt vs updatedAt, which are partially covered in the schema 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?

The description is two sentences, front-loaded with the purpose and immediately followed by usage details and constraints. Every sentence earns its place with no redundancy or unnecessary information.

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?

Given the tool has no output schema and 3 parameters with well-described schema, the description covers the core functionality but misses some behavioral details (e.g., no-op for subject on notes) that could affect correct invocation.

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

Parameters4/5

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

Schema coverage is 100%, so baseline is 3. The description adds value by explaining the partial update semantics (only supplied fields are modified), which enhances understanding beyond the individual parameter descriptions.

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?

The description clearly states the tool edits an existing timeline entry, typically a note. It specifies the verb 'edit' and the resource 'timeline entry', and distinguishes from sibling tools like add_note and delete_entry by stating it modifies existing entries and cannot change the entry 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?

The description explicitly says to use this to correct or extend a note added previously, providing clear when-to-use guidance. It implies when not to use (e.g., adding new entries) and notes that only supplied fields are modified, but does not explicitly list alternatives for other operations.

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/soil-dev/capsulemcp'

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