Skip to main content
Glama

delete_todo

Remove a todo item from the Things 3 task management app by marking it as canceled using its unique ID.

Instructions

删除待办事项(通过将其标记为已取消)。需要提供待办事项ID和授权令牌。

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idYes待办事项的ID(必需)
authTokenNo授权令牌(如未提供,将使用环境变量THINGS_AUTH_TOKEN)

Implementation Reference

  • The handler function that executes the delete_todo tool. It marks the todo as canceled by building and opening a Things update URL.
    async handleDeleteTodo(args) {
      const authToken = args.authToken || DEFAULT_AUTH_TOKEN;
      if (!authToken) {
        throw new Error('需要授权令牌。请设置环境变量THINGS_AUTH_TOKEN或在参数中提供authToken');
      }
    
      // 通过将 canceled 设为 true 来实现删除效果
      const params = {
        id: args.id,
        authToken,
        canceled: true,
      };
    
      const url = buildThingsUrl('update', params);
      await this.openThingsUrl(url);
    
      return {
        content: [
          {
            type: 'text',
            text: `🗑️ 待办事项已删除 (ID: ${args.id})`,
          },
        ],
      };
    }
  • Input schema defining parameters for the delete_todo tool: id (required string), authToken (optional string).
    inputSchema: {
      type: 'object',
      properties: {
        id: {
          type: 'string',
          description: '待办事项的ID(必需)',
        },
        authToken: {
          type: 'string',
          description: '授权令牌(如未提供,将使用环境变量THINGS_AUTH_TOKEN)',
        },
      },
      required: ['id'],
    },
  • src/index.js:382-399 (registration)
    Registration of the delete_todo tool in the server's tools list, including name, description, and input schema.
    {
      name: 'delete_todo',
      description: '删除待办事项(通过将其标记为已取消)。需要提供待办事项ID和授权令牌。',
      inputSchema: {
        type: 'object',
        properties: {
          id: {
            type: 'string',
            description: '待办事项的ID(必需)',
          },
          authToken: {
            type: 'string',
            description: '授权令牌(如未提供,将使用环境变量THINGS_AUTH_TOKEN)',
          },
        },
        required: ['id'],
      },
    },
  • src/index.js:435-436 (registration)
    Switch case in the request handler that routes calls to delete_todo to the handleDeleteTodo function.
    case 'delete_todo':
      return await this.handleDeleteTodo(args);
Behavior2/5

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

With no annotations provided, the description carries full burden. It mentions the action marks the todo as cancelled rather than permanent deletion, which is useful context. However, it lacks details on permissions needed, error handling, rate limits, or what happens if the ID doesn't exist. For a mutation tool with zero annotation coverage, this is insufficient.

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 in Chinese that states the action, method, and required inputs. Every word serves a purpose with zero waste, making it appropriately concise and front-loaded.

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?

For a mutation tool with no annotations and no output schema, the description is incomplete. It doesn't explain return values, error conditions, or behavioral constraints. While concise, it lacks necessary context for safe and effective use by an AI agent.

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 description coverage is 100%, so the schema already documents both parameters thoroughly. The description adds no additional meaning about parameters beyond what's in the schema (e.g., no examples or format details). Baseline 3 is appropriate when schema does the heavy lifting.

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 ('删除待办事项') and resource ('待办事项'), specifying it works by marking as cancelled. It distinguishes from siblings like 'delete_project' by focusing on todos, but doesn't explicitly contrast with 'update_todo' which might also handle status changes.

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 on when to use this tool versus alternatives is provided. It doesn't mention when to choose 'delete_todo' over 'update_todo' for status changes, or prerequisites beyond the required parameters. The description only states what it does, not when to use it.

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/Mieluoxxx/things_mcp'

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