UNPKG

mcp-ai-agent-guidelines

Version:

A comprehensive Model Context Protocol server providing advanced tools, resources, and prompts for implementing AI agent best practices

219 lines 9.42 kB
// Tool schemas for flow-based prompting tools import { GENERATION_TOOL_ANNOTATIONS } from "../tools/shared/annotation-presets.js"; export const promptChainingBuilderSchema = { name: "prompt-chaining-builder", description: "Use this MCP to build prompt chains with dependency-aware steps and output passing. BEST FOR: sequential workflows. Example: review → security → remediation. OUTPUTS: chain definition.", inputSchema: { type: "object", properties: { chainName: { type: "string", description: "Name of the prompt chain", examples: [ "code-review-security-remediation", "feature-plan-implement-test", "bug-analysis-fix-verify", ], }, description: { type: "string", description: "Description of what the chain accomplishes", examples: [ "Multi-stage code review with security analysis and automated remediation", "Complete feature development workflow from planning to testing", "Bug investigation, fix implementation, and verification pipeline", ], }, steps: { type: "array", items: { type: "object", properties: { name: { type: "string" }, description: { type: "string" }, prompt: { type: "string" }, outputKey: { type: "string" }, dependencies: { type: "array", items: { type: "string" }, }, errorHandling: { type: "string", enum: ["skip", "retry", "abort"], }, }, required: ["name", "prompt"], }, description: "Array of chain steps", }, context: { type: "string", description: "Global context for the chain", examples: [ "Node.js REST API with authentication", "React frontend with Redux state management", "Python microservice with PostgreSQL", ], }, globalVariables: { type: "object", description: "Global variables accessible to all steps", }, includeMetadata: { type: "boolean", description: "Include metadata section", }, includeReferences: { type: "boolean", description: "Include reference links", }, includeVisualization: { type: "boolean", description: "Include Mermaid flow visualization", }, executionStrategy: { type: "string", enum: ["sequential", "parallel-where-possible"], description: "How to execute the chain", }, }, required: ["chainName", "steps"], }, annotations: { ...GENERATION_TOOL_ANNOTATIONS, title: "Prompt Chain Builder", }, }; export const promptFlowBuilderSchema = { name: "prompt-flow-builder", description: "Use this MCP to design prompt flows with branching, loops, and parallel paths. BEST FOR: non-linear orchestration. Example: dev workflow with parallel tests. OUTPUTS: flow definition.", inputSchema: { type: "object", properties: { flowName: { type: "string", description: "Name of the prompt flow", examples: [ "feature-development-with-parallel-tests", "conditional-deployment-pipeline", "multi-environment-validation-flow", ], }, description: { type: "string", description: "Description of the flow purpose", examples: [ "Feature development workflow with parallel unit and integration tests", "Deployment pipeline with conditional approval gates based on environment", "Multi-stage validation across dev, staging, and production environments", ], }, nodes: { type: "array", items: { type: "object", properties: { id: { type: "string", description: "Unique identifier for the node", }, type: { type: "string", enum: [ "prompt", "condition", "loop", "parallel", "merge", "transform", ], description: "Node type determines required config properties", }, name: { type: "string", description: "Human-readable name for the node", }, description: { type: "string", description: "Optional description of the node's purpose", }, config: { type: "object", description: "Node configuration (type-specific requirements): " + "prompt nodes require 'prompt' property; " + "condition nodes require 'expression' property; " + "loop nodes require either 'condition' or 'iterations' property; " + "parallel, merge, and transform nodes have no required config properties", properties: { prompt: { type: "string", description: "Required for prompt nodes: the actual prompt text", }, expression: { type: "string", description: "Required for condition nodes: boolean expression to evaluate", }, condition: { type: "string", description: "Required for loop nodes (alternative to iterations): condition to evaluate for loop continuation", }, iterations: { type: "number", description: "Required for loop nodes (alternative to condition): maximum number of iterations", }, }, }, }, required: ["id", "type", "name"], }, description: "Flow nodes (processing units). Each node type has specific config requirements - see config property description for details.", }, edges: { type: "array", items: { type: "object", properties: { from: { type: "string" }, to: { type: "string" }, condition: { type: "string" }, label: { type: "string" }, }, required: ["from", "to"], }, description: "Flow edges (connections between nodes)", }, entryPoint: { type: "string", description: "ID of the starting node", examples: ["start", "initialize", "entry-point"], }, variables: { type: "object", description: "Flow-level variables", }, includeMetadata: { type: "boolean", description: "Include metadata section", }, includeReferences: { type: "boolean", description: "Include reference links", }, includeExecutionGuide: { type: "boolean", description: "Include execution guide", }, outputFormat: { type: "string", enum: ["markdown", "mermaid", "both"], description: "Output format preference", }, }, required: ["flowName", "nodes"], }, annotations: { ...GENERATION_TOOL_ANNOTATIONS, title: "Prompt Flow Builder", }, }; //# sourceMappingURL=flow-tool-schemas.js.map