@utaba/ucm-mcp-server 6.3.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 this without the toolNames parameter to get an index of all available tools. Pass in toolNames to learn the full parameter schema if needed.';
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 'Use ucm_access_connection to discover available tools and schemas before calling a tool for the first time on a connection. No need to re-access if the schema is already known from earlier in the conversation.';
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,8 +69,24 @@ export class CallRemoteToolTool extends BaseToolController {
69
69
  authRequired: result.authRequired || false
70
70
  });
71
71
  // Clean proxy: pass through content blocks directly
72
+ // Return structured JSON for errors so the AI can self-correct and retry
72
73
  if (!result.success) {
73
- return result.error || result.markdown || 'Tool execution failed';
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
89
+ return result.markdown || result.error || 'Tool execution failed';
74
90
  }
75
91
  // Return as pre-formatted MCP response — McpHandler will pass through
76
92
  return { content: result.content };
@@ -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.0'; //TODO: tried to sync this with packageJson but it didn't work.
3
+ const version = '6.4.0'; //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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@utaba/ucm-mcp-server",
3
- "version": "6.3.0",
3
+ "version": "6.5.0",
4
4
  "description": "Universal Context Manager MCP Server - AI Productivity Platform",
5
5
  "main": "dist/index.js",
6
6
  "type": "module",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ucm-mcp-server",
3
- "version": "6.3.0",
3
+ "version": "6.5.0",
4
4
  "description": "Universal Context Manager MCP Server - AI Productivity Platform",
5
5
  "main": "dist/index.js",
6
6
  "type": "module",