feat: complete modular documentation system for all MCP tools (#60)

- Migrated all 40 MCP tools documentation to modular structure
- Created comprehensive documentation with both essentials and full details
- Organized tools by category: discovery, configuration, validation, templates, workflow_management, system, special
- Fixed all TODO placeholders with informative, precise content
- Each tool now has concise description, key tips, and full documentation
- Improved documentation quality: 30-40% more concise while maintaining usefulness
- Fixed TypeScript compilation issues and removed orphaned content
- All tools accessible via tools_documentation MCP endpoint
- Build successful with zero errors

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
czlonkowski
2025-07-17 18:39:29 +02:00
parent 8025d31e63
commit c1a6347d4f
53 changed files with 2744 additions and 1322 deletions

View File

@@ -0,0 +1,71 @@
import { ToolDocumentation } from '../types';
export const n8nValidateWorkflowDoc: ToolDocumentation = {
name: 'n8n_validate_workflow',
category: 'workflow_management',
essentials: {
description: 'Validate workflow from n8n instance by ID - checks nodes, connections, expressions, and returns errors/warnings',
keyParameters: ['id'],
example: 'n8n_validate_workflow({id: "wf_abc123"})',
performance: 'Network-dependent (100-500ms) - fetches and validates workflow',
tips: [
'Use options.profile to control validation strictness (minimal/runtime/ai-friendly/strict)',
'Validation includes node configs, connections, and n8n expression syntax',
'Returns categorized errors, warnings, and actionable fix suggestions'
]
},
full: {
description: `Validates a workflow stored in your n8n instance by fetching it via API and running comprehensive validation checks. This tool:
- Fetches the workflow from n8n using the workflow ID
- Validates all node configurations based on their schemas
- Checks workflow connections and data flow
- Validates n8n expression syntax in all fields
- Returns categorized issues with fix suggestions
The validation uses the same engine as validate_workflow but works with workflows already in n8n, making it perfect for validating existing workflows before execution.
Requires N8N_API_URL and N8N_API_KEY environment variables to be configured.`,
parameters: {
id: {
type: 'string',
required: true,
description: 'The workflow ID to validate from your n8n instance'
},
options: {
type: 'object',
required: false,
description: 'Validation options: {validateNodes: bool (default true), validateConnections: bool (default true), validateExpressions: bool (default true), profile: "minimal"|"runtime"|"ai-friendly"|"strict" (default "runtime")}'
}
},
returns: 'ValidationResult object containing isValid boolean, arrays of errors/warnings, and suggestions for fixes',
examples: [
'n8n_validate_workflow({id: "wf_abc123"}) - Validate with default settings',
'n8n_validate_workflow({id: "wf_abc123", options: {profile: "strict"}}) - Strict validation',
'n8n_validate_workflow({id: "wf_abc123", options: {validateExpressions: false}}) - Skip expression validation'
],
useCases: [
'Validating workflows before running them in production',
'Checking imported workflows for compatibility',
'Debugging workflow execution failures',
'Ensuring workflows follow best practices',
'Pre-deployment validation in CI/CD pipelines'
],
performance: 'Depends on workflow size and API latency. Typically 100-500ms for medium workflows.',
bestPractices: [
'Run validation before activating workflows in production',
'Use "runtime" profile for pre-execution checks',
'Use "strict" profile for code review and best practices',
'Fix errors before warnings - errors will likely cause execution failures',
'Pay attention to expression validation - syntax errors are common'
],
pitfalls: [
'Requires valid API credentials - check n8n_health_check first',
'Large workflows may take longer to validate',
'Some warnings may be intentional (e.g., optional parameters)',
'Profile affects validation time - strict is slower but more thorough',
'Expression validation may flag working but non-standard syntax'
],
relatedTools: ['validate_workflow', 'n8n_get_workflow', 'validate_workflow_expressions', 'n8n_health_check']
}
};