feat(tools): rename start_here to tools_documentation with depth control (v2.7.4)
- Renamed start_here_workflow_guide to tools_documentation for clarity - Added depth parameter to control documentation detail (essentials/full) - Converted output from JSON to LLM-friendly plain text format - Added per-tool documentation capability - Created two-tier documentation system: - Essentials: brief info with key parameters and tips - Full: comprehensive docs with examples and best practices - Documented 8 commonly used MCP tools - Removed 380+ lines of unused getWorkflowGuide method - Fixed duplicate tool definitions - Updated all documentation references - Added test script for tools documentation BREAKING CHANGE: start_here_workflow_guide renamed to tools_documentation 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
57
scripts/test-tools-documentation.ts
Normal file
57
scripts/test-tools-documentation.ts
Normal file
@@ -0,0 +1,57 @@
|
||||
import { N8NDocumentationMCPServer } from '../src/mcp/server';
|
||||
import path from 'path';
|
||||
|
||||
async function testToolsDocumentation() {
|
||||
const dbPath = path.join(__dirname, '..', 'nodes.db');
|
||||
const server = new N8NDocumentationMCPServer(dbPath);
|
||||
|
||||
console.log('=== Testing tools_documentation tool ===\n');
|
||||
|
||||
// Test 1: No parameters (quick reference)
|
||||
console.log('1. Testing without parameters (quick reference):');
|
||||
console.log('----------------------------------------');
|
||||
const quickRef = await server.executeTool('tools_documentation', {});
|
||||
console.log(quickRef);
|
||||
console.log('\n');
|
||||
|
||||
// Test 2: Overview with essentials depth
|
||||
console.log('2. Testing overview with essentials:');
|
||||
console.log('----------------------------------------');
|
||||
const overviewEssentials = await server.executeTool('tools_documentation', { topic: 'overview' });
|
||||
console.log(overviewEssentials);
|
||||
console.log('\n');
|
||||
|
||||
// Test 3: Overview with full depth
|
||||
console.log('3. Testing overview with full depth:');
|
||||
console.log('----------------------------------------');
|
||||
const overviewFull = await server.executeTool('tools_documentation', { topic: 'overview', depth: 'full' });
|
||||
console.log(overviewFull.substring(0, 500) + '...\n');
|
||||
|
||||
// Test 4: Specific tool with essentials
|
||||
console.log('4. Testing search_nodes with essentials:');
|
||||
console.log('----------------------------------------');
|
||||
const searchNodesEssentials = await server.executeTool('tools_documentation', { topic: 'search_nodes' });
|
||||
console.log(searchNodesEssentials);
|
||||
console.log('\n');
|
||||
|
||||
// Test 5: Specific tool with full documentation
|
||||
console.log('5. Testing search_nodes with full depth:');
|
||||
console.log('----------------------------------------');
|
||||
const searchNodesFull = await server.executeTool('tools_documentation', { topic: 'search_nodes', depth: 'full' });
|
||||
console.log(searchNodesFull.substring(0, 800) + '...\n');
|
||||
|
||||
// Test 6: Non-existent tool
|
||||
console.log('6. Testing non-existent tool:');
|
||||
console.log('----------------------------------------');
|
||||
const nonExistent = await server.executeTool('tools_documentation', { topic: 'fake_tool' });
|
||||
console.log(nonExistent);
|
||||
console.log('\n');
|
||||
|
||||
// Test 7: Another tool example
|
||||
console.log('7. Testing n8n_update_partial_workflow with essentials:');
|
||||
console.log('----------------------------------------');
|
||||
const updatePartial = await server.executeTool('tools_documentation', { topic: 'n8n_update_partial_workflow' });
|
||||
console.log(updatePartial);
|
||||
}
|
||||
|
||||
testToolsDocumentation().catch(console.error);
|
||||
Reference in New Issue
Block a user