search
Find todos, projects, and tasks in your Things 3 app by entering search queries to locate specific items quickly.
Instructions
搜索Things中的待办事项、项目等。
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| query | No | 搜索查询文本 |
Implementation Reference
- src/index.js:555-567 (handler)The handler function that implements the 'search' tool logic by building and opening a Things URL scheme for searching.async handleSearch(args) { const url = buildThingsUrl('search', args); await this.openThingsUrl(url); return { content: [ { type: 'text', text: `🔍 搜索命令已发送${args.query ? `: ${args.query}` : ''}`, }, ], }; }
- src/index.js:342-350 (schema)Input schema for the 'search' tool, defining the required 'query' parameter.inputSchema: { type: 'object', properties: { query: { type: 'string', description: '搜索查询文本', }, }, },
- src/index.js:339-351 (registration)Tool registration in the ListTools response, providing name, description, and schema.{ name: 'search', description: '搜索Things中的待办事项、项目等。', inputSchema: { type: 'object', properties: { query: { type: 'string', description: '搜索查询文本', }, }, }, },
- src/index.js:441-442 (registration)Dispatch registration in the CallToolRequestSchema handler switch statement.case 'search': return await this.handleSearch(args);
- src/utils.js:84-93 (helper)Helper utility function called by the search handler to construct the search URL: buildThingsUrl('search', args).export function buildThingsUrl(command, params = {}) { const baseUrl = `things:///${command}`; const queryString = buildQueryString(params); if (!queryString) { return baseUrl; } return `${baseUrl}?${queryString}`; }