search
Find todos, projects, and other items in your Things 3 task management system using search queries to locate specific tasks and organize your workflow.
Instructions
搜索Things中的待办事项、项目等。
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| query | No | 搜索查询文本 |
Implementation Reference
- src/index.js:555-567 (handler)The main handler function for the 'search' tool. Constructs a Things 'search' URL scheme using buildThingsUrl with the provided arguments, opens it via openThingsUrl to trigger the search in the Things app, and returns a formatted success message.async handleSearch(args) { const url = buildThingsUrl('search', args); await this.openThingsUrl(url); return { content: [ { type: 'text', text: `🔍 搜索命令已发送${args.query ? `: ${args.query}` : ''}`, }, ], }; }
- src/index.js:339-351 (registration)Tool registration entry for 'search' in the ListTools response. Defines the tool name, description, and input schema (query: string).{ name: 'search', description: '搜索Things中的待办事项、项目等。', inputSchema: { type: 'object', properties: { query: { type: 'string', description: '搜索查询文本', }, }, }, },
- src/index.js:441-442 (registration)Dispatch logic in the CallToolRequest handler that matches tool name 'search' and invokes the handleSearch method.case 'search': return await this.handleSearch(args);
- src/utils.js:84-93 (helper)Helper function used by the search handler to construct the full Things URL scheme (things:///search?query=...) by encoding the input parameters appropriately for the Things app.export function buildThingsUrl(command, params = {}) { const baseUrl = `things:///${command}`; const queryString = buildQueryString(params); if (!queryString) { return baseUrl; } return `${baseUrl}?${queryString}`; }