Skip to main content
Glama

verify_task

Validate task completion by checking if all requirements and technical standards are fully met, using a unique task ID to ensure accuracy and completeness.

Instructions

Comprehensively verify task completion, ensuring all requirements and technical standards are met without missing details

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
taskIdYesUnique identifier of the task to verify, must be an existing valid task ID in the system

Implementation Reference

  • Main execution logic for verify_task tool: fetches task by ID, validates status is IN_PROGRESS, generates and returns verification prompt.
    export async function verifyTask({ taskId }: z.infer<typeof verifyTaskSchema>) { const task = await getTaskById(taskId); if (!task) { return { content: [ { type: "text" as const, text: `## System Error\n\nTask with ID \`${taskId}\` not found. Please use the "list_tasks" tool to confirm a valid task ID before trying again.`, }, ], isError: true, }; } if (task.status !== TaskStatus.IN_PROGRESS) { return { content: [ { type: "text" as const, text: `## Status Error\n\nTask "${task.name}" (ID: \`${task.id}\`) current status is "${task.status}", not in progress state, cannot be verified.\n\nOnly tasks in "in progress" state can be verified. Please use the "execute_task" tool to start task execution first.`, }, ], isError: true, }; } // Use prompt generator to get the final prompt const prompt = getVerifyTaskPrompt({ task }); return { content: [ { type: "text" as const, text: prompt, }, ], }; }
  • Zod schema defining input for verify_task: requires taskId as UUID string.
    export const verifyTaskSchema = z.object({ taskId: z .string() .uuid({ message: "Invalid task ID format, please provide a valid UUID format" }) .describe("Unique identifier of the task to verify, must be an existing valid task ID in the system"), });
  • src/index.ts:269-275 (registration)
    Tool registration in ListToolsRequest handler: defines name, description from template, and converts schema to JSON schema.
    { name: "verify_task", description: loadPromptFromTemplate( "toolsDescription/verifyTask.md" ), inputSchema: zodToJsonSchema(verifyTaskSchema), },
  • src/index.ts:459-472 (registration)
    Dispatch handler in CallToolRequest switch: parses arguments with schema, saves to history if enabled, calls verifyTask function.
    case "verify_task": parsedArgs = await verifyTaskSchema.safeParseAsync( request.params.arguments ); if (!parsedArgs.success) { throw new Error( `Invalid arguments for tool ${request.params.name}: ${parsedArgs.error.message}` ); } taskId = parsedArgs.data.taskId; await saveRequest(); result = await verifyTask(parsedArgs.data); await saveResponse(result); return result;
  • Helper function to generate the verification prompt using task details and templates.
    export function getVerifyTaskPrompt(params: VerifyTaskPromptParams): string { const { task } = params; const indexTemplate = loadPromptFromTemplate("verifyTask/index.md"); const prompt = generatePrompt(indexTemplate, { name: task.name, id: task.id, description: task.description, notes: task.notes || "no notes", verificationCriteria: task.verificationCriteria || "no verification criteria", implementationGuideSummary: extractSummary(task.implementationGuide, 200) || "no implementation guide", analysisResult: extractSummary(task.analysisResult, 300) || "no analysis result", }); // Load possible custom prompt return loadPrompt(prompt, "VERIFY_TASK"); }

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/liorfranko/mcp-chain-of-thought'

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