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}`); } }

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