build
This commit is contained in:
@@ -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;
|
||||||
|
|||||||
@@ -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"
|
||||||
|
|||||||
Reference in New Issue
Block a user