Skip to main content
Glama

find_todos

Extract TODO, FIXME, and DRAFT markers from manuscript files to track writing tasks and identify areas needing attention in your project.

Instructions

Extract all TODO/FIXME/DRAFT markers

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
project_pathNoPath to manuscript directory (defaults to current directory)
scopeNoFile scope pattern
markersNoMarkers to search for
group_byNoGrouping method
limitNoMaximum results

Implementation Reference

  • The primary MCP tool handler for 'find_todos'. Extracts parameters from args (scope, markers, groupBy, limit with pagination), then calls WritersAid.findTodos.
    private async findTodos(args: Record<string, unknown>) {
      const scope = args.scope as string | undefined;
      const markers = args.markers as string[] | undefined;
      const groupBy = args.group_by as "file" | "priority" | "marker" | undefined;
      const limit = resolvePaginationLimit("find_todos", args.limit as number | undefined);
    
      return this.writersAid.findTodos({ scope, markers, groupBy, limit });
    }
  • JSON schema defining the input parameters and structure for the 'find_todos' tool.
    name: "find_todos",
    description: "Extract all TODO/FIXME/DRAFT markers",
    inputSchema: {
      type: "object",
      properties: {
        project_path: { type: "string", description: "Path to manuscript directory (defaults to current directory)" },
        scope: { type: "string", description: "File scope pattern" },
        markers: {
          type: "array",
          items: { type: "string" },
          description: "Markers to search for",
        },
        group_by: {
          type: "string",
          enum: ["file", "priority", "marker"],
          description: "Grouping method",
        },
        limit: { type: "number", description: "Maximum results", default: 50 },
      },
    },
  • Dispatch registration in the central handleTool switch statement that maps tool name 'find_todos' to its handler method.
    case "find_todos":
      return this.findTodos(args);
  • Core helper function that implements TODO extraction logic: scans all file lines with regex for markers, extracts text and line numbers, assigns priority, and applies pagination.
    async findTodos(options: {
      scope?: string;
      markers?: string[];
      groupBy?: "file" | "priority" | "marker";
      limit?: number;
    }): Promise<TodoItem[]> {
      const { markers = ["TODO", "FIXME", "HACK", "XXX", "DRAFT", "WIP"], limit } = options;
    
      const files = await this.storage.getAllFiles();
      const todos: TodoItem[] = [];
    
      for (const file of files) {
        const lines = file.content.split("\n");
    
        for (let i = 0; i < lines.length; i++) {
          const line = lines[i];
    
          for (const marker of markers) {
            const regex = new RegExp(`\\b${marker}\\b:?\\s*(.*)`, "i");
            const match = line.match(regex);
    
            if (match) {
              todos.push({
                file: file.file_path,
                line: i + 1,
                marker,
                text: match[1] || "",
                priority: this.determinePriority(marker),
              });
            }
          }
        }
      }
    
      return paginateResults(todos, limit);
    }
Behavior2/5

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

With no annotations provided, the description carries full burden but offers minimal behavioral context. It mentions extraction but doesn't disclose how results are returned, whether the operation is read-only, performance characteristics, or error conditions. For a tool with 5 parameters and no output schema, this is inadequate behavioral disclosure.

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 concise - a single sentence that states the core purpose without any wasted words. It's front-loaded with the essential information and earns its place efficiently.

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 tool with 5 parameters, no annotations, and no output schema, the description is incomplete. It doesn't explain what the tool returns, how results are structured, or provide behavioral context needed for proper invocation. The conciseness comes at the expense of necessary completeness.

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 all parameters thoroughly. The description adds no additional parameter semantics beyond what's in the schema. The baseline of 3 is appropriate when the schema does all the parameter documentation work.

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 tool's purpose: 'Extract all TODO/FIXME/DRAFT markers' - a specific verb ('extract') and resource ('markers'). It distinguishes from siblings by focusing on marker extraction rather than other analysis tasks like 'find_broken_links' or 'find_duplicates', though it doesn't explicitly differentiate from similar tools like 'search_content'.

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 on when to use this tool versus alternatives is provided. The description doesn't mention context, prerequisites, or exclusions. Given the many sibling tools for content analysis, this represents a significant gap in helping the agent choose appropriately.

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/xiaolai/claude-writers-aid-mcp'

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