mirror of
https://github.com/czlonkowski/n8n-mcp.git
synced 2026-02-06 05:23:08 +00:00
feat: Remove 9 low-value tools and consolidate n8n_health_check (v2.25.0)
Telemetry-driven tool cleanup to improve API clarity: **Removed Tools (9):** - list_nodes - Use search_nodes instead - list_ai_tools - Use search_nodes with isAITool filter - list_tasks - Low usage (0.02%) - get_database_statistics - Use n8n_health_check - list_templates - Use search_templates or get_templates_for_task - get_node_as_tool_info - Documented in get_node - validate_workflow_connections - Use validate_workflow - validate_workflow_expressions - Use validate_workflow - n8n_list_available_tools - Use n8n_health_check - n8n_diagnostic - Merged into n8n_health_check **Consolidated Tool:** - n8n_health_check now supports mode='diagnostic' for detailed troubleshooting **Tool Count:** - Before: 38 tools - After: 31 tools (18% reduction) Concieved by Romuald Członkowski - www.aiadvisors.pl/en 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -74,7 +74,7 @@ describe('MCP Protocol Compliance', () => {
|
||||
for (let i = 0; i < 5; i++) {
|
||||
expectedOrder.push(i);
|
||||
requests.push(
|
||||
client.callTool({ name: 'get_database_statistics', arguments: {} })
|
||||
client.callTool({ name: 'tools_documentation', arguments: {} })
|
||||
.then(() => i)
|
||||
);
|
||||
}
|
||||
@@ -125,7 +125,7 @@ describe('MCP Protocol Compliance', () => {
|
||||
|
||||
it('should handle missing params gracefully', async () => {
|
||||
// Most tools should work without params
|
||||
const response = await client.callTool({ name: 'list_nodes', arguments: {} });
|
||||
const response = await client.callTool({ name: 'search_nodes', arguments: { query: 'webhook' } });
|
||||
expect(response).toBeDefined();
|
||||
});
|
||||
|
||||
@@ -147,8 +147,8 @@ describe('MCP Protocol Compliance', () => {
|
||||
|
||||
describe('Content Types', () => {
|
||||
it('should handle text content in tool responses', async () => {
|
||||
const response = await client.callTool({ name: 'get_database_statistics', arguments: {} });
|
||||
|
||||
const response = await client.callTool({ name: 'tools_documentation', arguments: {} });
|
||||
|
||||
expect((response as any).content).toHaveLength(1);
|
||||
expect((response as any).content[0]).toHaveProperty('type', 'text');
|
||||
expect((response as any).content[0]).toHaveProperty('text');
|
||||
@@ -167,14 +167,15 @@ describe('MCP Protocol Compliance', () => {
|
||||
});
|
||||
|
||||
it('should handle JSON content properly', async () => {
|
||||
const response = await client.callTool({ name: 'list_nodes', arguments: {
|
||||
const response = await client.callTool({ name: 'search_nodes', arguments: {
|
||||
query: 'webhook',
|
||||
limit: 5
|
||||
} });
|
||||
|
||||
expect((response as any).content).toHaveLength(1);
|
||||
const content = JSON.parse((response as any).content[0].text);
|
||||
expect(content).toHaveProperty('nodes');
|
||||
expect(Array.isArray(content.nodes)).toBe(true);
|
||||
expect(content).toHaveProperty('results');
|
||||
expect(Array.isArray(content.results)).toBe(true);
|
||||
});
|
||||
});
|
||||
|
||||
@@ -197,10 +198,10 @@ describe('MCP Protocol Compliance', () => {
|
||||
const results: string[] = [];
|
||||
|
||||
// Start multiple requests with different delays
|
||||
const p1 = client.callTool({ name: 'get_database_statistics', arguments: {} })
|
||||
.then(() => { results.push('stats'); return 'stats'; });
|
||||
const p1 = client.callTool({ name: 'tools_documentation', arguments: {} })
|
||||
.then(() => { results.push('docs'); return 'docs'; });
|
||||
|
||||
const p2 = client.callTool({ name: 'list_nodes', arguments: { limit: 1 } })
|
||||
const p2 = client.callTool({ name: 'search_nodes', arguments: { query: 'webhook', limit: 1 } })
|
||||
.then(() => { results.push('nodes'); return 'nodes'; });
|
||||
|
||||
const p3 = client.callTool({ name: 'search_nodes', arguments: { query: 'http' } })
|
||||
@@ -232,13 +233,13 @@ describe('MCP Protocol Compliance', () => {
|
||||
|
||||
it('should support optional parameters', async () => {
|
||||
// Call with minimal params
|
||||
const response1 = await client.callTool({ name: 'list_nodes', arguments: {} });
|
||||
|
||||
const response1 = await client.callTool({ name: 'search_nodes', arguments: { query: 'webhook' } });
|
||||
|
||||
// Call with all params
|
||||
const response2 = await client.callTool({ name: 'list_nodes', arguments: {
|
||||
const response2 = await client.callTool({ name: 'search_nodes', arguments: {
|
||||
query: 'webhook',
|
||||
limit: 10,
|
||||
category: 'trigger',
|
||||
package: 'n8n-nodes-base'
|
||||
mode: 'OR'
|
||||
} });
|
||||
|
||||
expect(response1).toBeDefined();
|
||||
@@ -255,7 +256,7 @@ describe('MCP Protocol Compliance', () => {
|
||||
await testClient.connect(clientTransport);
|
||||
|
||||
// Make a request
|
||||
const response = await testClient.callTool({ name: 'get_database_statistics', arguments: {} });
|
||||
const response = await testClient.callTool({ name: 'tools_documentation', arguments: {} });
|
||||
expect(response).toBeDefined();
|
||||
|
||||
// Close client
|
||||
@@ -263,7 +264,7 @@ describe('MCP Protocol Compliance', () => {
|
||||
|
||||
// Further requests should fail
|
||||
try {
|
||||
await testClient.callTool({ name: 'get_database_statistics', arguments: {} });
|
||||
await testClient.callTool({ name: 'tools_documentation', arguments: {} });
|
||||
expect.fail('Should have thrown an error');
|
||||
} catch (error) {
|
||||
expect(error).toBeDefined();
|
||||
@@ -286,7 +287,7 @@ describe('MCP Protocol Compliance', () => {
|
||||
const testClient = new Client({ name: 'test', version: '1.0.0' }, {});
|
||||
await testClient.connect(clientTransport);
|
||||
|
||||
const response = await testClient.callTool({ name: 'get_database_statistics', arguments: {} });
|
||||
const response = await testClient.callTool({ name: 'tools_documentation', arguments: {} });
|
||||
expect(response).toBeDefined();
|
||||
|
||||
await testClient.close();
|
||||
|
||||
@@ -1068,14 +1068,14 @@ describe('handlers-n8n-manager', () => {
|
||||
},
|
||||
toolsAvailability: {
|
||||
documentationTools: {
|
||||
count: 22,
|
||||
count: 14,
|
||||
enabled: true,
|
||||
},
|
||||
managementTools: {
|
||||
count: 16,
|
||||
count: 17,
|
||||
enabled: true,
|
||||
},
|
||||
totalAvailable: 38,
|
||||
totalAvailable: 31,
|
||||
},
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user