@utaba/ucm-mcp-server 6.4.0 → 6.5.1
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.
- package/dist/clients/UcmLocalApiClient.d.ts +6 -0
- package/dist/index.js +1 -1
- package/dist/tools/connections/AccessConnectionTool.js +6 -4
- package/dist/tools/connections/CallRemoteToolTool.js +17 -3
- package/dist/tools/utility/HealthCheckController.js +1 -1
- package/package.json +1 -1
- package/package.json.backup +1 -1
|
@@ -128,6 +128,7 @@ export declare class UcmLocalApiClient {
|
|
|
128
128
|
authRequired?: boolean;
|
|
129
129
|
loginUrl?: string;
|
|
130
130
|
loginMessage?: string;
|
|
131
|
+
error?: string;
|
|
131
132
|
tools?: any[];
|
|
132
133
|
markdown?: string;
|
|
133
134
|
instructions?: string;
|
|
@@ -155,6 +156,11 @@ export declare class UcmLocalApiClient {
|
|
|
155
156
|
authRequired?: boolean;
|
|
156
157
|
loginUrl?: string;
|
|
157
158
|
loginMessage?: string;
|
|
159
|
+
tools?: Array<{
|
|
160
|
+
name: string;
|
|
161
|
+
description: string;
|
|
162
|
+
parameters: any;
|
|
163
|
+
}>;
|
|
158
164
|
markdown: string;
|
|
159
165
|
}>;
|
|
160
166
|
/**
|
package/dist/index.js
CHANGED
|
@@ -12,7 +12,7 @@ async function main() {
|
|
|
12
12
|
program
|
|
13
13
|
.name('ucm-mcp-server')
|
|
14
14
|
.description('Universal Context Manager - Read the ucm_connect tool first to avoid mistakes')
|
|
15
|
-
.version('6.
|
|
15
|
+
.version('6.5.1')
|
|
16
16
|
.option('-u, --ucm-url <url>', 'UCM API base URL (defaults to https://ucm.utaba.ai)')
|
|
17
17
|
.option('-p, --port <port>', 'Server port', '3001')
|
|
18
18
|
.option('--log-level <level>', 'Log level', 'ERROR')
|
|
@@ -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.';
|
|
18
18
|
}
|
|
19
19
|
get inputSchema() {
|
|
20
20
|
return {
|
|
@@ -66,14 +66,16 @@ export class AccessConnectionTool extends BaseToolController {
|
|
|
66
66
|
if (result.markdown) {
|
|
67
67
|
return result.markdown;
|
|
68
68
|
}
|
|
69
|
-
//
|
|
70
|
-
|
|
69
|
+
// Tools mode — return compact JSON with schemas
|
|
70
|
+
const json = {
|
|
71
71
|
connectionId: result.connectionId,
|
|
72
72
|
connectionName: result.connectionName,
|
|
73
73
|
instructions: result.instructions,
|
|
74
74
|
policies: result.policies,
|
|
75
|
+
...(result.error && { error: result.error }),
|
|
75
76
|
tools: result.tools
|
|
76
|
-
}
|
|
77
|
+
};
|
|
78
|
+
return JSON.stringify(json);
|
|
77
79
|
}
|
|
78
80
|
catch (error) {
|
|
79
81
|
// Sanitize error for logging
|
|
@@ -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.';
|
|
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
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { BaseToolController } from '../base/BaseToolController.js';
|
|
2
2
|
//import packageJson from '../../../../publish/package.json' assert { type: 'json' };
|
|
3
|
-
const version = '6.
|
|
3
|
+
const version = '6.5.1'; //TODO: tried to sync this with packageJson but it didn't work.
|
|
4
4
|
export class HealthCheckController extends BaseToolController {
|
|
5
5
|
constructor(ucmClient, logger, publishingAuthorId) {
|
|
6
6
|
super(ucmClient, logger, publishingAuthorId);
|
package/package.json
CHANGED