Skip to main content
Glama

add_todo

Create new to-do items with title, notes, tags, deadlines, and checklists. Organize tasks into projects and set time schedules for better task management.

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 for the 'add_todo' tool. It constructs a Things URL scheme using buildThingsUrl('add', args) and opens it via openThingsUrl to create the todo item, then returns a success message.
    async handleAddTodo(args) { const url = buildThingsUrl('add', args); await this.openThingsUrl(url); return { content: [ { type: 'text', text: `✅ 待办事项创建命令已发送${args.title ? `: ${args.title}` : ''}`, }, ], }; }
  • Input schema definition for the 'add_todo' tool, specifying properties like title, notes, when, deadline, tags, checklistItems, etc., with types and descriptions.
    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)
    Registration of the 'add_todo' tool in the ListToolsRequestSchema handler, including 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: '是否导航并显示', }, }, }, },
  • src/index.js:427-428 (registration)
    Dispatch case in the CallToolRequestSchema handler that routes 'add_todo' calls to the handleAddTodo method.
    case 'add_todo': return await this.handleAddTodo(args);
  • Helper utility function buildThingsUrl used by the handler to construct the Things URL scheme for the 'add' command with encoded parameters.
    export function buildThingsUrl(command, params = {}) { const baseUrl = `things:///${command}`; const queryString = buildQueryString(params); if (!queryString) { return baseUrl; } return `${baseUrl}?${queryString}`; }

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