@flexprice/mcp-server 2.1.3 → 2.1.4

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/manifest.json CHANGED
@@ -48,7 +48,7 @@
48
48
  "sensitive": true
49
49
  }
50
50
  },
51
- "version": "2.1.3",
51
+ "version": "2.1.4",
52
52
  "tools": [
53
53
  {
54
54
  "name": "update-customer",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@flexprice/mcp-server",
3
- "version": "2.1.3",
3
+ "version": "2.1.4",
4
4
  "author": "flexprice",
5
5
  "type": "module",
6
6
  "sideEffects": false,
package/src/lib/config.ts CHANGED
@@ -69,8 +69,8 @@ export function serverURLFromOptions(options: SDKOptions): URL | null {
69
69
  export const SDK_METADATA = {
70
70
  language: "typescript",
71
71
  openapiDocVersion: "1.0",
72
- sdkVersion: "2.1.3",
73
- genVersion: "2.879.13",
72
+ sdkVersion: "2.1.4",
73
+ genVersion: "2.881.0",
74
74
  userAgent:
75
- "speakeasy-sdk/mcp-typescript 2.1.3 2.879.13 1.0 @flexprice/mcp-server",
75
+ "speakeasy-sdk/mcp-typescript 2.1.4 2.881.0 1.0 @flexprice/mcp-server",
76
76
  } as const;
@@ -40,7 +40,7 @@ export const serveCommand = buildCommand({
40
40
  mode: {
41
41
  kind: "enum",
42
42
  brief:
43
- "Server mode (dynamic: expose list_tools, describe_tool, and execute_tool instead of individual tools)",
43
+ "Server mode (dynamic: expose list_tools, describe_tool_input, and execute_tool instead of individual tools)",
44
44
  values: ["dynamic"],
45
45
  optional: true,
46
46
  },
@@ -40,7 +40,7 @@ export const startCommand = buildCommand({
40
40
  mode: {
41
41
  kind: "enum",
42
42
  brief:
43
- "Server mode (dynamic: expose list_tools, describe_tool, and execute_tool instead of individual tools)",
43
+ "Server mode (dynamic: expose list_tools, describe_tool_input, and execute_tool instead of individual tools)",
44
44
  values: ["dynamic"],
45
45
  optional: true,
46
46
  },
@@ -21,7 +21,7 @@ const routes = buildRouteMap({
21
21
  export const app = buildApplication(routes, {
22
22
  name: "mcp",
23
23
  versionInfo: {
24
- currentVersion: "2.1.3",
24
+ currentVersion: "2.1.4",
25
25
  },
26
26
  });
27
27
 
@@ -104,7 +104,7 @@ export function createMCPServer(deps: {
104
104
  }) {
105
105
  const server = new McpServer({
106
106
  name: "Flexprice",
107
- version: "2.1.3",
107
+ version: "2.1.4",
108
108
  });
109
109
 
110
110
  const getClient = deps.getSDK || (() =>
@@ -358,16 +358,16 @@ export function registerDynamicTools(
358
358
 
359
359
  return { content: [{ type: "text", text: parts.join("\n\n") }] };
360
360
  });
361
- logger.debug("Registered dynamic meta-tool", { name: "describe_tool" });
361
+ logger.debug("Registered dynamic meta-tool", { name: "describe_tool_input" });
362
362
 
363
363
  // 3. execute_tool
364
364
  server.registerTool("execute_tool", {
365
365
  description:
366
- "Execute a tool by name with the provided input parameters. If executing a given tool for the first time, it is recommended to call describe_tool_input first to understand the expected input schema.",
366
+ "Execute a tool by name with its arguments. If executing a given tool for the first time, it is recommended to call describe_tool_input first to understand the expected `arguments` shape.",
367
367
  inputSchema: {
368
- tool_name: z.string().describe("The name of the tool to execute"),
369
- input: z.record(z.string(), z.unknown()).optional().describe(
370
- "Input parameters for the tool as a JSON object",
368
+ name: z.string().describe("The name of the tool to execute"),
369
+ arguments: z.looseObject({}).optional().describe(
370
+ "Arguments for the target tool as a JSON object, matching the schema returned by describe_tool_input.",
371
371
  ),
372
372
  },
373
373
  annotations: {
@@ -378,17 +378,17 @@ export function registerDynamicTools(
378
378
  openWorldHint: true,
379
379
  },
380
380
  }, async (args, ctx) => {
381
- const def = toolMap.get(args.tool_name);
381
+ const def = toolMap.get(args.name);
382
382
  if (!def) {
383
383
  return {
384
- content: [{ type: "text", text: `Unknown tool: ${args.tool_name}` }],
384
+ content: [{ type: "text", text: `Unknown tool: ${args.name}` }],
385
385
  isError: true,
386
386
  };
387
387
  }
388
388
 
389
389
  let validatedInput: Record<string, unknown> = {};
390
390
  if (def.args) {
391
- const vres = z.object(def.args).safeParse(args.input ?? {});
391
+ const vres = z.object(def.args).safeParse(args.arguments ?? {});
392
392
  if (vres.success) {
393
393
  validatedInput = vres.data;
394
394
  } else {
@@ -398,7 +398,7 @@ export function registerDynamicTools(
398
398
  content: [{
399
399
  type: "text",
400
400
  text:
401
- `Invalid input for tool ${args.tool_name}:\n<issues>\n${issues}\n</issues>`,
401
+ `Invalid input for tool ${args.name}:\n<issues>\n${issues}\n</issues>`,
402
402
  }],
403
403
  isError: true,
404
404
  };
@@ -416,7 +416,7 @@ export function registerDynamicTools(
416
416
  return {
417
417
  content: [{
418
418
  type: "text",
419
- text: `Error executing tool ${args.tool_name}: ${message}`,
419
+ text: `Error executing tool ${args.name}: ${message}`,
420
420
  }],
421
421
  isError: true,
422
422
  };
@@ -6,7 +6,6 @@ import * as z from "zod";
6
6
  import { ClosedEnum } from "../types/enums.js";
7
7
 
8
8
  export const WindowSize = {
9
- Month: "MONTH",
10
9
  Minute: "MINUTE",
11
10
  FifteenMIN: "15MIN",
12
11
  ThirtyMIN: "30MIN",
@@ -16,11 +15,11 @@ export const WindowSize = {
16
15
  TwelveHOUR: "12HOUR",
17
16
  Day: "DAY",
18
17
  Week: "WEEK",
18
+ Month: "MONTH",
19
19
  } as const;
20
20
  export type WindowSize = ClosedEnum<typeof WindowSize>;
21
21
 
22
22
  export const WindowSize$zodSchema = z.enum([
23
- "MONTH",
24
23
  "MINUTE",
25
24
  "15MIN",
26
25
  "30MIN",
@@ -30,4 +29,5 @@ export const WindowSize$zodSchema = z.enum([
30
29
  "12HOUR",
31
30
  "DAY",
32
31
  "WEEK",
32
+ "MONTH",
33
33
  ]);