This commit is contained in:
bipproduction
2025-11-20 21:53:00 +08:00
parent 4bf3129b3f
commit 8b4a92943b
2 changed files with 7 additions and 5 deletions

View File

@@ -96,17 +96,19 @@ function createToolFromOperation(
): McpTool | null { ): McpTool | null {
try { try {
const rawName = _.snakeCase(`${operation.operationId}` || `${method}_${path}`) || "unnamed_tool"; const rawName = _.snakeCase(`${operation.operationId}` || `${method}_${path}`) || "unnamed_tool";
const name = cleanToolName(rawName); const name = _.snakeCase(cleanToolName(operation.summary)) || cleanToolName(rawName);
if (!name || name === "unnamed_tool") { if (!name || name === "unnamed_tool") {
console.warn(`Invalid tool name for ${method} ${path}`); console.warn(`Invalid tool name for ${method} ${path}`);
return null; return null;
} }
const description = let description =
operation.description || operation.description ||
operation.summary || operation.summary;
`Execute ${method.toUpperCase()} ${path}`;
description += `\n
Execute ${method.toUpperCase()} ${path}`;
// ✅ Extract schema berdasarkan method // ✅ Extract schema berdasarkan method
let schema; let schema;

View File

@@ -1,6 +1,6 @@
{ {
"name": "n8n-nodes-openapi-mcp-server", "name": "n8n-nodes-openapi-mcp-server",
"version": "1.1.35", "version": "1.1.36",
"keywords": [ "keywords": [
"n8n", "n8n",
"n8n-nodes" "n8n-nodes"