Skip to main content
Glama

search_tasks

Find Todoist tasks using search filters with three syntax options: basic text, wildcard, or exact phrase matching. Returns structured task details for efficient task management.

Instructions

Search for tasks in Todoist using the search filter. This is one of three search tools: basic search (single term), AND search (all terms must match), and OR search (any term can match). Supports three search syntax options: basic text search (meeting), wildcard search (report), and exact phrase search ("buy groceries"). Returns structured JSON data with task details including id, content, description, completion status, labels, priority, due date, and comment count.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
queryYesSearch query to find matching tasks. Examples: meeting (basic text search), *report* (wildcard search), "buy groceries" (quoted, exact phrase search)

Implementation Reference

  • The handler function for the 'search_tasks' MCP tool. It takes a query argument, calls the underlying searchTasks service function, and returns the result as formatted JSON text content.
    handler: async (args: { query: string }) => {
      console.error('Executing search_tasks...');
      const result = await searchTasks(args.query);
      console.error('search_tasks completed successfully');
      return {
        content: [
          {
            type: 'text',
            text: JSON.stringify(result, null, 2),
          },
        ],
      };
    },
  • The schema definition for the 'search_tasks' tool, specifying its name, description, and input schema that requires a 'query' string parameter.
    schema: {
      name: 'search_tasks',
      description:
        'Search for tasks in Todoist using the search filter. This is one of three search tools: basic search (single term), AND search (all terms must match), and OR search (any term can match). Supports three search syntax options: basic text search (meeting), wildcard search (*report*), and exact phrase search ("buy groceries"). Returns structured JSON data with task details including id, content, description, completion status, labels, priority, due date, and comment count.',
      inputSchema: {
        type: 'object',
        properties: {
          query: {
            type: 'string',
            description:
              'Search query to find matching tasks. Examples: meeting (basic text search), *report* (wildcard search), "buy groceries" (quoted, exact phrase search)',
          },
        },
        required: ['query'],
      },
    },
  • Registration of the 'search_tasks' tool handler (and related search tools) in the toolsWithArgs registry, which is used by the handleToolRequest function to dispatch tool calls.
    const toolsWithArgs: Record<string, (args: any) => Promise<ToolResponse>> = {
      get_task_comments: getTaskCommentsTool.handler,
      create_project_label: createProjectLabelTool.handler,
      create_task_comment: createTaskCommentTool.handler,
      update_task: updateTaskTool.handler,
      create_task: createTaskTool.handler,
      move_task: moveTaskTool.handler,
      get_tasks_with_label: getTasksWithLabelTool.handler,
      complete_task: completeTaskTool.handler,
      uncomplete_task: uncompleteTaskTool.handler,
      search_tasks: searchTasksTool.handler,
      search_tasks_using_and: searchTasksUsingAndTool.handler,
      search_tasks_using_or: searchTasksUsingOrTool.handler,
      complete_becky_task: completeBeckyTaskTool.handler,
    };
  • src/index.ts:100-100 (registration)
    The 'search_tasks' tool schema is included in the list of tools returned by the ListToolsRequestHandler in the MCP server.
    searchTasksTool.schema,
  • src/index.ts:29-29 (registration)
    Import of the searchTasksTool (containing schema and handler) in the main index file for server setup.
    searchTasksTool,
Behavior3/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 describes what the tool returns ('structured JSON data with task details including id, content, description, completion status, labels, priority, due date, and comment count'), which is valuable since there's no output schema. However, it doesn't mention potential limitations like pagination, rate limits, authentication requirements, or error conditions that would be important for a search operation.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is perfectly structured and concise: three sentences that each earn their place. First sentence states purpose, second provides sibling differentiation and usage context, third explains syntax options and return format. No wasted words, front-loaded with essential information.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a search tool with no annotations and no output schema, the description does an excellent job covering purpose, usage context, search syntax, and return format. The main gap is the lack of behavioral details like pagination or error handling, but given the tool's relative simplicity (single parameter, no nested objects), it's quite complete. The description compensates well for the missing output schema by specifying what data will be returned.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/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 fully documents the single 'query' parameter. The description adds meaningful context by explaining the three search syntax options (basic text, wildcard, exact phrase) and tying them to the examples already in the schema. This provides helpful semantic understanding beyond the schema's technical specification.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the specific action ('Search for tasks in Todoist using the search filter') and resource ('tasks'), and explicitly distinguishes this tool from its siblings by naming the three search tools and positioning this as the 'basic search (single term)' variant. This provides excellent differentiation from similar tools like search_tasks_using_and and search_tasks_using_or.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides explicit guidance on when to use this tool versus alternatives: 'This is one of three search tools: basic search (single term), AND search (all terms must match), and OR search (any term can match).' This clearly defines the specific use case for this tool (single term search) versus the other search variants, giving the agent perfect context for tool 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/bkotos/todoist-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server