Skip to main content
Glama

complete_task

Mark tasks as completed by specifying task ID, adding completion notes, listing modified files, and tracking time spent. Integrates with Buildable projects via MCP for streamlined task management.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
completion_notesYesNotes about task completion
documentation_updatedNoWhether documentation was updated
files_modifiedNoList of files that were modified
task_idYesThe ID of the task to complete
testing_completedNoWhether testing was completed
time_spentNoTotal time spent in minutes

Implementation Reference

  • src/cli.ts:162-213 (registration)
    MCP tool registration for 'complete_task' using McpServer.tool(), including inline Zod input schema and async handler function.
    this.server.tool(
      'complete_task',
      {
        task_id: z.string().describe('The ID of the task to complete'),
        completion_notes: z.string().describe('Notes about task completion'),
        files_modified: z
          .array(z.string())
          .optional()
          .describe('List of files that were modified'),
        testing_completed: z
          .boolean()
          .optional()
          .describe('Whether testing was completed'),
        documentation_updated: z
          .boolean()
          .optional()
          .describe('Whether documentation was updated'),
        time_spent: z
          .number()
          .optional()
          .describe('Total time spent in minutes'),
      },
      async ({
        task_id,
        completion_notes,
        files_modified,
        testing_completed,
        documentation_updated,
        time_spent,
      }) => {
        if (!this.client) {
          throw new Error('Not connected to Buildable API');
        }
    
        const result = await this.client.completeTask(task_id, {
          completion_notes,
          files_modified: files_modified || [],
          testing_completed: testing_completed || false,
          documentation_updated: documentation_updated || false,
          time_spent: time_spent || 0,
        });
    
        return {
          content: [
            {
              type: 'text',
              text: JSON.stringify(result, null, 2),
            },
          ],
        };
      }
    );
  • Handler function that executes the complete_task tool logic: checks client connection, calls BuildableMCPClient.completeTask API method, formats result as MCP content response.
    async ({
      task_id,
      completion_notes,
      files_modified,
      testing_completed,
      documentation_updated,
      time_spent,
    }) => {
      if (!this.client) {
        throw new Error('Not connected to Buildable API');
      }
    
      const result = await this.client.completeTask(task_id, {
        completion_notes,
        files_modified: files_modified || [],
        testing_completed: testing_completed || false,
        documentation_updated: documentation_updated || false,
        time_spent: time_spent || 0,
      });
    
      return {
        content: [
          {
            type: 'text',
            text: JSON.stringify(result, null, 2),
          },
        ],
      };
    }
  • Zod schema defining the input parameters for the complete_task MCP tool.
    {
      task_id: z.string().describe('The ID of the task to complete'),
      completion_notes: z.string().describe('Notes about task completion'),
      files_modified: z
        .array(z.string())
        .optional()
        .describe('List of files that were modified'),
      testing_completed: z
        .boolean()
        .optional()
        .describe('Whether testing was completed'),
      documentation_updated: z
        .boolean()
        .optional()
        .describe('Whether documentation was updated'),
      time_spent: z
        .number()
        .optional()
        .describe('Total time spent in minutes'),
    },
  • Supporting client method BuildableMCPClient.completeTask that performs the actual HTTP POST request to the Buildable API to complete the task.
    async completeTask(
      taskId: string,
      completion: CompleteTaskRequest
    ): Promise<CompleteTaskResponse> {
      this.log('debug', `Completing task ${taskId}...`);
    
      try {
        const response = await this.makeRequest<CompleteTaskResponse>(
          'POST',
          `/tasks/${taskId}/complete`,
          {
            files_created: completion.files_modified,
            files_modified: completion.files_modified,
            completion_notes: completion.completion_notes,
            time_spent_minutes: completion.time_spent,
            verification_evidence: completion.testing_completed
              ? 'Tests passed'
              : undefined,
          }
        );
    
        this.log('info', `Successfully completed task ${taskId}`);
    
        // Update connection status back to 'connected'
        await this.updateConnectionStatus('connected');
    
        return response.data!;
      } catch (error) {
        this.log('error', `Failed to complete task ${taskId}:`, error);
        throw error;
      }
    }
  • TypeScript interface CompleteTaskRequest defining the structure for task completion data used by the client method.
    export interface CompleteTaskRequest {
      completion_notes: string;
      files_modified: string[];
      testing_completed: boolean;
      documentation_updated: boolean;
      time_spent: number; // minutes
      challenges_faced?: string[];
      lessons_learned?: string[];
      next_recommendations?: string[];
    }
Behavior1/5

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

Tool has no description.

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

Conciseness1/5

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

Tool has no description.

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

Completeness1/5

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

Tool has no description.

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

Parameters1/5

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

Tool has no description.

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

Purpose1/5

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

Tool has no description.

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

Usage Guidelines1/5

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

Tool has no description.

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/chunkydotdev/bldbl-mcp'

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