- Add get_node_essentials tool for 10-20 essential properties only - Add search_node_properties for targeted property search - Add get_node_for_task with 14 pre-configured templates - Add validate_node_config for comprehensive validation - Add get_property_dependencies for visibility analysis - Implement PropertyFilter service with curated essentials - Implement ExampleGenerator with working examples - Implement TaskTemplates for common workflows - Implement ConfigValidator with security checks - Implement PropertyDependencies for dependency analysis - Enhance property descriptions to 100% coverage - Add version information to essentials response - Update documentation with new tools Response sizes reduced from 100KB+ to <5KB for better AI agent usability. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
5.4 KiB
5.4 KiB
MCP Implementation Action Plan
Key Insights from Analysis
✅ What You Already Have (Working Well)
- Excellent property extraction - All properties with complete schemas
- Proper data structure - Properties include types, options, displayOptions
- Efficient storage - JSON in SQLite is perfect for this use case
- Complete metadata - Operations, credentials, documentation all captured
❌ The Real Problem
- Information overload: Returning 200+ properties when AI needs 10-20
- No filtering: All properties returned regardless of relevance
- Poor organization: Essential mixed with advanced properties
- No examples: AI agents need concrete examples to work from
💡 The Solution
Don't restructure - add intelligent filtering layers on top
Immediate Action Plan (This Week)
Day 1-2: Implement get_node_essentials
-
Create services:
touch src/services/property-filter.ts touch src/services/example-generator.ts -
Copy code from implementation guide:
- PropertyFilter class with essential lists
- ExampleGenerator with concrete examples
- Tool implementation in server.ts
-
Test with top 5 nodes:
- nodes-base.httpRequest
- nodes-base.webhook
- nodes-base.code
- nodes-base.set
- nodes-base.postgres
-
Measure improvement:
npm run build node scripts/test-essentials.js
Day 3: Expand Coverage
-
Add 15 more nodes to ESSENTIAL_PROPERTIES:
- nodes-base.if
- nodes-base.merge
- nodes-base.splitInBatches
- nodes-base.function
- nodes-base.email
- nodes-base.slack
- nodes-base.github
- nodes-base.googleSheets
- nodes-base.openAi
- nodes-base.redis
- nodes-base.mongodb
- nodes-base.mysql
- nodes-base.ftp
- nodes-base.ssh
- nodes-base.executeCommand
-
Create examples for each node
-
Test with AI agents
Day 4-5: Implement search_node_properties
-
Create property flattener:
// Converts nested properties to flat list with paths class PropertyFlattener { static flatten(properties: any[], path = ''): FlatProperty[] } -
Add search functionality:
- Search by name
- Search by description
- Search by type
-
Test search accuracy
Week 2: Validation & Task Templates
-
Implement validate_node_config:
- Check required properties
- Validate against displayOptions
- Provide helpful error messages
-
Create task templates:
- Common API patterns
- Database operations
- File handling
- Webhook patterns
Essential Property Lists (Starting Point)
// Top 20 nodes to optimize first (80% of usage)
const PRIORITY_NODES = {
'nodes-base.httpRequest': {
required: ['url'],
common: ['method', 'authentication', 'sendBody', 'contentType', 'sendHeaders']
},
'nodes-base.webhook': {
required: [],
common: ['httpMethod', 'path', 'responseMode', 'responseData']
},
'nodes-base.code': {
required: [],
common: ['language', 'jsCode', 'pythonCode']
},
'nodes-base.set': {
required: [],
common: ['mode', 'assignments', 'options']
},
'nodes-base.if': {
required: [],
common: ['conditions', 'combineOperation']
},
'nodes-base.postgres': {
required: [],
common: ['operation', 'table', 'query', 'additionalFields']
},
'nodes-base.openAi': {
required: [],
common: ['resource', 'operation', 'modelId', 'prompt', 'messages']
},
'nodes-base.googleSheets': {
required: [],
common: ['operation', 'sheetId', 'range', 'dataStartRow']
},
'nodes-base.slack': {
required: [],
common: ['resource', 'operation', 'channel', 'text', 'attachments']
},
'nodes-base.email': {
required: [],
common: ['fromEmail', 'toEmail', 'subject', 'text', 'html']
}
};
Success Criteria
Week 1
- get_node_essentials working for 20 nodes
- 90%+ size reduction achieved
- Examples provided for common use cases
- Property search implemented
Week 2
- Configuration validation working
- 10+ task templates created
- Error messages are helpful
- AI agents successfully creating workflows
Month 1
- 50+ nodes optimized
- Advanced features implemented
- Documentation updated
- Migration guide created
Quick Test Commands
# Test essentials tool
echo '{"jsonrpc":"2.0","method":"tools/call","params":{"name":"get_node_essentials","arguments":{"nodeType":"nodes-base.httpRequest"}},"id":1}' | npm start
# Compare with original
echo '{"jsonrpc":"2.0","method":"tools/call","params":{"name":"get_node_info","arguments":{"nodeType":"nodes-base.httpRequest"}},"id":1}' | npm start
# Test property search
echo '{"jsonrpc":"2.0","method":"tools/call","params":{"name":"search_node_properties","arguments":{"nodeType":"nodes-base.httpRequest","query":"auth"}},"id":1}' | npm start
Remember
- Start small - Get one tool working perfectly before moving on
- Test with real AI - Use Claude/GPT to validate improvements
- Iterate quickly - Refine based on what works
- Keep compatibility - Don't break existing tools
- Measure everything - Track size reduction and success rates
Next Steps
- Review this plan with your team
- Start with Day 1 implementation
- Test with HTTP Request node
- Get feedback from AI agents
- Iterate and improve
The key is to deliver value incrementally while building toward the complete solution.