Skip to main content
Glama

add_todo

Create new to-do items in Things 3 with title, notes, tags, checklist items, deadlines, and project organization.

Instructions

创建新的待办事项。支持标题、备注、标签、清单、截止日期等。

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
titleNo待办事项标题
titlesNo批量创建待办事项,用换行符分隔
notesNo备注内容
whenNo时间安排: today, tomorrow, evening, anytime, someday, 日期(yyyy-mm-dd)或日期时间(yyyy-mm-dd@HH:mm)
deadlineNo截止日期(yyyy-mm-dd)
tagsNo标签,逗号分隔
checklistItemsNo清单项列表
listIdNo项目或区域的ID
listNo项目或区域的标题
headingIdNo项目内标题的ID
headingNo项目内标题的名称
completedNo是否标记为完成
canceledNo是否标记为取消
revealNo是否导航并显示

Implementation Reference

  • The main handler function that builds and opens a Things URL scheme for creating a new todo item.
    async handleAddTodo(args) {
      const url = buildThingsUrl('add', args);
      await this.openThingsUrl(url);
    
      return {
        content: [
          {
            type: 'text',
            text: `✅ 待办事项创建命令已发送${args.title ? `: ${args.title}` : ''}`,
          },
        ],
      };
    }
  • Input schema defining the parameters for the add_todo tool, including title, notes, when, tags, etc.
    inputSchema: {
      type: 'object',
      properties: {
        title: {
          type: 'string',
          description: '待办事项标题',
        },
        titles: {
          type: 'string',
          description: '批量创建待办事项,用换行符分隔',
        },
        notes: {
          type: 'string',
          description: '备注内容',
        },
        when: {
          type: 'string',
          description: '时间安排: today, tomorrow, evening, anytime, someday, 日期(yyyy-mm-dd)或日期时间(yyyy-mm-dd@HH:mm)',
        },
        deadline: {
          type: 'string',
          description: '截止日期(yyyy-mm-dd)',
        },
        tags: {
          type: 'string',
          description: '标签,逗号分隔',
        },
        checklistItems: {
          type: 'array',
          items: { type: 'string' },
          description: '清单项列表',
        },
        listId: {
          type: 'string',
          description: '项目或区域的ID',
        },
        list: {
          type: 'string',
          description: '项目或区域的标题',
        },
        headingId: {
          type: 'string',
          description: '项目内标题的ID',
        },
        heading: {
          type: 'string',
          description: '项目内标题的名称',
        },
        completed: {
          type: 'boolean',
          description: '是否标记为完成',
        },
        canceled: {
          type: 'boolean',
          description: '是否标记为取消',
        },
        reveal: {
          type: 'boolean',
          description: '是否导航并显示',
        },
      },
    },
  • src/index.js:51-116 (registration)
    Tool registration in the ListToolsRequestSchema handler, defining name, description, and inputSchema.
    {
      name: 'add_todo',
      description: '创建新的待办事项。支持标题、备注、标签、清单、截止日期等。',
      inputSchema: {
        type: 'object',
        properties: {
          title: {
            type: 'string',
            description: '待办事项标题',
          },
          titles: {
            type: 'string',
            description: '批量创建待办事项,用换行符分隔',
          },
          notes: {
            type: 'string',
            description: '备注内容',
          },
          when: {
            type: 'string',
            description: '时间安排: today, tomorrow, evening, anytime, someday, 日期(yyyy-mm-dd)或日期时间(yyyy-mm-dd@HH:mm)',
          },
          deadline: {
            type: 'string',
            description: '截止日期(yyyy-mm-dd)',
          },
          tags: {
            type: 'string',
            description: '标签,逗号分隔',
          },
          checklistItems: {
            type: 'array',
            items: { type: 'string' },
            description: '清单项列表',
          },
          listId: {
            type: 'string',
            description: '项目或区域的ID',
          },
          list: {
            type: 'string',
            description: '项目或区域的标题',
          },
          headingId: {
            type: 'string',
            description: '项目内标题的ID',
          },
          heading: {
            type: 'string',
            description: '项目内标题的名称',
          },
          completed: {
            type: 'boolean',
            description: '是否标记为完成',
          },
          canceled: {
            type: 'boolean',
            description: '是否标记为取消',
          },
          reveal: {
            type: 'boolean',
            description: '是否导航并显示',
          },
        },
      },
    },
  • Utility function to build the Things URL scheme from command and parameters, used in the add_todo handler.
    export function buildThingsUrl(command, params = {}) {
      const baseUrl = `things:///${command}`;
      const queryString = buildQueryString(params);
    
      if (!queryString) {
        return baseUrl;
      }
    
      return `${baseUrl}?${queryString}`;
    }
  • Helper method to execute the Things URL by opening it with the system's 'open' command.
    async openThingsUrl(url) {
      try {
        await execAsync(`open "${url}"`);
        return { success: true };
      } catch (error) {
        throw new Error(`无法打开Things URL: ${error.message}`);
      }
    }
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 states the tool creates new todos but doesn't mention any behavioral traits: no information about permissions required, whether creation is idempotent, error conditions, rate limits, or what happens on success (e.g., returns a todo ID). For a creation tool with 14 parameters and no annotation coverage, this leaves significant gaps in understanding how the tool behaves.

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 directly states the purpose and enumerates key parameters. It's appropriately sized and front-loaded with the core action. While it could be slightly more structured (e.g., separating purpose from parameter highlights), it avoids unnecessary verbiage and gets straight to the point.

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 the complexity (14 parameters, creation operation) and lack of annotations or output schema, the description is incomplete. It doesn't address behavioral aspects like what the tool returns, error handling, or dependencies. For a tool that creates resources with many optional fields, more context is needed to use it effectively, especially without structured output information.

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 14 parameters thoroughly. The description adds minimal value by listing some parameter names (title, notes, tags, etc.) but doesn't provide additional semantics beyond what's in the schema descriptions. This meets the baseline of 3 when schema coverage is high, but doesn't enhance parameter understanding.

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 ('创建新的待办事项' - create new todo) and resource ('待办事项' - todo), which is specific and unambiguous. It lists supported fields (title, notes, tags, etc.), providing good detail about what the tool does. However, it doesn't explicitly differentiate from sibling tools like 'update_todo' or 'delete_todo', which would be needed for 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?

The description provides no guidance on when to use this tool versus alternatives. It doesn't mention sibling tools like 'update_todo' (for modifying existing todos) or 'delete_todo' (for removal), nor does it specify prerequisites or appropriate contexts. The agent must infer usage from the tool name alone, which is insufficient for optimal selection.

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