Skip to main content
Glama

π“‚€π“’π“‹Ήπ”Έβ„•π•Œπ”Ήπ•€π•Šπ“‹Ήπ“’π“‚€ - Intelligent Guidance for

by Hive-Academy

get_step_progress

Track and retrieve detailed progress summaries for specific tasks using a task ID. Optional role ID filtering enhances task management and focus.

Instructions

Get focused step progress summary for a task.

Input Schema

NameRequiredDescriptionDefault
idYesTask ID for progress query
roleIdNoOptional role ID filter

Input Schema (JSON Schema)

{ "$schema": "http://json-schema.org/draft-07/schema#", "additionalProperties": false, "properties": { "id": { "description": "Task ID for progress query", "type": "number" }, "roleId": { "description": "Optional role ID filter", "type": "string" } }, "required": [ "id" ], "type": "object" }

Implementation Reference

  • The main handler function for the 'get_step_progress' MCP tool. It fetches execution details, step progress records, computes progress metrics, and returns a structured response with current step status, progress percentage, and summary of last completed step.
    async getStepProgress(input: GetStepProgressInput) { try { // βœ… CRITICAL FIX: Use executionId for progress tracking instead of taskId const executionResult = await this.workflowExecutionOperationsService.getExecution({ executionId: input.executionId, }); if (!executionResult.execution) { return this.buildResponse({ executionId: input.executionId, status: 'no_execution', error: 'No execution found for provided executionId', }); } const execution = executionResult.execution; // Get only essential step progress data const stepProgressRepository = this.stepExecutionService['stepProgressRepository']; const stepProgressRecords = await stepProgressRepository.findByExecutionId(input.executionId); // Count completed steps and get most recent const completedSteps = stepProgressRecords.filter( (record) => record.status === 'COMPLETED', ); const mostRecentStep = completedSteps[0] || null; const currentStep = execution.currentStep; const currentRole = execution.currentRole; return this.buildResponse({ executionId: input.executionId, taskId: execution.taskId, status: execution.completedAt ? 'completed' : 'in_progress', // Current execution state currentStep: { id: currentStep?.id, name: currentStep?.name || 'No current step', status: execution.completedAt ? 'completed' : 'active', roleId: execution.currentRoleId, roleName: currentRole?.name || 'Unknown', }, // Essential progress metrics progress: { stepsCompleted: completedSteps.length || execution.stepsCompleted || 0, progressPercentage: execution.progressPercentage || 0, totalSteps: execution.totalSteps || 0, }, // Minimal execution context executionContext: { phase: (execution.executionState as any)?.phase || 'unknown', executionMode: execution.executionMode, startedAt: execution.startedAt, completedAt: execution.completedAt, }, // Essential summary only summary: { totalStepsCompleted: completedSteps.length, lastCompletedStep: mostRecentStep ? { stepName: mostRecentStep.step?.name || 'Unknown', roleName: mostRecentStep.role?.name || 'Unknown', completedAt: mostRecentStep.completedAt, summary: (mostRecentStep.executionData as any)?.outputSummary || 'No summary available', } : null, isReady: Boolean(currentStep && !execution.completedAt), }, }); } catch (error) { return this.buildErrorResponse( 'Failed to get step progress', getErrorMessage(error), 'STEP_PROGRESS_ERROR', ); } }
  • Registration of the 'get_step_progress' tool using the @Tool decorator, specifying name, description, and input schema.
    @Tool({ name: 'get_step_progress', description: `Get concise step progress focused on essential status information for workflow continuation.`, parameters: GetStepProgressInputSchema as ZodSchema<GetStepProgressInput>, })
  • Zod schema definition for the input parameters of the get_step_progress tool (executionId required, roleId optional) and its TypeScript type inference.
    const GetStepProgressInputSchema = z.object({ executionId: z.string().describe('Execution ID for progress query'), roleId: z.string().optional().describe('Optional role ID filter'), }); type GetStepGuidanceInput = z.infer<typeof GetStepGuidanceInputSchema>; type ReportStepCompletionInput = z.infer< typeof ReportStepCompletionInputSchema >; type GetStepProgressInput = z.infer<typeof GetStepProgressInputSchema>;

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/Hive-Academy/Anubis-MCP'

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