Skip to main content
Glama

get_next_task

Retrieve the next task in the queue for Buildable projects using the @bldbl/mcp server, enabling AI assistants to manage workflows and track progress efficiently.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The MCP tool handler and registration for 'get_next_task'. It checks client connection, calls client.getNextTask(), and returns the result as a text content block with JSON stringification.
    this.server.tool('get_next_task', {}, async () => {
      if (!this.client) {
        throw new Error('Not connected to Buildable API');
      }
    
      const nextTask = await this.client.getNextTask();
      return {
        content: [
          {
            type: 'text',
            text: JSON.stringify(nextTask, null, 2),
          },
        ],
      };
    });
  • Helper method in BuildableMCPClient that performs the actual API request to retrieve the next task from the Buildable backend.
    async getNextTask(): Promise<NextTaskResponse> {
      this.log('debug', 'Getting next recommended task...');
    
      try {
        const response = await this.makeRequest<NextTaskResponse>(
          'GET',
          `/projects/${this.config.projectId}/next-task`
        );
    
        if (response.data?.task) {
          this.log('info', `Next task: "${response.data.task.title}"`);
        } else {
          this.log('info', 'No tasks available:', response.data?.message);
        }
    
        return response.data!;
      } catch (error) {
        this.log('error', 'Failed to get next task:', error);
        throw error;
      }
    }
  • Type definition for the NextTaskResponse returned by the getNextTask method, defining the structure of the tool's output.
    export interface NextTaskResponse {
      success: boolean;
      task?: TaskSummary;
      message: string;
      context?: {
        phase: string;
        dependencies_met: boolean;
        recommended_approach: string;
        related_files: string[];
      };
    }
  • Type definition for TaskSummary, which is the core task object contained within NextTaskResponse.
    export interface TaskSummary {
      id: string;
      title: string;
      description: string;
      status: 'pending' | 'in_progress' | 'completed';
      phase: string;
      difficulty: 'easy' | 'medium' | 'hard';
      estimated_hours: number;
      technologies: string[];
      dependencies: string[];
      files_to_modify: string[];
      acceptance_criteria: string[];
    
      // AI Execution Fields for Autonomous Task Execution
      context_summary?: string; // 1-3 sentence scope for agent context
      commands?: string[]; // Shell commands for lint, tests, build
      reference_impl?: string; // Pseudocode/snippet for expected structure
      rollback_plan?: string; // How to revert if task fails
      success_checks?: string[]; // Machine-checkable assertions
      estimated_tokens?: number; // Prompt-size hint for scheduling
      skill_tags?: string[]; // Agent skill-based routing tags
    }
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