Skip to main content
Glama

specs-workflow

Manage software project documentation workflow for requirements, design, and task specifications. Supports initialization, checking, skipping, confirmation, and task completion operations.

Instructions

Manage intelligent writing workflow for software project requirements, design, and task documents. Supports initialization, checking, skipping, confirmation, and task completion operations (single or batch).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathYesSpecification directory path (e.g., /Users/link/specs-mcp/batch-log-test)
actionNoOperation parameters

Implementation Reference

  • The execution handler for the 'specs-workflow' tool. Processes arguments, calls executeWorkflow helper, converts result to MCP format, and handles errors.
    async (args, _extra) => { try { // Temporarily not using progress callback, as MCP SDK type definitions may differ const onProgress = undefined; // Execute workflow const workflowResult = await executeWorkflow({ path: args.path, action: args.action }, onProgress); // Use standard MCP format converter const mcpResult = toMcpResult(workflowResult); // Return format that meets SDK requirements, including structuredContent const callToolResult: Record<string, unknown> = { content: mcpResult.content, isError: mcpResult.isError }; if (mcpResult.structuredContent !== undefined) { callToolResult.structuredContent = mcpResult.structuredContent; } // Type assertion to satisfy MCP SDK requirements return callToolResult as { content: Array<{ type: 'text'; text: string; [x: string]: unknown; }>; isError?: boolean; [x: string]: unknown; }; } catch (error) { // Error handling must also comply with MCP format return { content: [{ type: 'text' as const, text: `Execution failed: ${error instanceof Error ? error.message : String(error)}` }], isError: true }; } }
  • Input schema using Zod for validating tool parameters: path (required) and action (optional with subfields).
    const inputSchema = { path: z.string().describe('Specification directory path (e.g., /Users/link/specs-mcp/batch-log-test)'), action: z.object({ type: z.enum(['init', 'check', 'skip', 'confirm', 'complete_task']).describe('Operation type'), featureName: z.string().optional().describe('Feature name (required for init)'), introduction: z.string().optional().describe('Feature introduction (required for init)'), taskNumber: z.union([ z.string(), z.array(z.string()) ]).optional().describe('Task number(s) to mark as completed (required for complete_task). Can be a single string or an array of strings') }).optional().describe('Operation parameters') };
  • The specWorkflowTool.register function that registers the 'specs-workflow' tool with the MCP server, including name, schema, annotations, and handler.
    export const specWorkflowTool = { /** * Register tool to MCP server */ register(server: McpServer): void { server.registerTool( 'specs-workflow', { title: 'Intelligent Specification Workflow Tool', // Added title property description: 'Manage intelligent writing workflow for software project requirements, design, and task documents. Supports initialization, checking, skipping, confirmation, and task completion operations (single or batch).', inputSchema, annotations: { progressReportingHint: true, longRunningHint: true, readOnlyHint: false, // This tool modifies files idempotentHint: false // Operation is not idempotent } }, // eslint-disable-next-line @typescript-eslint/no-unused-vars async (args, _extra) => { try { // Temporarily not using progress callback, as MCP SDK type definitions may differ const onProgress = undefined; // Execute workflow const workflowResult = await executeWorkflow({ path: args.path, action: args.action }, onProgress); // Use standard MCP format converter const mcpResult = toMcpResult(workflowResult); // Return format that meets SDK requirements, including structuredContent const callToolResult: Record<string, unknown> = { content: mcpResult.content, isError: mcpResult.isError }; if (mcpResult.structuredContent !== undefined) { callToolResult.structuredContent = mcpResult.structuredContent; } // Type assertion to satisfy MCP SDK requirements return callToolResult as { content: Array<{ type: 'text'; text: string; [x: string]: unknown; }>; isError?: boolean; [x: string]: unknown; }; } catch (error) { // Error handling must also comply with MCP format return { content: [{ type: 'text' as const, text: `Execution failed: ${error instanceof Error ? error.message : String(error)}` }], isError: true }; } } ); }
  • src/index.ts:28-29 (registration)
    Invocation of specWorkflowTool.register during MCP server initialization.
    // Register tools specWorkflowTool.register(server);
Install Server

Other 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/kingkongshot/specs-workflow-mcp'

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