Skip to main content
Glama

Remove Todo

remove_todo

Delete a specific todo item from your persistent list by providing its unique identifier to maintain an organized task management system.

Instructions

Remove a todo by id

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idYes

Implementation Reference

  • The handler function that implements the remove_todo tool logic: reads todos, filters out the one with matching ID, writes back if changed, and returns appropriate message.
    async ({ id }) => {
      const todos = await readTodos();
      const next = todos.filter((t) => t.id !== id);
      if (next.length === todos.length)
        return { content: [{ type: "text", text: `No todo with id ${id}` }] };
      await writeTodos(next);
      return { content: [{ type: "text", text: `Removed #${id}` }] };
    }
  • Schema for the remove_todo tool: title, description, and input schema requiring a positive integer 'id'.
    {
      title: "Remove Todo",
      description: "Remove a todo by id",
      inputSchema: { id: z.number().int().positive() },
    },
  • src/server.ts:114-129 (registration)
    Registration of the 'remove_todo' tool on the MCP server, including schema and handler.
    server.registerTool(
      "remove_todo",
      {
        title: "Remove Todo",
        description: "Remove a todo by id",
        inputSchema: { id: z.number().int().positive() },
      },
      async ({ id }) => {
        const todos = await readTodos();
        const next = todos.filter((t) => t.id !== id);
        if (next.length === todos.length)
          return { content: [{ type: "text", text: `No todo with id ${id}` }] };
        await writeTodos(next);
        return { content: [{ type: "text", text: `Removed #${id}` }] };
      }
    );
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 implies a destructive operation ('Remove'), but doesn't specify if deletion is permanent, reversible, requires specific permissions, or has side effects (e.g., affecting related data). For a mutation tool with zero annotation coverage, this is a significant gap in transparency.

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 extremely concise with a single sentence that front-loads the core action. There is zero waste or redundancy, making it efficient for quick understanding, though this brevity contributes to gaps in other dimensions.

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 a destructive tool with no annotations, no output schema, and incomplete parameter documentation, the description is inadequate. It doesn't cover behavioral traits, return values, or error conditions, leaving the agent with insufficient context to use the tool safely and effectively.

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

Parameters1/5

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

The schema description coverage is 0%, and the description adds no meaning beyond the schema's basic type constraints. It mentions 'id' but doesn't explain what this ID represents (e.g., from 'list_todos'), its format, or valid ranges beyond the schema's 'exclusiveMinimum: 0'. With 1 undocumented parameter, the description fails to compensate for the coverage gap.

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 ('Remove') and resource ('a todo by id'), making the purpose immediately understandable. It distinguishes from siblings like 'add_todo' and 'list_todos' by specifying deletion rather than creation or listing. However, it doesn't explicitly differentiate from 'toggle_todo' which also modifies todos, keeping it from a perfect score.

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?

No guidance is provided on when to use this tool versus alternatives like 'toggle_todo' (which might mark as done instead of deleting) or prerequisites such as needing an existing todo ID. The description only states what it does, not when it's appropriate, leaving the agent to infer usage from context.

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/CalamityAdam/mcp-todo'

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