Skip to main content
Glama
aafsar

Task Manager MCP Server

by aafsar

search_tasks

Find tasks by searching titles or descriptions to locate specific items in your task management system.

Instructions

Search tasks by title or description

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
queryYesSearch query

Implementation Reference

  • The core handler function for the 'search_tasks' tool. It validates input using SearchSchema, loads all tasks, filters those matching the query in title or description (case-insensitive), and returns formatted results or a 'no matches' message.
    export async function searchTasks(args: unknown) {
      // Validate input
      const validated = SearchSchema.parse(args);
    
      // Load tasks
      const storage = await loadTasks();
      const query = validated.query.toLowerCase();
    
      // Search in title and description
      const matchingTasks = storage.tasks.filter(
        (t) =>
          t.title.toLowerCase().includes(query) ||
          (t.description && t.description.toLowerCase().includes(query))
      );
    
      if (matchingTasks.length === 0) {
        return {
          content: [
            {
              type: "text",
              text: `No tasks found matching "${validated.query}".`,
            },
          ],
        };
      }
    
      // Format results
      let result = `🔍 Found ${matchingTasks.length} task(s) matching "${validated.query}":\n\n`;
      matchingTasks.forEach((task) => {
        result += formatTask(task) + "\n";
      });
    
      return {
        content: [
          {
            type: "text",
            text: result,
          },
        ],
      };
    }
  • src/index.ts:156-170 (registration)
    Tool registration in the TOOLS array, including name, description, and inputSchema for MCP tool listing.
    {
      name: "search_tasks",
      description: "Search tasks by title or description",
      inputSchema: {
        type: "object",
        properties: {
          query: {
            type: "string",
            description: "Search query",
            minLength: 1,
          },
        },
        required: ["query"],
      },
    },
  • src/index.ts:230-231 (registration)
    Dispatch in the switch statement for handling 'search_tasks' tool calls, invoking the searchTasks handler.
    case "search_tasks":
      return await searchTasks(args);
  • Internal Zod schema used by the handler for input validation.
    export const SearchSchema = z.object({
      query: z.string().min(1, "Search query is required"),
    });
Behavior2/5

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

With no annotations provided, the description carries the full burden but only states the basic function. It lacks details on behavioral traits such as permissions needed, rate limits, response format, pagination, or whether it's read-only (implied but not confirmed).

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 a single, efficient sentence with no wasted words, clearly front-loading the purpose. It is appropriately sized for the tool's complexity.

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

Completeness2/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 is incomplete. It lacks details on return values, error handling, or behavioral context, leaving significant gaps for an AI agent to understand full usage.

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?

Schema description coverage is 100%, so the schema already documents the 'query' parameter. The description adds minimal value by implying the query searches 'title or description', but does not provide additional syntax, examples, or constraints beyond the schema.

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

Purpose4/5

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

The description clearly states the action ('search') and resource ('tasks'), with the scope 'by title or description' providing specificity. It distinguishes from siblings like 'list_tasks' by implying filtering, though not explicitly contrasting them.

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

Usage Guidelines2/5

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

No guidance is provided on when to use this tool versus alternatives like 'list_tasks' or other siblings. The description implies a search function but does not specify contexts, prerequisites, or exclusions for usage.

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/aafsar/task-manager-mcp-server'

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