Skip to main content
Glama

infer_task_progress

Analyze codebase changes to infer task completion status, tracking progress through file modifications and implementation evidence. Configure directory depth, file types, and confidence thresholds for accurate task updates.

Instructions

Analyze the codebase to infer which tasks appear to be completed based on code changes, file creation, and implementation evidence. Intelligent progress inference to automatically track task completion from code analysis.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
autoUpdateTasksNoWhether to automatically update task status based on inference
confidenceThresholdNoConfidence threshold for auto-updating tasks (0-1)
fileExtensionsNoFile extensions to analyze
projectIdNoFilter analysis to a specific project
scanDepthNoDirectory depth to scan for code files
workingDirectoryYesThe full absolute path to the working directory where data is stored. MUST be an absolute path, never relative. Windows: "C:\Users\username\project" or "D:\projects\my-app". Unix/Linux/macOS: "/home/username/project" or "/Users/username/project". Do NOT use: ".", "..", "~", "./folder", "../folder" or any relative paths. Ensure the path exists and is accessible before calling this tool. NOTE: When server is started with --claude flag, this parameter is ignored and a global user directory is used instead.

Implementation Reference

  • The main handler function that executes the infer_task_progress tool logic. It retrieves incomplete tasks, scans the codebase for relevant files, analyzes evidence of task completion using keyword matching, file patterns, recent modifications, and tests, optionally auto-updates task statuses, and generates a detailed progress inference report.
    handler: async (args: any) => {
      try {
        const {
          workingDirectory,
          projectId,
          scanDepth,
          fileExtensions,
          autoUpdateTasks,
          confidenceThreshold
        } = args;
    
        // Get tasks to analyze
        let tasksToAnalyze: Task[] = [];
        if (projectId) {
          tasksToAnalyze = await storage.getTasks(projectId);
        } else {
          const projects = await storage.getProjects();
          for (const project of projects) {
            const projectTasks = await storage.getTasks(project.id);
            tasksToAnalyze.push(...projectTasks);
          }
        }
    
        // Filter out already completed tasks
        const incompleteTasks = tasksToAnalyze.filter(task =>
          !task.completed && task.status !== 'done'
        );
    
        if (incompleteTasks.length === 0) {
          return {
            content: [{
              type: 'text' as const,
              text: projectId
                ? `No incomplete tasks found in the specified project.`
                : `No incomplete tasks found across all projects.`
            }]
          };
        }
    
        // Scan codebase
        const codebaseFiles = await scanCodebase(workingDirectory, scanDepth, fileExtensions);
    
        // Analyze each task for completion evidence
        const analysisResults = await analyzeTaskCompletion(
          incompleteTasks,
          codebaseFiles,
          workingDirectory
        );
    
        // Auto-update tasks if requested
        let updatedTasks: Task[] = [];
        if (autoUpdateTasks) {
          updatedTasks = await autoUpdateTaskStatus(
            storage,
            analysisResults,
            confidenceThreshold
          );
        }
    
        // Generate progress inference report
        const report = generateProgressInferenceReport(
          analysisResults,
          updatedTasks,
          autoUpdateTasks,
          confidenceThreshold
        );
    
        return {
          content: [{
            type: 'text' as const,
            text: report
          }]
        };
    
      } catch (error) {
        return {
          content: [{
            type: 'text' as const,
            text: `Error inferring task progress: ${error instanceof Error ? error.message : 'Unknown error'}`
          }],
          isError: true
        };
      }
    }
  • Zod input schema defining the parameters for the tool: workingDirectory, projectId, scanDepth, fileExtensions, autoUpdateTasks, and confidenceThreshold.
    inputSchema: z.object({
      workingDirectory: z.string().describe(getWorkingDirectoryDescription(config)),
      projectId: z.string().optional().describe('Filter analysis to a specific project'),
      scanDepth: z.number().min(1).max(5).optional().default(3).describe('Directory depth to scan for code files'),
      fileExtensions: z.array(z.string()).optional().default(['.js', '.ts', '.jsx', '.tsx', '.py', '.java', '.cs', '.go', '.rs']).describe('File extensions to analyze'),
      autoUpdateTasks: z.boolean().optional().default(false).describe('Whether to automatically update task status based on inference'),
      confidenceThreshold: z.number().min(0).max(1).optional().default(0.7).describe('Confidence threshold for auto-updating tasks (0-1)')
    }),
  • Factory function that creates the tool object for 'infer_task_progress', including name, description, inputSchema, and handler. This is how the tool is defined and can be registered in the MCP tools system.
    export function createProgressInferenceTool(storage: Storage, getWorkingDirectoryDescription: (config: any) => string, config: any) {
      return {
        name: 'infer_task_progress',
        description: 'Analyze the codebase to infer which tasks appear to be completed based on code changes, file creation, and implementation evidence. Intelligent progress inference feature for automatic task completion tracking.',
        inputSchema: z.object({
          workingDirectory: z.string().describe(getWorkingDirectoryDescription(config)),
          projectId: z.string().optional().describe('Filter analysis to a specific project'),
          scanDepth: z.number().min(1).max(5).optional().default(3).describe('Directory depth to scan for code files'),
          fileExtensions: z.array(z.string()).optional().default(['.js', '.ts', '.jsx', '.tsx', '.py', '.java', '.cs', '.go', '.rs']).describe('File extensions to analyze'),
          autoUpdateTasks: z.boolean().optional().default(false).describe('Whether to automatically update task status based on inference'),
          confidenceThreshold: z.number().min(0).max(1).optional().default(0.7).describe('Confidence threshold for auto-updating tasks (0-1)')
        }),
        handler: async (args: any) => {
          try {
            const {
              workingDirectory,
              projectId,
              scanDepth,
              fileExtensions,
              autoUpdateTasks,
              confidenceThreshold
            } = args;
    
            // Get tasks to analyze
            let tasksToAnalyze: Task[] = [];
            if (projectId) {
              tasksToAnalyze = await storage.getTasks(projectId);
            } else {
              const projects = await storage.getProjects();
              for (const project of projects) {
                const projectTasks = await storage.getTasks(project.id);
                tasksToAnalyze.push(...projectTasks);
              }
            }
    
            // Filter out already completed tasks
            const incompleteTasks = tasksToAnalyze.filter(task =>
              !task.completed && task.status !== 'done'
            );
    
            if (incompleteTasks.length === 0) {
              return {
                content: [{
                  type: 'text' as const,
                  text: projectId
                    ? `No incomplete tasks found in the specified project.`
                    : `No incomplete tasks found across all projects.`
                }]
              };
            }
    
            // Scan codebase
            const codebaseFiles = await scanCodebase(workingDirectory, scanDepth, fileExtensions);
    
            // Analyze each task for completion evidence
            const analysisResults = await analyzeTaskCompletion(
              incompleteTasks,
              codebaseFiles,
              workingDirectory
            );
    
            // Auto-update tasks if requested
            let updatedTasks: Task[] = [];
            if (autoUpdateTasks) {
              updatedTasks = await autoUpdateTaskStatus(
                storage,
                analysisResults,
                confidenceThreshold
              );
            }
    
            // Generate progress inference report
            const report = generateProgressInferenceReport(
              analysisResults,
              updatedTasks,
              autoUpdateTasks,
              confidenceThreshold
            );
    
            return {
              content: [{
                type: 'text' as const,
                text: report
              }]
            };
    
          } catch (error) {
            return {
              content: [{
                type: 'text' as const,
                text: `Error inferring task progress: ${error instanceof Error ? error.message : 'Unknown error'}`
              }],
              isError: true
            };
          }
        }
      };
    }
Behavior2/5

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

With no annotations provided, the description carries full burden for behavioral disclosure. It mentions 'intelligent progress inference' and 'automatically track task completion,' which suggests it performs analysis and potentially updates tasks, but doesn't specify whether this is a read-only analysis or includes write operations, what permissions are needed, how long it takes, or error conditions. For a tool with 6 parameters and no annotations, this leaves significant behavioral gaps.

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

Conciseness4/5

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

The description is appropriately concise with two sentences that efficiently convey the core functionality. The first sentence states the purpose clearly, and the second adds value by emphasizing the intelligent inference aspect. There's no wasted verbiage, though it could be slightly more structured with explicit usage context.

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 6 parameters, no annotations, and no output schema, the description is insufficiently complete. It doesn't explain what the tool returns (inference results, task updates, confidence scores), how to interpret results, or error handling. The description focuses only on what the tool does operationally, leaving the agent without enough context to use it effectively in a broader workflow.

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 description mentions analyzing 'code changes, file creation, and implementation evidence' which provides context for what the tool examines, but doesn't directly explain any of the 6 parameters. With 100% schema description coverage, the schema already documents all parameters thoroughly, so the description adds minimal value beyond the schema. The baseline of 3 is appropriate when the schema does the heavy lifting.

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 analyzes a codebase to infer task completion based on code changes, file creation, and implementation evidence. It specifies the verb 'analyze' and resource 'codebase' with the specific purpose of 'intelligent progress inference.' However, it doesn't explicitly differentiate from sibling tools like 'analyze_task_complexity' or 'get_next_task_recommendation,' which prevents a perfect score.

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?

The description provides no guidance on when to use this tool versus alternatives. With sibling tools like 'analyze_task_complexity,' 'get_next_task_recommendation,' and various task management tools, there's no indication of when this inference approach is preferred over manual updates or other analysis methods. The description only states what it does, not when to use it.

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

Related 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/Pimzino/agentic-tools-mcp'

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