Skip to main content
Glama

Intelligent Specification Workflow Tool

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);
Behavior3/5

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

Annotations indicate this is not read-only and not idempotent, which the description doesn't contradict. The description adds some behavioral context by specifying the workflow domain and batch/single operation support, but doesn't elaborate on side effects, error conditions, or what 'intelligent' means operationally. With annotations covering basic safety, this earns a baseline score.

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

Conciseness4/5

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

The description is efficiently structured in two sentences: first establishes the domain and purpose, second enumerates operations. No wasted words, though it could be slightly more front-loaded with the core purpose.

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

Completeness3/5

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

For a tool with 100% schema coverage and annotations, the description provides adequate context about the workflow domain and operation types. However, without an output schema and with multiple complex operations, it should ideally explain what results to expect from different actions. The description is minimally complete but lacks operational guidance.

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

Parameters3/5

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

Schema description coverage is 100%, providing complete parameter documentation. The description mentions 'single or batch' operations which hints at the taskNumber parameter's array capability, but doesn't add meaningful semantic context beyond what the schema already explains. Baseline score applies when schema does the heavy lifting.

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

Purpose4/5

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

The description clearly states the tool's purpose: 'Manage intelligent writing workflow for software project requirements, design, and task documents.' It specifies the resource (writing workflow) and the operations supported (initialization, checking, skipping, confirmation, task completion). However, without sibling tools, it cannot demonstrate differentiation from alternatives.

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

Usage Guidelines2/5

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

The description lists the operations supported but provides no guidance on when to use each operation type, what prerequisites exist, or contextual factors that should influence selection. It merely enumerates capabilities without offering usage advice.

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

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