@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/bin/mcp-server.js +19 -19
- package/bin/mcp-server.js.map +9 -9
- package/esm/lib/config.d.ts +3 -3
- package/esm/lib/config.js +3 -3
- package/esm/lib/config.js.map +1 -1
- package/esm/mcp-server/cli/serve/command.js +1 -1
- package/esm/mcp-server/cli/serve/command.js.map +1 -1
- package/esm/mcp-server/cli/start/command.js +1 -1
- package/esm/mcp-server/cli/start/command.js.map +1 -1
- package/esm/mcp-server/mcp-server.js +1 -1
- package/esm/mcp-server/server.js +1 -1
- package/esm/mcp-server/tools.js +9 -9
- package/esm/mcp-server/tools.js.map +1 -1
- package/esm/models/creditgrantexpirydurationunit.d.ts +1 -1
- package/esm/models/windowsize.d.ts +2 -2
- package/esm/models/windowsize.js +2 -2
- package/esm/models/windowsize.js.map +1 -1
- package/esm/tsconfig.tsbuildinfo +1 -1
- package/manifest.json +1 -1
- package/package.json +1 -1
- package/src/lib/config.ts +3 -3
- package/src/mcp-server/cli/serve/command.ts +1 -1
- package/src/mcp-server/cli/start/command.ts +1 -1
- package/src/mcp-server/mcp-server.ts +1 -1
- package/src/mcp-server/server.ts +1 -1
- package/src/mcp-server/tools.ts +10 -10
- package/src/models/windowsize.ts +2 -2
package/manifest.json
CHANGED
package/package.json
CHANGED
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.
|
|
73
|
-
genVersion: "2.
|
|
72
|
+
sdkVersion: "2.1.4",
|
|
73
|
+
genVersion: "2.881.0",
|
|
74
74
|
userAgent:
|
|
75
|
-
"speakeasy-sdk/mcp-typescript 2.1.
|
|
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,
|
|
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,
|
|
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
|
},
|
package/src/mcp-server/server.ts
CHANGED
package/src/mcp-server/tools.ts
CHANGED
|
@@ -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: "
|
|
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
|
|
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
|
-
|
|
369
|
-
|
|
370
|
-
"
|
|
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.
|
|
381
|
+
const def = toolMap.get(args.name);
|
|
382
382
|
if (!def) {
|
|
383
383
|
return {
|
|
384
|
-
content: [{ type: "text", text: `Unknown tool: ${args.
|
|
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.
|
|
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.
|
|
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.
|
|
419
|
+
text: `Error executing tool ${args.name}: ${message}`,
|
|
420
420
|
}],
|
|
421
421
|
isError: true,
|
|
422
422
|
};
|
package/src/models/windowsize.ts
CHANGED
|
@@ -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
|
]);
|