Skip to main content
Glama

update_todo

Modify existing to-do items in the Things 3 app by updating titles, notes, deadlines, tags, checklist items, or completion status using the item ID.

Instructions

更新现有的待办事项。需要提供待办事项ID和授权令牌。

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idYes待办事项的ID(必需)
authTokenNo授权令牌(如未提供,将使用环境变量THINGS_AUTH_TOKEN)
titleNo新标题
notesNo新备注(替换现有)
prependNotesNo在现有备注前添加
appendNotesNo在现有备注后添加
whenNo时间安排
deadlineNo截止日期
tagsNo标签(替换所有)
addTagsNo添加标签
checklistItemsNo清单项(替换所有)
appendChecklistItemsNo追加清单项
prependChecklistItemsNo前置清单项
completedNo完成状态
canceledNo取消状态
revealNo是否显示

Implementation Reference

  • The main handler function that executes the logic for the 'update_todo' tool. It validates the auth token, builds the Things update URL, opens it, and returns a success message.
    async handleUpdateTodo(args) {
      const authToken = args.authToken || DEFAULT_AUTH_TOKEN;
      if (!authToken) {
        throw new Error('需要授权令牌。请设置环境变量THINGS_AUTH_TOKEN或在参数中提供authToken');
      }
    
      const params = { ...args, authToken };
      const url = buildThingsUrl('update', params);
      await this.openThingsUrl(url);
    
      return {
        content: [
          {
            type: 'text',
            text: `✅ 待办事项更新命令已发送 (ID: ${args.id})`,
          },
        ],
      };
    }
  • Input schema defining the parameters and validation rules for the 'update_todo' tool, including required 'id' and optional fields like title, notes, tags, etc.
    inputSchema: {
      type: 'object',
      properties: {
        id: {
          type: 'string',
          description: '待办事项的ID(必需)',
        },
        authToken: {
          type: 'string',
          description: '授权令牌(如未提供,将使用环境变量THINGS_AUTH_TOKEN)',
        },
        title: {
          type: 'string',
          description: '新标题',
        },
        notes: {
          type: 'string',
          description: '新备注(替换现有)',
        },
        prependNotes: {
          type: 'string',
          description: '在现有备注前添加',
        },
        appendNotes: {
          type: 'string',
          description: '在现有备注后添加',
        },
        when: {
          type: 'string',
          description: '时间安排',
        },
        deadline: {
          type: 'string',
          description: '截止日期',
        },
        tags: {
          type: 'string',
          description: '标签(替换所有)',
        },
        addTags: {
          type: 'string',
          description: '添加标签',
        },
        checklistItems: {
          type: 'array',
          items: { type: 'string' },
          description: '清单项(替换所有)',
        },
        appendChecklistItems: {
          type: 'array',
          items: { type: 'string' },
          description: '追加清单项',
        },
        prependChecklistItems: {
          type: 'array',
          items: { type: 'string' },
          description: '前置清单项',
        },
        completed: {
          type: 'boolean',
          description: '完成状态',
        },
        canceled: {
          type: 'boolean',
          description: '取消状态',
        },
        reveal: {
          type: 'boolean',
          description: '是否显示',
        },
      },
      required: ['id'],
    },
  • src/index.js:171-247 (registration)
    Registration of the 'update_todo' tool in the ListToolsRequestSchema response, including name, description, and schema.
    {
      name: 'update_todo',
      description: '更新现有的待办事项。需要提供待办事项ID和授权令牌。',
      inputSchema: {
        type: 'object',
        properties: {
          id: {
            type: 'string',
            description: '待办事项的ID(必需)',
          },
          authToken: {
            type: 'string',
            description: '授权令牌(如未提供,将使用环境变量THINGS_AUTH_TOKEN)',
          },
          title: {
            type: 'string',
            description: '新标题',
          },
          notes: {
            type: 'string',
            description: '新备注(替换现有)',
          },
          prependNotes: {
            type: 'string',
            description: '在现有备注前添加',
          },
          appendNotes: {
            type: 'string',
            description: '在现有备注后添加',
          },
          when: {
            type: 'string',
            description: '时间安排',
          },
          deadline: {
            type: 'string',
            description: '截止日期',
          },
          tags: {
            type: 'string',
            description: '标签(替换所有)',
          },
          addTags: {
            type: 'string',
            description: '添加标签',
          },
          checklistItems: {
            type: 'array',
            items: { type: 'string' },
            description: '清单项(替换所有)',
          },
          appendChecklistItems: {
            type: 'array',
            items: { type: 'string' },
            description: '追加清单项',
          },
          prependChecklistItems: {
            type: 'array',
            items: { type: 'string' },
            description: '前置清单项',
          },
          completed: {
            type: 'boolean',
            description: '完成状态',
          },
          canceled: {
            type: 'boolean',
            description: '取消状态',
          },
          reveal: {
            type: 'boolean',
            description: '是否显示',
          },
        },
        required: ['id'],
      },
    },
  • src/index.js:431-432 (registration)
    Dispatch case in the CallToolRequestSchema handler that routes 'update_todo' calls to the handleUpdateTodo function.
    case 'update_todo':
      return await this.handleUpdateTodo(args);
  • Helper function used by the handler to construct the Things URL scheme for the 'update' command with provided parameters.
    export function buildThingsUrl(command, params = {}) {
      const baseUrl = `things:///${command}`;
      const queryString = buildQueryString(params);
    
      if (!queryString) {
        return baseUrl;
      }
    
      return `${baseUrl}?${queryString}`;
    }
Behavior2/5

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

With no annotations provided, the description carries full burden for behavioral disclosure. It mentions authentication requirements (auth token) which is valuable, but doesn't describe important behavioral aspects: whether this is a partial or complete update, what happens to unspecified fields, whether the operation is idempotent, error conditions, or what the response contains. For a mutation tool with 16 parameters and no annotations, 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.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, efficient sentence that states the core purpose and mentions two key parameters. There's no wasted language, though it could be slightly more informative given the tool's complexity. It's appropriately sized for a basic description.

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 16 parameters, no annotations, and no output schema, the description is inadequate. It doesn't explain what the tool returns, error conditions, field update behaviors (replace vs append), or how it differs from similar tools. The agent would struggle to use this effectively without trial and error.

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 all 16 parameters thoroughly. The description mentions two parameters (id and authToken) but doesn't add meaningful semantic context beyond what's in the schema. The baseline of 3 is appropriate when the schema does the heavy lifting, though the description could have explained parameter interactions (e.g., notes vs prependNotes vs appendNotes).

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 ('更新' - update) and resource ('现有的待办事项' - existing todo item). It specifies the verb+resource combination effectively. However, it doesn't differentiate from sibling tools like 'update_project' or explain what distinguishes updating a todo from updating a project.

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?

The description provides no guidance on when to use this tool versus alternatives like 'add_todo' or 'update_project'. It mentions required parameters (ID and auth token) but doesn't explain use cases, prerequisites, or when this tool is appropriate versus other mutation tools in the sibling set.

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