Skip to main content
Glama
MAG-Cie

MCP for Microsoft To Do

search_tasks

Read-only

Searches for a specified term in task titles across all Microsoft To Do lists. Returns matching tasks with options to include completed tasks and control result count.

Instructions

Search a term in the titles of tasks across ALL lists (case-sensitive). By default excludes completed tasks.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
queryYes
top_per_listNo
include_completedNo
verboseNoIf true: returns full JSON. Otherwise: compact text format (default, saves tokens).

Implementation Reference

  • The core handler function `searchTasks` that executes the tool logic. It searches a term in titles of non-completed tasks across all lists, using $filter contains() on the Graph API.
    export async function searchTasks(
      query: string,
      opts: { topPerList?: number; includeCompleted?: boolean } = {}
    ): Promise<SearchResult[]> {
      const lists = await listTaskLists();
      const escaped = query.replace(/'/g, "''");
      const filterParts = [`contains(title,'${escaped}')`];
      if (!opts.includeCompleted) filterParts.push("status ne 'completed'");
      const filter = filterParts.join(" and ");
    
      const perList = await fetchTasksAcrossLists(lists, {
        filter,
        top: opts.topPerList ?? 25,
      });
      return perList.flatMap(({ list, tasks }) =>
        tasks.map((task) => ({
          list: { id: list.id, displayName: list.displayName },
          task,
        }))
      );
    }
  • Zod schema for 'search_tasks' input validation. Defines: query (required string), top_per_list (positive int, max 100), include_completed (boolean), and verbose field.
    search_tasks: z.object({
      query: z.string().min(1),
      top_per_list: z.number().int().positive().max(100).optional(),
      include_completed: z.boolean().optional(),
      ...verboseField,
    }),
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already provide readOnlyHint and openWorldHint. The description adds value by specifying case-sensitive search and default exclusion of completed tasks, which are not evident from annotations. This enhances the agent's understanding of the tool's behavior.

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?

Two concise sentences, front-loaded with key action and scope. Every word adds value—no fluff. The structure efficiently conveys the core function and a key behavioral nuance.

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?

Given the read-only, open-world annotations and four parameters with no output schema, the description covers essential aspects: search scope, case-sensitivity, default filter. It omits details like default values for top_per_list or return format, but the 'verbose' parameter schema partially covers that. Overall sufficient for an agent to use correctly.

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

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The input schema has 25% description coverage. The description partially compensates by mentioning case-sensitivity (query) and default exclusion (include_completed), but does not describe top_per_list or verbose beyond the schema's own 'verbose' description. More explicit parameter mapping would help.

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 tool searches a term in task titles across all lists, with specific behavioral details (case-sensitive, default exclude completed). This distinguishes it from sibling tools like list_all_tasks or list_tasks_by_category, which are for listing or filtering, not searching by term.

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

Usage Guidelines4/5

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

The description explains the default behavior (exclude completed) and scope (across all lists), giving agents context on when to use this tool. However, it lacks explicit guidance on when not to use it or direct comparison to alternatives like list_all_tasks or search within a single list.

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/MAG-Cie/mcp-microsoft-todo'

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