@topolo/mcp 0.10.0 → 0.10.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/README.md CHANGED
@@ -217,6 +217,9 @@ sent.
217
217
  catalog. They do not expose the global generated platform catalog.
218
218
  - **Credential-scoped action discovery.** `topolo_search_actions` reads only one
219
219
  app partition and returns at most 100 permission-filtered actions per page.
220
+ Search, capability discovery, validation, planning, and application audit
221
+ return compact agent guidance by default; pass `detail: true` only when the
222
+ full contracts or findings are needed.
220
223
  - **Audit headers.** Every request sends `X-Topolo-Client: topolo-mcp/<ver>`,
221
224
  `X-Topolo-Agent: <label>`, `X-Topolo-Request-Id: <uuid>`.
222
225
  - **Write-action confirmation.** The SDK refuses mutating HTTP methods unless
package/dist/dispatch.js CHANGED
@@ -7,6 +7,10 @@ import {
7
7
  APPLICATION_REQUIREMENTS_VERSION,
8
8
  auditApplicationEntries,
9
9
  applicationRequirementScopes,
10
+ compactActionCatalogEntry,
11
+ compactActionPlan,
12
+ compactActionValidation,
13
+ compactApplicationAudit,
10
14
  friendlyAppId,
11
15
  listApplicationDirectory,
12
16
  requirementsForApplication,
@@ -117,7 +121,8 @@ var TOOLS = [
117
121
  properties: {
118
122
  query: { type: "string" },
119
123
  cursor: { type: "string" },
120
- limit: { type: "integer", minimum: 1, maximum: 100, default: 25 }
124
+ limit: { type: "integer", minimum: 1, maximum: 100, default: 25 },
125
+ detail: { type: "boolean", description: "Return full schemas and agent contracts. Defaults to compact action guidance." }
121
126
  },
122
127
  additionalProperties: false
123
128
  },
@@ -171,12 +176,13 @@ var TOOLS = [
171
176
  handler: async (topolo, args) => {
172
177
  const service = typeof args["service"] === "string" ? args["service"].trim() : "";
173
178
  if (!service) throw new TopoloMcpPublicError("service is required for bounded action discovery.");
174
- return topolo.client.searchActions({
179
+ const result = await topolo.client.searchActions({
175
180
  service,
176
181
  query: typeof args["query"] === "string" ? args["query"] : void 0,
177
182
  cursor: typeof args["cursor"] === "string" ? args["cursor"] : void 0,
178
183
  limit: typeof args["limit"] === "number" ? args["limit"] : void 0
179
184
  });
185
+ return args["detail"] === true ? result : { actions: result.actions.map(compactActionCatalogEntry), page: result.page };
180
186
  }
181
187
  },
182
188
  {
@@ -342,7 +348,8 @@ var TOOLS = [
342
348
  type: "object",
343
349
  properties: {
344
350
  actionId: { type: "string", minLength: 1 },
345
- input: { type: "object", additionalProperties: true }
351
+ input: { type: "object", additionalProperties: true },
352
+ detail: { type: "boolean", description: "Include the full action contract. Defaults to a compact validation result." }
346
353
  },
347
354
  required: ["actionId"],
348
355
  additionalProperties: false
@@ -351,7 +358,8 @@ var TOOLS = [
351
358
  const actionId = typeof args["actionId"] === "string" ? args["actionId"].trim() : "";
352
359
  if (!actionId) throw new TopoloMcpPublicError("actionId is required.");
353
360
  const input = coerceObjectParam(args["input"], "input");
354
- return topolo.client.validateActionInput(actionId, input);
361
+ const result = await topolo.client.validateActionInput(actionId, input);
362
+ return args["detail"] === true ? result : compactActionValidation(result.action.actionId, result.validation);
355
363
  }
356
364
  },
357
365
  {
@@ -367,7 +375,8 @@ var TOOLS = [
367
375
  input: { type: "object", additionalProperties: true },
368
376
  resourceType: { type: "string", description: "Optional resource-scoping alias published in the app resource catalog (e.g. workspace, brand, merchant)." },
369
377
  resourceId: { type: "string", description: "Resource id. Required when resourceType is provided." },
370
- confirm: { type: "boolean", description: "Include confirmation in the plan without executing the action." }
378
+ confirm: { type: "boolean", description: "Include confirmation in the plan without executing the action." },
379
+ detail: { type: "boolean", description: "Include the full action contract. Defaults to the executable request and verification plan." }
371
380
  },
372
381
  required: ["actionId"],
373
382
  additionalProperties: false
@@ -377,7 +386,7 @@ var TOOLS = [
377
386
  if (!actionId) throw new TopoloMcpPublicError("actionId is required.");
378
387
  const input = coerceObjectParam(args["input"], "input");
379
388
  const resource = optionalResourceContext(args);
380
- return topolo.client.planAction(
389
+ const plan = await topolo.client.planAction(
381
390
  actionId,
382
391
  input,
383
392
  {
@@ -385,6 +394,7 @@ var TOOLS = [
385
394
  ...resource ? { resource } : {}
386
395
  }
387
396
  );
397
+ return args["detail"] === true ? plan : compactActionPlan(plan);
388
398
  }
389
399
  },
390
400
  {
@@ -418,14 +428,18 @@ var TOOLS = [
418
428
  destructive: false,
419
429
  inputSchema: {
420
430
  type: "object",
421
- properties: { service: { type: "string", minLength: 1 } },
431
+ properties: {
432
+ service: { type: "string", minLength: 1 },
433
+ detail: { type: "boolean", description: "Return full schemas and agent contracts. Defaults to compact capability guidance." }
434
+ },
422
435
  required: ["service"],
423
436
  additionalProperties: false
424
437
  },
425
438
  handler: async (topolo, args) => {
426
439
  const service = typeof args["service"] === "string" ? args["service"].trim() : "";
427
440
  if (!service) throw new TopoloMcpPublicError("service is required.");
428
- return topolo.client.searchActions({ service, limit: 100 });
441
+ const result = await topolo.client.searchActions({ service, limit: 100 });
442
+ return args["detail"] === true ? result : { actions: result.actions.map(compactActionCatalogEntry), page: result.page };
429
443
  }
430
444
  },
431
445
  {
@@ -593,6 +607,10 @@ var TOOLS = [
593
607
  type: "string",
594
608
  enum: ["missing", "needs_review", "partial"],
595
609
  description: "Optional conformance gate. Returns conformanceGate.passed=false when findings at this severity or worse exist."
610
+ },
611
+ detail: {
612
+ type: "boolean",
613
+ description: "Include every finding and migration item. Defaults to per-app scores and a queue count."
596
614
  }
597
615
  },
598
616
  additionalProperties: false
@@ -608,11 +626,13 @@ var TOOLS = [
608
626
  if (application === void 0) {
609
627
  const directory = await listApplicationDirectory(topolo.client);
610
628
  report = auditApplicationEntries(directory.applications.map((app) => app.application));
611
- return gate ? { ...report, conformanceGate: evaluateApplicationAuditGate(report, gate) } : report;
629
+ const output2 = args["detail"] === true ? report : compactApplicationAudit(report);
630
+ return gate ? { ...output2, conformanceGate: evaluateApplicationAuditGate(report, gate) } : output2;
612
631
  }
613
632
  const resolved = await resolveDirectoryApplication(topolo, application);
614
633
  report = auditApplicationEntries([resolved.application]);
615
- return gate ? { ...report, conformanceGate: evaluateApplicationAuditGate(report, gate) } : report;
634
+ const output = args["detail"] === true ? report : compactApplicationAudit(report);
635
+ return gate ? { ...output, conformanceGate: evaluateApplicationAuditGate(report, gate) } : output;
616
636
  }
617
637
  },
618
638
  {
package/dist/http.js CHANGED
@@ -3098,9 +3098,9 @@ var require_data = __commonJS({
3098
3098
  }
3099
3099
  });
3100
3100
 
3101
- // ../../node_modules/.pnpm/fast-uri@3.1.4/node_modules/fast-uri/lib/utils.js
3101
+ // ../../node_modules/.pnpm/fast-uri@3.1.5/node_modules/fast-uri/lib/utils.js
3102
3102
  var require_utils = __commonJS({
3103
- "../../node_modules/.pnpm/fast-uri@3.1.4/node_modules/fast-uri/lib/utils.js"(exports, module) {
3103
+ "../../node_modules/.pnpm/fast-uri@3.1.5/node_modules/fast-uri/lib/utils.js"(exports, module) {
3104
3104
  "use strict";
3105
3105
  var isUUID = RegExp.prototype.test.bind(/^[\da-f]{8}-[\da-f]{4}-[\da-f]{4}-[\da-f]{4}-[\da-f]{12}$/iu);
3106
3106
  var isIPv4 = RegExp.prototype.test.bind(/^(?:(?:25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|\d)$/u);
@@ -3411,9 +3411,9 @@ var require_utils = __commonJS({
3411
3411
  }
3412
3412
  });
3413
3413
 
3414
- // ../../node_modules/.pnpm/fast-uri@3.1.4/node_modules/fast-uri/lib/schemes.js
3414
+ // ../../node_modules/.pnpm/fast-uri@3.1.5/node_modules/fast-uri/lib/schemes.js
3415
3415
  var require_schemes = __commonJS({
3416
- "../../node_modules/.pnpm/fast-uri@3.1.4/node_modules/fast-uri/lib/schemes.js"(exports, module) {
3416
+ "../../node_modules/.pnpm/fast-uri@3.1.5/node_modules/fast-uri/lib/schemes.js"(exports, module) {
3417
3417
  "use strict";
3418
3418
  var { isUUID } = require_utils();
3419
3419
  var URN_REG = /([\da-z][\d\-a-z]{0,31}):((?:[\w!$'()*+,\-.:;=@]|%[\da-f]{2})+)/iu;
@@ -3621,9 +3621,9 @@ var require_schemes = __commonJS({
3621
3621
  }
3622
3622
  });
3623
3623
 
3624
- // ../../node_modules/.pnpm/fast-uri@3.1.4/node_modules/fast-uri/index.js
3624
+ // ../../node_modules/.pnpm/fast-uri@3.1.5/node_modules/fast-uri/index.js
3625
3625
  var require_fast_uri = __commonJS({
3626
- "../../node_modules/.pnpm/fast-uri@3.1.4/node_modules/fast-uri/index.js"(exports, module) {
3626
+ "../../node_modules/.pnpm/fast-uri@3.1.5/node_modules/fast-uri/index.js"(exports, module) {
3627
3627
  "use strict";
3628
3628
  var { normalizeIPv6, removeDotSegments, recomposeAuthority, normalizePercentEncoding, normalizePathEncoding, escapePreservingEscapes, reescapeHostDelimiters, isIPv4, nonSimpleDomain } = require_utils();
3629
3629
  var { SCHEMES, getSchemeHandler } = require_schemes();
@@ -3639,7 +3639,12 @@ var require_fast_uri = __commonJS({
3639
3639
  }
3640
3640
  function resolve(baseURI, relativeURI, options) {
3641
3641
  const schemelessOptions = options ? Object.assign({ scheme: "null" }, options) : { scheme: "null" };
3642
- const resolved = resolveComponent(parse3(baseURI, schemelessOptions), parse3(relativeURI, schemelessOptions), schemelessOptions, true);
3642
+ const { parsed: baseParsed, malformedAuthorityOrPort: baseMalformed } = parseWithStatus(baseURI, schemelessOptions);
3643
+ const { parsed: relativeParsed, malformedAuthorityOrPort: relativeMalformed } = parseWithStatus(relativeURI, schemelessOptions);
3644
+ if (baseMalformed || relativeMalformed) {
3645
+ throw new Error(baseParsed.error || relativeParsed.error || "URI is malformed.");
3646
+ }
3647
+ const resolved = resolveComponent(baseParsed, relativeParsed, schemelessOptions, true);
3643
3648
  schemelessOptions.skipEscape = true;
3644
3649
  return serialize(resolved, schemelessOptions);
3645
3650
  }
@@ -3765,6 +3770,7 @@ var require_fast_uri = __commonJS({
3765
3770
  }
3766
3771
  var URI_PARSE = /^(?:([^#/:?]+):)?(?:\/\/((?:([^#/?@]*)@)?(\[[^#/?\]]+\]|[^#/:?]*)(?::(\d*))?))?([^#?]*)(?:\?([^#]*))?(?:#((?:.|[\n\r])*))?/u;
3767
3772
  var AUTHORITY_PREFIX = /^(?:[^#/:?]+:)?\/\/([^/?#]*)/;
3773
+ var AUTHORITY_INTRODUCER_REGION = /^(?:[^#/:?]+:)?([/\\\t\n\r]*)/;
3768
3774
  function getParseError(parsed, matches) {
3769
3775
  if (matches[2] !== void 0 && parsed.path && parsed.path[0] !== "/") {
3770
3776
  return 'URI path must start with "/" when authority is present.';
@@ -3799,6 +3805,20 @@ var require_fast_uri = __commonJS({
3799
3805
  parsed.error = "URI authority must not contain a literal backslash.";
3800
3806
  malformedAuthorityOrPort = true;
3801
3807
  }
3808
+ const introducerMatch = uri.match(AUTHORITY_INTRODUCER_REGION);
3809
+ if (introducerMatch !== null) {
3810
+ const region = introducerMatch[1];
3811
+ const normalizedRegion = region.replace(/[\t\n\r]/g, "");
3812
+ if (normalizedRegion.length >= 2) {
3813
+ if (normalizedRegion.slice(0, 2) !== "//") {
3814
+ parsed.error = parsed.error || "URI authority must not contain a literal backslash.";
3815
+ malformedAuthorityOrPort = true;
3816
+ } else if (region.length !== normalizedRegion.length) {
3817
+ parsed.error = parsed.error || "URI authority introducer must not contain whitespace.";
3818
+ malformedAuthorityOrPort = true;
3819
+ }
3820
+ }
3821
+ }
3802
3822
  const matches = uri.match(URI_PARSE);
3803
3823
  if (matches) {
3804
3824
  parsed.scheme = matches[1];
@@ -15832,6 +15852,10 @@ import {
15832
15852
  APPLICATION_REQUIREMENTS_VERSION,
15833
15853
  auditApplicationEntries,
15834
15854
  applicationRequirementScopes,
15855
+ compactActionCatalogEntry,
15856
+ compactActionPlan,
15857
+ compactActionValidation,
15858
+ compactApplicationAudit,
15835
15859
  friendlyAppId,
15836
15860
  listApplicationDirectory,
15837
15861
  requirementsForApplication,
@@ -15931,7 +15955,8 @@ var TOOLS = [
15931
15955
  properties: {
15932
15956
  query: { type: "string" },
15933
15957
  cursor: { type: "string" },
15934
- limit: { type: "integer", minimum: 1, maximum: 100, default: 25 }
15958
+ limit: { type: "integer", minimum: 1, maximum: 100, default: 25 },
15959
+ detail: { type: "boolean", description: "Return full schemas and agent contracts. Defaults to compact action guidance." }
15935
15960
  },
15936
15961
  additionalProperties: false
15937
15962
  },
@@ -15985,12 +16010,13 @@ var TOOLS = [
15985
16010
  handler: async (topolo, args) => {
15986
16011
  const service = typeof args["service"] === "string" ? args["service"].trim() : "";
15987
16012
  if (!service) throw new TopoloMcpPublicError("service is required for bounded action discovery.");
15988
- return topolo.client.searchActions({
16013
+ const result = await topolo.client.searchActions({
15989
16014
  service,
15990
16015
  query: typeof args["query"] === "string" ? args["query"] : void 0,
15991
16016
  cursor: typeof args["cursor"] === "string" ? args["cursor"] : void 0,
15992
16017
  limit: typeof args["limit"] === "number" ? args["limit"] : void 0
15993
16018
  });
16019
+ return args["detail"] === true ? result : { actions: result.actions.map(compactActionCatalogEntry), page: result.page };
15994
16020
  }
15995
16021
  },
15996
16022
  {
@@ -16156,7 +16182,8 @@ var TOOLS = [
16156
16182
  type: "object",
16157
16183
  properties: {
16158
16184
  actionId: { type: "string", minLength: 1 },
16159
- input: { type: "object", additionalProperties: true }
16185
+ input: { type: "object", additionalProperties: true },
16186
+ detail: { type: "boolean", description: "Include the full action contract. Defaults to a compact validation result." }
16160
16187
  },
16161
16188
  required: ["actionId"],
16162
16189
  additionalProperties: false
@@ -16165,7 +16192,8 @@ var TOOLS = [
16165
16192
  const actionId = typeof args["actionId"] === "string" ? args["actionId"].trim() : "";
16166
16193
  if (!actionId) throw new TopoloMcpPublicError("actionId is required.");
16167
16194
  const input = coerceObjectParam(args["input"], "input");
16168
- return topolo.client.validateActionInput(actionId, input);
16195
+ const result = await topolo.client.validateActionInput(actionId, input);
16196
+ return args["detail"] === true ? result : compactActionValidation(result.action.actionId, result.validation);
16169
16197
  }
16170
16198
  },
16171
16199
  {
@@ -16181,7 +16209,8 @@ var TOOLS = [
16181
16209
  input: { type: "object", additionalProperties: true },
16182
16210
  resourceType: { type: "string", description: "Optional resource-scoping alias published in the app resource catalog (e.g. workspace, brand, merchant)." },
16183
16211
  resourceId: { type: "string", description: "Resource id. Required when resourceType is provided." },
16184
- confirm: { type: "boolean", description: "Include confirmation in the plan without executing the action." }
16212
+ confirm: { type: "boolean", description: "Include confirmation in the plan without executing the action." },
16213
+ detail: { type: "boolean", description: "Include the full action contract. Defaults to the executable request and verification plan." }
16185
16214
  },
16186
16215
  required: ["actionId"],
16187
16216
  additionalProperties: false
@@ -16191,7 +16220,7 @@ var TOOLS = [
16191
16220
  if (!actionId) throw new TopoloMcpPublicError("actionId is required.");
16192
16221
  const input = coerceObjectParam(args["input"], "input");
16193
16222
  const resource = optionalResourceContext(args);
16194
- return topolo.client.planAction(
16223
+ const plan = await topolo.client.planAction(
16195
16224
  actionId,
16196
16225
  input,
16197
16226
  {
@@ -16199,6 +16228,7 @@ var TOOLS = [
16199
16228
  ...resource ? { resource } : {}
16200
16229
  }
16201
16230
  );
16231
+ return args["detail"] === true ? plan : compactActionPlan(plan);
16202
16232
  }
16203
16233
  },
16204
16234
  {
@@ -16232,14 +16262,18 @@ var TOOLS = [
16232
16262
  destructive: false,
16233
16263
  inputSchema: {
16234
16264
  type: "object",
16235
- properties: { service: { type: "string", minLength: 1 } },
16265
+ properties: {
16266
+ service: { type: "string", minLength: 1 },
16267
+ detail: { type: "boolean", description: "Return full schemas and agent contracts. Defaults to compact capability guidance." }
16268
+ },
16236
16269
  required: ["service"],
16237
16270
  additionalProperties: false
16238
16271
  },
16239
16272
  handler: async (topolo, args) => {
16240
16273
  const service = typeof args["service"] === "string" ? args["service"].trim() : "";
16241
16274
  if (!service) throw new TopoloMcpPublicError("service is required.");
16242
- return topolo.client.searchActions({ service, limit: 100 });
16275
+ const result = await topolo.client.searchActions({ service, limit: 100 });
16276
+ return args["detail"] === true ? result : { actions: result.actions.map(compactActionCatalogEntry), page: result.page };
16243
16277
  }
16244
16278
  },
16245
16279
  {
@@ -16407,6 +16441,10 @@ var TOOLS = [
16407
16441
  type: "string",
16408
16442
  enum: ["missing", "needs_review", "partial"],
16409
16443
  description: "Optional conformance gate. Returns conformanceGate.passed=false when findings at this severity or worse exist."
16444
+ },
16445
+ detail: {
16446
+ type: "boolean",
16447
+ description: "Include every finding and migration item. Defaults to per-app scores and a queue count."
16410
16448
  }
16411
16449
  },
16412
16450
  additionalProperties: false
@@ -16422,11 +16460,13 @@ var TOOLS = [
16422
16460
  if (application === void 0) {
16423
16461
  const directory = await listApplicationDirectory(topolo.client);
16424
16462
  report = auditApplicationEntries(directory.applications.map((app) => app.application));
16425
- return gate ? { ...report, conformanceGate: evaluateApplicationAuditGate(report, gate) } : report;
16463
+ const output2 = args["detail"] === true ? report : compactApplicationAudit(report);
16464
+ return gate ? { ...output2, conformanceGate: evaluateApplicationAuditGate(report, gate) } : output2;
16426
16465
  }
16427
16466
  const resolved = await resolveDirectoryApplication(topolo, application);
16428
16467
  report = auditApplicationEntries([resolved.application]);
16429
- return gate ? { ...report, conformanceGate: evaluateApplicationAuditGate(report, gate) } : report;
16468
+ const output = args["detail"] === true ? report : compactApplicationAudit(report);
16469
+ return gate ? { ...output, conformanceGate: evaluateApplicationAuditGate(report, gate) } : output;
16430
16470
  }
16431
16471
  },
16432
16472
  {
package/dist/index.js CHANGED
@@ -3908,6 +3908,52 @@ function mergeSignals(a, b) {
3908
3908
  b.addEventListener("abort", onAbort, { once: true });
3909
3909
  return controller.signal;
3910
3910
  }
3911
+ function compactActionCatalogEntry(action) {
3912
+ const required = Array.isArray(action.inputSchema["required"]) ? action.inputSchema["required"].filter((value) => typeof value === "string") : [];
3913
+ const examples = action.agentContract?.examples ?? [];
3914
+ return {
3915
+ actionId: action.actionId,
3916
+ title: action.title,
3917
+ description: action.description,
3918
+ method: action.method,
3919
+ readOnly: action.readOnly,
3920
+ requiresConfirmation: action.requiresConfirmation,
3921
+ agentAccess: action.agentAccess ?? (action.requiresConfirmation ? "confirm" : action.readOnly ? "auto" : "confirm"),
3922
+ requiredPermission: action.requiredPermission,
3923
+ requiredInput: required,
3924
+ resourceType: action.agentContract?.resource?.kind ?? null,
3925
+ exampleInput: examples[0]?.input ?? null,
3926
+ docsUrl: action.agentContract?.docsUrl ?? null
3927
+ };
3928
+ }
3929
+ function compactActionValidation(actionId, validation) {
3930
+ return { actionId, valid: validation.valid, errors: validation.errors };
3931
+ }
3932
+ function compactActionPlan(plan) {
3933
+ return {
3934
+ actionId: plan.action.actionId,
3935
+ valid: plan.validation.valid,
3936
+ errors: plan.validation.errors,
3937
+ executable: plan.executable,
3938
+ confirmationRequired: plan.confirmationRequired,
3939
+ confirmationProvided: plan.confirmationProvided,
3940
+ request: plan.request,
3941
+ verification: plan.verification,
3942
+ rollbackActionId: plan.rollbackActionId,
3943
+ nextActionIds: plan.nextActionIds
3944
+ };
3945
+ }
3946
+ function compactApplicationAudit(report) {
3947
+ return {
3948
+ version: report.version,
3949
+ applications: report.applications.map((audit) => ({
3950
+ applicationId: audit.application.id,
3951
+ applicationName: audit.application.name,
3952
+ score: audit.score
3953
+ })),
3954
+ migrationQueueCount: report.migrationQueue.length
3955
+ };
3956
+ }
3911
3957
  var CrmModule = class {
3912
3958
  constructor(client) {
3913
3959
  this.client = client;
@@ -4518,7 +4564,8 @@ var TOOLS = [
4518
4564
  properties: {
4519
4565
  query: { type: "string" },
4520
4566
  cursor: { type: "string" },
4521
- limit: { type: "integer", minimum: 1, maximum: 100, default: 25 }
4567
+ limit: { type: "integer", minimum: 1, maximum: 100, default: 25 },
4568
+ detail: { type: "boolean", description: "Return full schemas and agent contracts. Defaults to compact action guidance." }
4522
4569
  },
4523
4570
  additionalProperties: false
4524
4571
  },
@@ -4572,12 +4619,13 @@ var TOOLS = [
4572
4619
  handler: async (topolo, args) => {
4573
4620
  const service = typeof args["service"] === "string" ? args["service"].trim() : "";
4574
4621
  if (!service) throw new TopoloMcpPublicError("service is required for bounded action discovery.");
4575
- return topolo.client.searchActions({
4622
+ const result = await topolo.client.searchActions({
4576
4623
  service,
4577
4624
  query: typeof args["query"] === "string" ? args["query"] : void 0,
4578
4625
  cursor: typeof args["cursor"] === "string" ? args["cursor"] : void 0,
4579
4626
  limit: typeof args["limit"] === "number" ? args["limit"] : void 0
4580
4627
  });
4628
+ return args["detail"] === true ? result : { actions: result.actions.map(compactActionCatalogEntry), page: result.page };
4581
4629
  }
4582
4630
  },
4583
4631
  {
@@ -4743,7 +4791,8 @@ var TOOLS = [
4743
4791
  type: "object",
4744
4792
  properties: {
4745
4793
  actionId: { type: "string", minLength: 1 },
4746
- input: { type: "object", additionalProperties: true }
4794
+ input: { type: "object", additionalProperties: true },
4795
+ detail: { type: "boolean", description: "Include the full action contract. Defaults to a compact validation result." }
4747
4796
  },
4748
4797
  required: ["actionId"],
4749
4798
  additionalProperties: false
@@ -4752,7 +4801,8 @@ var TOOLS = [
4752
4801
  const actionId = typeof args["actionId"] === "string" ? args["actionId"].trim() : "";
4753
4802
  if (!actionId) throw new TopoloMcpPublicError("actionId is required.");
4754
4803
  const input = coerceObjectParam(args["input"], "input");
4755
- return topolo.client.validateActionInput(actionId, input);
4804
+ const result = await topolo.client.validateActionInput(actionId, input);
4805
+ return args["detail"] === true ? result : compactActionValidation(result.action.actionId, result.validation);
4756
4806
  }
4757
4807
  },
4758
4808
  {
@@ -4768,7 +4818,8 @@ var TOOLS = [
4768
4818
  input: { type: "object", additionalProperties: true },
4769
4819
  resourceType: { type: "string", description: "Optional resource-scoping alias published in the app resource catalog (e.g. workspace, brand, merchant)." },
4770
4820
  resourceId: { type: "string", description: "Resource id. Required when resourceType is provided." },
4771
- confirm: { type: "boolean", description: "Include confirmation in the plan without executing the action." }
4821
+ confirm: { type: "boolean", description: "Include confirmation in the plan without executing the action." },
4822
+ detail: { type: "boolean", description: "Include the full action contract. Defaults to the executable request and verification plan." }
4772
4823
  },
4773
4824
  required: ["actionId"],
4774
4825
  additionalProperties: false
@@ -4778,7 +4829,7 @@ var TOOLS = [
4778
4829
  if (!actionId) throw new TopoloMcpPublicError("actionId is required.");
4779
4830
  const input = coerceObjectParam(args["input"], "input");
4780
4831
  const resource = optionalResourceContext(args);
4781
- return topolo.client.planAction(
4832
+ const plan = await topolo.client.planAction(
4782
4833
  actionId,
4783
4834
  input,
4784
4835
  {
@@ -4786,6 +4837,7 @@ var TOOLS = [
4786
4837
  ...resource ? { resource } : {}
4787
4838
  }
4788
4839
  );
4840
+ return args["detail"] === true ? plan : compactActionPlan(plan);
4789
4841
  }
4790
4842
  },
4791
4843
  {
@@ -4819,14 +4871,18 @@ var TOOLS = [
4819
4871
  destructive: false,
4820
4872
  inputSchema: {
4821
4873
  type: "object",
4822
- properties: { service: { type: "string", minLength: 1 } },
4874
+ properties: {
4875
+ service: { type: "string", minLength: 1 },
4876
+ detail: { type: "boolean", description: "Return full schemas and agent contracts. Defaults to compact capability guidance." }
4877
+ },
4823
4878
  required: ["service"],
4824
4879
  additionalProperties: false
4825
4880
  },
4826
4881
  handler: async (topolo, args) => {
4827
4882
  const service = typeof args["service"] === "string" ? args["service"].trim() : "";
4828
4883
  if (!service) throw new TopoloMcpPublicError("service is required.");
4829
- return topolo.client.searchActions({ service, limit: 100 });
4884
+ const result = await topolo.client.searchActions({ service, limit: 100 });
4885
+ return args["detail"] === true ? result : { actions: result.actions.map(compactActionCatalogEntry), page: result.page };
4830
4886
  }
4831
4887
  },
4832
4888
  {
@@ -4994,6 +5050,10 @@ var TOOLS = [
4994
5050
  type: "string",
4995
5051
  enum: ["missing", "needs_review", "partial"],
4996
5052
  description: "Optional conformance gate. Returns conformanceGate.passed=false when findings at this severity or worse exist."
5053
+ },
5054
+ detail: {
5055
+ type: "boolean",
5056
+ description: "Include every finding and migration item. Defaults to per-app scores and a queue count."
4997
5057
  }
4998
5058
  },
4999
5059
  additionalProperties: false
@@ -5009,11 +5069,13 @@ var TOOLS = [
5009
5069
  if (application === void 0) {
5010
5070
  const directory = await listApplicationDirectory(topolo.client);
5011
5071
  report = auditApplicationEntries(directory.applications.map((app) => app.application));
5012
- return gate ? { ...report, conformanceGate: evaluateApplicationAuditGate(report, gate) } : report;
5072
+ const output2 = args["detail"] === true ? report : compactApplicationAudit(report);
5073
+ return gate ? { ...output2, conformanceGate: evaluateApplicationAuditGate(report, gate) } : output2;
5013
5074
  }
5014
5075
  const resolved = await resolveDirectoryApplication(topolo, application);
5015
5076
  report = auditApplicationEntries([resolved.application]);
5016
- return gate ? { ...report, conformanceGate: evaluateApplicationAuditGate(report, gate) } : report;
5077
+ const output = args["detail"] === true ? report : compactApplicationAudit(report);
5078
+ return gate ? { ...output, conformanceGate: evaluateApplicationAuditGate(report, gate) } : output;
5017
5079
  }
5018
5080
  },
5019
5081
  {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@topolo/mcp",
3
- "version": "0.10.0",
4
- "topoloPublishedVersion": "0.10.0",
3
+ "version": "0.10.1",
4
+ "topoloPublishedVersion": "0.10.1",
5
5
  "description": "Model Context Protocol server for the Topolo platform. Exposes scope-gated tools that third-party agents (Claude, Codex, etc.) can call natively.",
6
6
  "type": "module",
7
7
  "bin": {