@mcpc-tech/core 0.3.6 → 0.3.7

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.
Files changed (2) hide show
  1. package/index.mjs +20 -6
  2. package/package.json +1 -1
package/index.mjs CHANGED
@@ -1188,7 +1188,21 @@ var AgenticExecutor = class {
1188
1188
  const useTool = args[this.USE_TOOL_KEY];
1189
1189
  const definitionsOf = args.definitionsOf || [];
1190
1190
  const hasDefinitions = args.hasDefinitions || [];
1191
- if (executeSpan && useTool) {
1191
+ if (!useTool) {
1192
+ if (executeSpan) {
1193
+ executeSpan.setAttributes({
1194
+ toolType: "none",
1195
+ completion: true
1196
+ });
1197
+ endSpan(executeSpan);
1198
+ }
1199
+ const result2 = {
1200
+ content: []
1201
+ };
1202
+ this.appendToolSchemas(result2, definitionsOf, hasDefinitions);
1203
+ return result2;
1204
+ }
1205
+ if (executeSpan) {
1192
1206
  try {
1193
1207
  const safeTool = String(useTool).replace(/\s+/g, "_");
1194
1208
  if (typeof executeSpan.updateName === "function") {
@@ -1274,14 +1288,14 @@ var AgenticExecutor = class {
1274
1288
  if (executeSpan) {
1275
1289
  executeSpan.setAttributes({
1276
1290
  toolType: "not_found",
1277
- useTool: useTool || "unknown",
1278
- completion: true
1291
+ useTool
1279
1292
  });
1280
1293
  endSpan(executeSpan);
1281
1294
  }
1282
- this.logger.debug({
1283
- message: "Tool not found, returning completion message",
1284
- useTool
1295
+ this.logger.warning({
1296
+ message: "Tool not found",
1297
+ useTool,
1298
+ availableTools: this.allToolNames
1285
1299
  });
1286
1300
  const result = {
1287
1301
  content: []
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mcpc-tech/core",
3
- "version": "0.3.6",
3
+ "version": "0.3.7",
4
4
  "homepage": "https://jsr.io/@mcpc/core",
5
5
  "type": "module",
6
6
  "dependencies": {