@utaba/ucm-mcp-server 5.1.1 → 5.3.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.
@@ -128,7 +128,7 @@ export declare class UcmLocalApiClient {
128
128
  authRequired?: boolean;
129
129
  loginUrl?: string;
130
130
  tools?: any[];
131
- markdown: string;
131
+ schema: string;
132
132
  }>;
133
133
  /**
134
134
  * Call a tool on an external connection
@@ -50,8 +50,8 @@ export class AccessConnectionTool extends BaseToolController {
50
50
  isAuthenticated: result.isAuthenticated,
51
51
  toolCount: result.tools?.length || 0
52
52
  });
53
- // Return the markdown content for AI consumption
54
- return result.markdown;
53
+ // Return the schema (JSON envelope with modelInstructions, policies, tools) for AI consumption
54
+ return result.schema;
55
55
  }
56
56
  catch (error) {
57
57
  // Sanitize error for logging
@@ -33,7 +33,7 @@ export class CallRemoteToolTool extends BaseToolController {
33
33
  },
34
34
  args: {
35
35
  type: 'object',
36
- description: 'Tool arguments as key-value pairs (see ucm_access_connection for parameter schemas)'
36
+ description: 'Tool arguments object (see ucm_access_connection for parameter schemas)'
37
37
  }
38
38
  },
39
39
  required: ['connectionId', 'toolName']
@@ -52,8 +52,8 @@ export class CallRemoteToolTool extends BaseToolController {
52
52
  if (!params.toolName || typeof params.toolName !== 'string') {
53
53
  throw new McpError(McpErrorCode.InvalidParams, 'toolName is required and must be a string');
54
54
  }
55
- // Validate args if provided
56
- if (params.args !== undefined && typeof params.args !== 'object') {
55
+ // Validate args if provided — must be an object, not a string
56
+ if (params.args !== undefined && (typeof params.args !== 'object' || params.args === null)) {
57
57
  throw new McpError(McpErrorCode.InvalidParams, 'args must be an object');
58
58
  }
59
59
  }
@@ -112,12 +112,13 @@ export class PublishArtifactFromFileTool extends BaseToolController {
112
112
  const result = await this.ucmClient.publishArtifact(pathComponents.author, pathComponents.repository, pathComponents.category, pathComponents.subcategory, publishData);
113
113
  // Handle response structure - API might return wrapped in 'data' or direct
114
114
  const artifactData = result.data || result;
115
- // Build successful response
115
+ // Build successful response - url comes from API (set by PublishArtifactCommand)
116
+ const namespacePath = `${pathComponents.author}/${pathComponents.repository}/${pathComponents.category}/${pathComponents.subcategory}`;
116
117
  const response = {
117
118
  success: true,
118
119
  artifact: {
119
120
  id: artifactData.id,
120
- namespace: `${pathComponents.author}/${pathComponents.repository}/${pathComponents.category}/${pathComponents.subcategory}`,
121
+ namespace: namespacePath,
121
122
  filename,
122
123
  version: publishData.queryParams.version,
123
124
  name: filename, // Use filename as name, matching what the API does
@@ -130,10 +131,11 @@ export class PublishArtifactFromFileTool extends BaseToolController {
130
131
  publishedAt: artifactData.publishedAt,
131
132
  sourceFile: filePath
132
133
  },
134
+ url: artifactData.url,
133
135
  links: {
134
- self: `/api/v1/authors/${pathComponents.author}/${pathComponents.repository}/${pathComponents.category}/${pathComponents.subcategory}/${filename}`,
135
- download: `/api/v1/files/${pathComponents.author}/${pathComponents.repository}/${pathComponents.category}/${pathComponents.subcategory}/${filename}`,
136
- versions: `/api/v1/authors/${pathComponents.author}/${pathComponents.repository}/${pathComponents.category}/${pathComponents.subcategory}/${filename}/versions`
136
+ self: `/api/v1/authors/${namespacePath}/${filename}`,
137
+ download: `/api/v1/files/${namespacePath}/${filename}`,
138
+ versions: `/api/v1/authors/${namespacePath}/${filename}/versions`
137
139
  }
138
140
  };
139
141
  this.logger.info('PublishArtifactFromFileTool', `Artifact published successfully from file: ${filePath}`, '', {
@@ -103,12 +103,13 @@ export class PublishArtifactTool extends BaseToolController {
103
103
  const result = await this.ucmClient.publishArtifact(pathComponents.author, pathComponents.repository, pathComponents.category, pathComponents.subcategory, publishData);
104
104
  // Handle response structure - API might return wrapped in 'data' or direct
105
105
  const artifactData = result.data || result;
106
- // Build successful response
106
+ // Build successful response - url comes from API (set by PublishArtifactCommand)
107
+ const namespacePath = `${pathComponents.author}/${pathComponents.repository}/${pathComponents.category}/${pathComponents.subcategory}`;
107
108
  const response = {
108
109
  success: true,
109
110
  artifact: {
110
111
  id: artifactData.id,
111
- namespace: `${pathComponents.author}/${pathComponents.repository}/${pathComponents.category}/${pathComponents.subcategory}`,
112
+ namespace: namespacePath,
112
113
  filename,
113
114
  version: publishData.queryParams.version,
114
115
  name: filename, // Use filename as name, matching what the API does
@@ -120,10 +121,11 @@ export class PublishArtifactTool extends BaseToolController {
120
121
  createdAt: artifactData.createdAt,
121
122
  publishedAt: artifactData.publishedAt
122
123
  },
124
+ url: artifactData.url,
123
125
  links: {
124
- self: `/api/v1/authors/${pathComponents.author}/${pathComponents.repository}/${pathComponents.category}/${pathComponents.subcategory}/${filename}`,
125
- download: `/api/v1/files/${pathComponents.author}/${pathComponents.repository}/${pathComponents.category}/${pathComponents.subcategory}/${filename}`,
126
- versions: `/api/v1/authors/${pathComponents.author}/${pathComponents.repository}/${pathComponents.category}/${pathComponents.subcategory}/${filename}/versions`
126
+ self: `/api/v1/authors/${namespacePath}/${filename}`,
127
+ download: `/api/v1/files/${namespacePath}/${filename}`,
128
+ versions: `/api/v1/authors/${namespacePath}/${filename}/versions`
127
129
  }
128
130
  };
129
131
  this.logger.info('PublishArtifactTool', `Artifact published successfully: ${path}/${filename}`, '', {
@@ -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 = '5.1.1'; //TODO: tried to sync this with packageJson but it didn't work.
3
+ const version = '5.3.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": "5.1.1",
3
+ "version": "5.3.0",
4
4
  "description": "Universal Context Manager MCP Server - AI Productivity Platform",
5
5
  "main": "dist/index.js",
6
6
  "type": "module",
@@ -34,4 +34,4 @@
34
34
  "publishConfig": {
35
35
  "access": "public"
36
36
  }
37
- }
37
+ }
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ucm-mcp-server",
3
- "version": "5.1.1",
3
+ "version": "5.3.0",
4
4
  "description": "Universal Context Manager MCP Server - AI Productivity Platform",
5
5
  "main": "dist/index.js",
6
6
  "type": "module",
@@ -34,4 +34,4 @@
34
34
  "publishConfig": {
35
35
  "access": "public"
36
36
  }
37
- }
37
+ }