Skip to main content
Glama
kingdomseed

Structured Workflow MCP

by kingdomseed

discover_workflow_tools

List available workflow guidance tools to enforce disciplined programming practices through structured development phases.

Instructions

List the workflow guidance tools provided by this MCP server

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The handler function that executes the 'discover_workflow_tools' logic, returning a comprehensive JSON object describing all available workflow tools, phases, and guidance.
    export async function handleDiscoverWorkflowTools() {
      return {
        purpose: 'This MCP server provides structured workflow guidance tools for various programming tasks',
        corePhilosophy: 'Guide, Don\'t Gate - All your existing tools remain available while we add helpful workflow guidance',
        
        criticalNote: {
          title: '⚠️ IMPORTANT: Platform-Specific Tool Names',
          description: 'Different AI platforms may add prefixes to MCP tool names!',
          details: [
            'Some platforms add prefixes like "mcp_", "mcp7_", or similar to all tool names',
            'If you get "Unknown tool" errors, check if your platform requires a prefix',
            'For example, instead of "audit_inventory_guidance", you may need to use:',
            '  - mcp_audit_inventory_guidance',
            '  - mcp7_audit_inventory_guidance',
            '  - Or another platform-specific prefix',
            'Check your platform\'s documentation or try common prefixes if unsure'
          ],
          howToCheck: 'Look at how other MCP tools are named in your environment - they likely follow the same pattern'
        },
        
        workflowTypes: {
          title: '🚀 WORKFLOW ENTRY POINTS',
          description: 'Choose the workflow that best matches your task:',
          workflows: [
            {
              name: 'refactor_workflow',
              purpose: 'Systematic code improvement without changing functionality',
              whenToUse: 'Refactoring, code cleanup, applying patterns, removing code smells',
              example: 'refactor_workflow({ task: "Extract authentication into a separate service" })',
              phases: 'AUDIT_INVENTORY → COMPARE_ANALYZE → QUESTION_DETERMINE → WRITE_OR_REFACTOR → LINT → ITERATE → PRESENT',
              keyBenefit: 'Deep understanding before changes'
            },
            {
              name: 'create_feature_workflow',
              purpose: 'Add new functionality with integrated testing',
              whenToUse: 'New features, API endpoints, UI components, modules',
              example: 'create_feature_workflow({ task: "Add user profile management" })',
              phases: 'PLANNING → QUESTION_DETERMINE → WRITE_OR_REFACTOR → TEST → LINT → ITERATE → PRESENT',
              keyBenefit: 'Built-in quality assurance'
            },
            {
              name: 'test_workflow',
              purpose: 'Focused workflow for writing or improving tests',
              whenToUse: 'Adding test coverage, writing integration tests, test improvements',
              example: 'test_workflow({ task: "Add unit tests for payment processing" })',
              phases: 'AUDIT_INVENTORY → QUESTION_DETERMINE → WRITE_TEST → RUN_TEST → ITERATE → PRESENT',
              keyBenefit: 'Systematic test development'
            },
            {
              name: 'tdd_workflow',
              purpose: 'Test-Driven Development with Red-Green-Refactor cycles',
              whenToUse: 'Building features test-first, critical business logic',
              example: 'tdd_workflow({ task: "Implement shopping cart with TDD" })',
              phases: 'PLANNING → WRITE_TEST → RUN_TEST → WRITE_CODE → RUN_TEST → REFACTOR → LINT → PRESENT',
              keyBenefit: 'Tests drive the design'
            },
            {
              name: 'build_custom_workflow',
              purpose: 'Create a custom workflow with your own phase selection',
              whenToUse: 'When predefined workflows don\'t match your needs',
              example: 'build_custom_workflow({ task: "Custom task", selectedPhases: [...] })',
              keyBenefit: 'Full control and flexibility'
            }
          ]
        },
        
        phaseGuidanceTools: {
          title: '📋 PHASE GUIDANCE TOOLS',
          description: 'Tools that guide you through each workflow phase:',
          tools: [
            {
              name: 'audit_inventory_guidance',
              purpose: 'Analyze code and catalog all needed changes',
              phase: 'AUDIT_INVENTORY'
            },
            {
              name: 'compare_analyze_guidance',
              purpose: 'Evaluate different implementation approaches',
              phase: 'COMPARE_ANALYZE'
            },
            {
              name: 'question_determine_guidance',
              purpose: 'Clarify requirements and finalize your plan',
              phase: 'QUESTION_DETERMINE'
            },
            {
              name: 'refactor_guidance',
              purpose: 'Implement changes or write code',
              phase: 'WRITE_OR_REFACTOR'
            },
            {
              name: 'test_guidance',
              purpose: 'Run and verify tests',
              phase: 'TEST'
            },
            {
              name: 'lint_guidance',
              purpose: 'Check code quality and style',
              phase: 'LINT'
            },
            {
              name: 'iterate_guidance',
              purpose: 'Fix issues found in testing or linting',
              phase: 'ITERATE'
            },
            {
              name: 'present_guidance',
              purpose: 'Summarize your work',
              phase: 'PRESENT'
            }
          ]
        },
        
        managementTools: {
          title: '🔧 WORKFLOW MANAGEMENT TOOLS',
          description: 'Tools for tracking and managing your workflow:',
          tools: [
            {
              name: 'workflow_status',
              purpose: 'Check current progress and session state',
              whenToUse: 'Any time you want to see where you are'
            },
            {
              name: 'phase_output',
              purpose: 'Record results when completing a phase',
              whenToUse: 'At the end of each phase'
            },
            {
              name: 'validate_action',
              purpose: 'Ensure actions follow safety rules',
              whenToUse: 'Automatically called for file modifications'
            },
            {
              name: 'validate_phase_completion',
              purpose: 'Check if phase requirements are met',
              whenToUse: 'Before moving to next phase'
            },
            {
              name: 'user_input_required_guidance',
              purpose: 'Handle escalations when limits are reached',
              whenToUse: 'When iteration limits or issues require user input'
            },
            {
              name: 'discover_workflow_tools',
              purpose: 'See this comprehensive tool list',
              whenToUse: 'When you need guidance on available tools'
            }
          ]
        },
        
        quickStart: {
          title: '🎯 QUICK START GUIDE',
          steps: [
            '1. Choose a workflow based on your task type',
            '2. Call the workflow tool with your task description',
            '3. Follow the phase guidance provided',
            '4. Use phase_output to record your progress',
            '5. Check workflow_status anytime to see where you are'
          ],
          example: 'refactor_workflow({ task: "Refactor user authentication to use dependency injection" })'
        },
        
        bestPractices: [
          'Choose the right workflow for your task type',
          'Follow phase guidance but adapt to your specific situation',
          'Record phase outputs to maintain clear documentation',
          'Use workflow_status to track progress',
          'Let the workflow guide you while keeping all your tools available'
        ],
        
        safetyRule: {
          rule: 'Files must be read before they can be modified',
          enforcement: 'The validate_action tool enforces this automatically',
          reason: 'Prevents accidental data loss and ensures informed changes'
        }
      };
    }
  • Tool definition including the input schema (empty object, no parameters required).
    export function createDiscoverWorkflowToolsTool(): Tool {
      return {
        name: 'discover_workflow_tools',
        description: 'List the workflow guidance tools provided by this MCP server',
        inputSchema: {
          type: 'object',
          properties: {}
        }
      };
    }
  • src/index.ts:137-157 (registration)
    Registration of the tool in the tools array for ListToolsRequestHandler.
    const tools = [
      // Workflow entry points
      createRefactorWorkflowTool(),                 // Refactoring workflow
      createFeatureWorkflowTool(),                  // Feature creation workflow
      createTestWorkflowTool(),                     // Test writing workflow
      createTddWorkflowTool(),                      // TDD workflow
      createBuildCustomWorkflowTool(),              // Custom workflow builder
      
      // Phase guidance tools
      ...createPhaseGuidanceTools(),                // Handles both suggestive and directive modes
      createTestGuidanceTool(),                     // TEST phase guidance
      
      // Validation tools
      ...createValidationTools(),                   // Both validate_action and validate_phase_completion
      
      // Workflow management
      createUserInputRequiredTool(),                // Escalation handling
      createWorkflowStatusTool(),                   // Workflow status
      createPhaseOutputTool(),                      // Phase output recording
      createDiscoverWorkflowToolsTool()             // Tool discovery
    ];
  • src/index.ts:282-288 (registration)
    Handler dispatch in the CallToolRequestHandler switch statement, calling the tool's handler function.
    case 'discover_workflow_tools':
      return {
        content: [{
          type: 'text',
          text: JSON.stringify(await handleDiscoverWorkflowTools(), null, 2)
        }]
      };
  • src/index.ts:21-21 (registration)
    Import of the tool creator and handler functions.
    import { createDiscoverWorkflowToolsTool, handleDiscoverWorkflowTools } from './tools/discoverWorkflowTools.js';
Behavior2/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. While 'List' implies a read-only operation, it doesn't specify whether this is a complete catalog, if there are rate limits, what format the output takes, or any authentication requirements. For a tool with zero annotation coverage, this leaves significant behavioral gaps.

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

Conciseness5/5

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

The description is a single, efficient sentence that gets straight to the point without any fluff. Every word serves a purpose, making it maximally concise while still conveying the core functionality.

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 zero-parameter listing tool with no output schema, the description provides the minimum viable information about what the tool does. However, given the complexity implied by 18 sibling tools and the lack of annotations, it should ideally provide more context about what 'workflow guidance tools' means and how this listing relates to the broader tool ecosystem.

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

Parameters4/5

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

The tool has zero parameters with 100% schema description coverage, so the schema already fully documents the parameter situation. The description appropriately doesn't waste space discussing non-existent parameters, earning a baseline score of 4 for not adding unnecessary information.

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 with a specific verb ('List') and resource ('workflow guidance tools'), making it immediately understandable. However, it doesn't explicitly differentiate this tool from its many siblings, which all appear to be workflow-related tools, leaving some ambiguity about its unique role.

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 provides no guidance on when to use this tool versus its 18 sibling tools. It doesn't mention any prerequisites, alternatives, or specific contexts where this listing operation is preferred over other workflow tools, leaving the agent with insufficient usage direction.

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/kingdomseed/structured-workflow-mcp'

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