409e92d6ae
Build and Push Docker Images / Build Docker Image (push) Has been cancelled
Build and Push Docker Images / Build Railway Docker Image (push) Has been cancelled
Build and Publish n8n Docker Image / test-image (push) Has been cancelled
Dependency Compatibility Check / Fresh Install Dependency Check (push) Has been cancelled
Build and Publish n8n Docker Image / build-and-push (push) Has been cancelled
Build and Publish n8n Docker Image / create-release (push) Has been cancelled
Automated Release / Detect Version Change (push) Has been cancelled
Automated Release / Generate Release Notes (push) Has been cancelled
Automated Release / Create GitHub Release (push) Has been cancelled
Automated Release / Package MCPB Bundle (push) Has been cancelled
Automated Release / Build and Verify (push) Has been cancelled
Automated Release / Publish to NPM (push) Has been cancelled
Automated Release / Build and Push Docker Images (push) Has been cancelled
Automated Release / Update Documentation (push) Has been cancelled
Automated Release / Notify Release Completion (push) Has been cancelled
Secret Scan / secretlint (push) Has been cancelled
Test Suite / test (push) Has been cancelled
Test Suite / cjs-runtime (push) Has been cancelled
Test Suite / publish-results (push) Has been cancelled
38 lines
1.1 KiB
JavaScript
38 lines
1.1 KiB
JavaScript
#!/usr/bin/env node
|
|
|
|
import { N8NDocumentationMCPServer } from '../src/mcp/server';
|
|
|
|
async function testSimple() {
|
|
const server = new N8NDocumentationMCPServer();
|
|
await new Promise(resolve => setTimeout(resolve, 1000));
|
|
|
|
// Just test one query
|
|
const result = await server.executeTool('search_nodes', {
|
|
query: 'slak',
|
|
mode: 'FUZZY',
|
|
limit: 5
|
|
});
|
|
|
|
console.log('Query: "slak" (FUZZY mode)');
|
|
console.log(`Results: ${result.results.length}`);
|
|
|
|
if (result.results.length === 0) {
|
|
// Let's check with a lower threshold
|
|
const serverAny = server as any;
|
|
const slackNode = {
|
|
node_type: 'nodes-base.slack',
|
|
display_name: 'Slack',
|
|
description: 'Consume Slack API'
|
|
};
|
|
const score = serverAny.calculateFuzzyScore(slackNode, 'slak');
|
|
console.log(`\nSlack node score for "slak": ${score}`);
|
|
console.log('Current threshold: 400');
|
|
console.log('Should it match?', score >= 400 ? 'YES' : 'NO');
|
|
} else {
|
|
result.results.forEach((r: any, i: number) => {
|
|
console.log(`${i + 1}. ${r.displayName}`);
|
|
});
|
|
}
|
|
}
|
|
|
|
testSimple().catch(console.error); |