@utaba/ucm-mcp-server 6.4.0 → 6.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -155,6 +155,11 @@ export declare class UcmLocalApiClient {
|
|
|
155
155
|
authRequired?: boolean;
|
|
156
156
|
loginUrl?: string;
|
|
157
157
|
loginMessage?: string;
|
|
158
|
+
tools?: Array<{
|
|
159
|
+
name: string;
|
|
160
|
+
description: string;
|
|
161
|
+
parameters: any;
|
|
162
|
+
}>;
|
|
158
163
|
markdown: string;
|
|
159
164
|
}>;
|
|
160
165
|
/**
|
|
@@ -14,7 +14,7 @@ export class AccessConnectionTool extends BaseToolController {
|
|
|
14
14
|
return 'ucm_access_connection';
|
|
15
15
|
}
|
|
16
16
|
get description() {
|
|
17
|
-
return 'Access a specific external connection, check auth status, and return available tool schemas. Call
|
|
17
|
+
return 'Access a specific external connection, check auth status, and return available tool schemas. Call without toolNames to get a summary index of all available tools. Pass toolNames to retrieve full parameter schemas. If any tool name in toolNames is not recognised, the full catalogue is returned for all tools — use this to identify the correct name.';
|
|
18
18
|
}
|
|
19
19
|
get inputSchema() {
|
|
20
20
|
return {
|
|
@@ -14,7 +14,7 @@ export class CallRemoteToolTool extends BaseToolController {
|
|
|
14
14
|
return 'ucm_call_remote_tool';
|
|
15
15
|
}
|
|
16
16
|
get description() {
|
|
17
|
-
return '
|
|
17
|
+
return 'Call a tool on an external connection. If the tool name is invalid, the response will include the full tool catalogue so you can identify the correct tool and retry immediately. If the parameters are invalid, the response will include the correct schema — retry using that schema directly. No additional discovery calls are needed to recover from errors.';
|
|
18
18
|
}
|
|
19
19
|
get inputSchema() {
|
|
20
20
|
return {
|
|
@@ -69,9 +69,23 @@ export class CallRemoteToolTool extends BaseToolController {
|
|
|
69
69
|
authRequired: result.authRequired || false
|
|
70
70
|
});
|
|
71
71
|
// Clean proxy: pass through content blocks directly
|
|
72
|
-
//
|
|
73
|
-
// so the AI can self-correct and retry with correct parameters
|
|
72
|
+
// Return structured JSON for errors so the AI can self-correct and retry
|
|
74
73
|
if (!result.success) {
|
|
74
|
+
if (result.errorCode === 'TOOL_NOT_FOUND' && result.tools) {
|
|
75
|
+
return JSON.stringify({
|
|
76
|
+
error: 'TOOL_NOT_FOUND',
|
|
77
|
+
message: result.error,
|
|
78
|
+
available_tools: result.tools
|
|
79
|
+
});
|
|
80
|
+
}
|
|
81
|
+
if (result.errorCode === 'VALIDATION_ERROR' && result.tools) {
|
|
82
|
+
return JSON.stringify({
|
|
83
|
+
error: 'VALIDATION_ERROR',
|
|
84
|
+
message: result.error,
|
|
85
|
+
tool_schema: result.tools[0]
|
|
86
|
+
});
|
|
87
|
+
}
|
|
88
|
+
// For other errors (auth), return text
|
|
75
89
|
return result.markdown || result.error || 'Tool execution failed';
|
|
76
90
|
}
|
|
77
91
|
// Return as pre-formatted MCP response — McpHandler will pass through
|
package/package.json
CHANGED