@postman/sdk-config 0.20.0 → 0.23.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.
@@ -934,12 +934,34 @@ var mcpToolsetNameSchema = nonEmptyStringSchema.refine(
934
934
  (name) => name !== "default" && /^[a-z0-9-]+$/.test(name),
935
935
  'toolset names must match [a-z0-9-]+ and cannot be "default"'
936
936
  );
937
+ var MCP_TOOL_NAME_PATTERN = /^[a-zA-Z0-9_-]{1,64}$/;
938
+ var mcpToolNameSchema = nonEmptyStringSchema.refine(
939
+ (name) => MCP_TOOL_NAME_PATTERN.test(name),
940
+ "tool names must match [a-zA-Z0-9_-]{1,64}"
941
+ );
942
+ var mcpMergedToolSchema = mcpToolFilterSchema.extend({
943
+ dispatchOn: nonEmptyStringSchema.describe(
944
+ "The tool argument whose value selects which member operation to call."
945
+ ),
946
+ description: nonEmptyStringSchema.optional().describe("Overrides the generated description of the merged tool.")
947
+ });
948
+ var mcpCustomToolSchema = zod.z.strictObject({
949
+ path: relativePathSchema.describe(
950
+ "Path to a TypeScript module that exports the tool `definition` and `handler`."
951
+ )
952
+ });
937
953
  var mcpGenerationConfigSchema = typescriptGenerationConfigSchema.extend({
938
954
  serverName: nonEmptyStringSchema.optional().describe("The name advertised by the generated MCP server."),
939
955
  serverDescription: nonEmptyStringSchema.optional().describe("The description advertised by the generated MCP server."),
940
956
  excludeAvailability: zod.z.array(zod.z.enum(mcpAvailabilityStatuses)).optional().describe("Operation availability statuses excluded from MCP tool generation."),
941
957
  tools: mcpToolFilterSchema.optional().describe("Global operation filters for generated MCP tools."),
942
- toolsets: zod.z.record(mcpToolsetNameSchema, mcpToolFilterSchema).optional().describe("Named MCP toolsets and the operation filters for each toolset.")
958
+ toolsets: zod.z.record(mcpToolsetNameSchema, mcpToolFilterSchema).optional().describe("Named MCP toolsets and the operation filters for each toolset."),
959
+ mergedTools: zod.z.record(mcpToolNameSchema, mcpMergedToolSchema).optional().describe(
960
+ "Tools that fan several operations into one, dispatching on an argument. Each entry selects its member operations with the same include/exclude filter as `tools`."
961
+ ),
962
+ customTools: zod.z.record(mcpToolNameSchema, mcpCustomToolSchema).optional().describe(
963
+ "Hand-written tools, keyed by tool name, each pointing at a TypeScript module that exports its `definition` and `handler`. Emitted alongside the operation-derived tools."
964
+ )
943
965
  });
944
966
  var phpGenerationConfigSchema = zod.z.strictObject({
945
967
  propertyAccess: zod.z.enum(["public", "private"]).optional().describe("The visibility of generated PHP model properties."),
@@ -1910,6 +1932,7 @@ function parseSdkConfigIrV1ForConsumption(value) {
1910
1932
  }
1911
1933
 
1912
1934
  exports.CLI_DISTRIBUTION_NON_RELEASE_MODE_CODE = CLI_DISTRIBUTION_NON_RELEASE_MODE_CODE;
1935
+ exports.MCP_TOOL_NAME_PATTERN = MCP_TOOL_NAME_PATTERN;
1913
1936
  exports.SDK_CONFIG_IR_V1_SCHEMA_VERSION = SDK_CONFIG_IR_V1_SCHEMA_VERSION;
1914
1937
  exports.apiConfigSchema = apiConfigSchema;
1915
1938
  exports.apiImportSettingsSchema = apiImportSettingsSchema;