@flexprice/mcp-server 2.1.3 → 2.1.5
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 +49 -33
- package/bin/mcp-server.js.map +20 -20
- package/bun.lock +34 -32
- 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/lib/sdks.js +0 -2
- package/esm/lib/sdks.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/addaddonrequest.d.ts +4 -0
- package/esm/models/addaddonrequest.d.ts.map +1 -1
- package/esm/models/addaddonrequest.js +4 -0
- package/esm/models/addaddonrequest.js.map +1 -1
- package/esm/models/addaddontosubscriptionrequest.d.ts +4 -0
- package/esm/models/addaddontosubscriptionrequest.d.ts.map +1 -1
- package/esm/models/addaddontosubscriptionrequest.js +4 -0
- package/esm/models/addaddontosubscriptionrequest.js.map +1 -1
- package/esm/models/addon.d.ts +0 -2
- package/esm/models/addon.d.ts.map +1 -1
- package/esm/models/addon.js +0 -2
- package/esm/models/addon.js.map +1 -1
- package/esm/models/addoncadence.d.ts +12 -0
- package/esm/models/addoncadence.d.ts.map +1 -0
- package/esm/models/addoncadence.js +13 -0
- package/esm/models/addoncadence.js.map +1 -0
- package/esm/models/addonresponse.d.ts +0 -2
- package/esm/models/addonresponse.d.ts.map +1 -1
- package/esm/models/addonresponse.js +0 -2
- package/esm/models/addonresponse.js.map +1 -1
- package/esm/models/addonstatus.d.ts +2 -2
- package/esm/models/addonstatus.js +2 -2
- package/esm/models/addonstatus.js.map +1 -1
- package/esm/models/createsubscriptionlineitemrequest.d.ts +2 -0
- package/esm/models/createsubscriptionlineitemrequest.d.ts.map +1 -1
- package/esm/models/createsubscriptionlineitemrequest.js +2 -0
- package/esm/models/createsubscriptionlineitemrequest.js.map +1 -1
- package/esm/models/deletesubscriptionlineitemrequest.d.ts +2 -0
- package/esm/models/deletesubscriptionlineitemrequest.d.ts.map +1 -1
- package/esm/models/deletesubscriptionlineitemrequest.js +2 -0
- package/esm/models/deletesubscriptionlineitemrequest.js.map +1 -1
- package/esm/models/removeaddonrequest.d.ts +3 -0
- package/esm/models/removeaddonrequest.d.ts.map +1 -1
- package/esm/models/removeaddonrequest.js +3 -0
- package/esm/models/removeaddonrequest.js.map +1 -1
- package/esm/models/subscriptionlineitemresponse.d.ts +1 -0
- package/esm/models/subscriptionlineitemresponse.d.ts.map +1 -1
- package/esm/models/subscriptionlineitemresponse.js +1 -0
- package/esm/models/subscriptionlineitemresponse.js.map +1 -1
- package/esm/models/subscriptionsubscriptionlineitem.d.ts +1 -0
- package/esm/models/subscriptionsubscriptionlineitem.d.ts.map +1 -1
- package/esm/models/subscriptionsubscriptionlineitem.js +1 -0
- package/esm/models/subscriptionsubscriptionlineitem.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/lib/sdks.ts +0 -2
- 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/addaddonrequest.ts +9 -0
- package/src/models/addaddontosubscriptionrequest.ts +9 -0
- package/src/models/addon.ts +0 -3
- package/src/models/{addontype.ts → addoncadence.ts} +5 -5
- package/src/models/addonresponse.ts +0 -3
- package/src/models/addonstatus.ts +2 -2
- package/src/models/createsubscriptionlineitemrequest.ts +6 -0
- package/src/models/deletesubscriptionlineitemrequest.ts +6 -0
- package/src/models/removeaddonrequest.ts +10 -0
- package/src/models/subscriptionlineitemresponse.ts +2 -0
- package/src/models/subscriptionsubscriptionlineitem.ts +2 -0
- package/esm/models/addontype.d.ts +0 -12
- package/esm/models/addontype.d.ts.map +0 -1
- package/esm/models/addontype.js +0 -13
- package/esm/models/addontype.js.map +0 -1
package/bin/mcp-server.js
CHANGED
|
@@ -50571,9 +50571,9 @@ var init_config = __esm(() => {
|
|
|
50571
50571
|
SDK_METADATA = {
|
|
50572
50572
|
language: "typescript",
|
|
50573
50573
|
openapiDocVersion: "1.0",
|
|
50574
|
-
sdkVersion: "2.1.
|
|
50575
|
-
genVersion: "2.
|
|
50576
|
-
userAgent: "speakeasy-sdk/mcp-typescript 2.1.
|
|
50574
|
+
sdkVersion: "2.1.5",
|
|
50575
|
+
genVersion: "2.881.4",
|
|
50576
|
+
userAgent: "speakeasy-sdk/mcp-typescript 2.1.5 2.881.4 1.0 @flexprice/mcp-server"
|
|
50577
50577
|
};
|
|
50578
50578
|
});
|
|
50579
50579
|
|
|
@@ -51305,8 +51305,6 @@ async function logResponse(logger, res, req) {
|
|
|
51305
51305
|
logger.log(await res.clone().json());
|
|
51306
51306
|
break;
|
|
51307
51307
|
case (matchContentType(res, "application/jsonl") || jsonlLikeContentTypeRE.test(ct)):
|
|
51308
|
-
logger.log(await res.clone().text());
|
|
51309
|
-
break;
|
|
51310
51308
|
case matchContentType(res, "text/event-stream"):
|
|
51311
51309
|
logger.log(`<${contentType}>`);
|
|
51312
51310
|
break;
|
|
@@ -51641,12 +51639,12 @@ function registerDynamicTools(logger, server, getSDK, toolMap, allowedScopes) {
|
|
|
51641
51639
|
|
|
51642
51640
|
`) }] };
|
|
51643
51641
|
});
|
|
51644
|
-
logger.debug("Registered dynamic meta-tool", { name: "
|
|
51642
|
+
logger.debug("Registered dynamic meta-tool", { name: "describe_tool_input" });
|
|
51645
51643
|
server.registerTool("execute_tool", {
|
|
51646
|
-
description: "Execute a tool by name with
|
|
51644
|
+
description: "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.",
|
|
51647
51645
|
inputSchema: {
|
|
51648
|
-
|
|
51649
|
-
|
|
51646
|
+
name: string2().describe("The name of the tool to execute"),
|
|
51647
|
+
arguments: looseObject({}).optional().describe("Arguments for the target tool as a JSON object, matching the schema returned by describe_tool_input.")
|
|
51650
51648
|
},
|
|
51651
51649
|
annotations: {
|
|
51652
51650
|
title: "Execute Tool",
|
|
@@ -51656,16 +51654,16 @@ function registerDynamicTools(logger, server, getSDK, toolMap, allowedScopes) {
|
|
|
51656
51654
|
openWorldHint: true
|
|
51657
51655
|
}
|
|
51658
51656
|
}, async (args, ctx) => {
|
|
51659
|
-
const def = toolMap.get(args.
|
|
51657
|
+
const def = toolMap.get(args.name);
|
|
51660
51658
|
if (!def) {
|
|
51661
51659
|
return {
|
|
51662
|
-
content: [{ type: "text", text: `Unknown tool: ${args.
|
|
51660
|
+
content: [{ type: "text", text: `Unknown tool: ${args.name}` }],
|
|
51663
51661
|
isError: true
|
|
51664
51662
|
};
|
|
51665
51663
|
}
|
|
51666
51664
|
let validatedInput = {};
|
|
51667
51665
|
if (def.args) {
|
|
51668
|
-
const vres = object(def.args).safeParse(args.
|
|
51666
|
+
const vres = object(def.args).safeParse(args.arguments ?? {});
|
|
51669
51667
|
if (vres.success) {
|
|
51670
51668
|
validatedInput = vres.data;
|
|
51671
51669
|
} else {
|
|
@@ -51673,7 +51671,7 @@ function registerDynamicTools(logger, server, getSDK, toolMap, allowedScopes) {
|
|
|
51673
51671
|
return {
|
|
51674
51672
|
content: [{
|
|
51675
51673
|
type: "text",
|
|
51676
|
-
text: `Invalid input for tool ${args.
|
|
51674
|
+
text: `Invalid input for tool ${args.name}:
|
|
51677
51675
|
<issues>
|
|
51678
51676
|
${issues}
|
|
51679
51677
|
</issues>`
|
|
@@ -51693,7 +51691,7 @@ ${issues}
|
|
|
51693
51691
|
return {
|
|
51694
51692
|
content: [{
|
|
51695
51693
|
type: "text",
|
|
51696
|
-
text: `Error executing tool ${args.
|
|
51694
|
+
text: `Error executing tool ${args.name}: ${message}`
|
|
51697
51695
|
}],
|
|
51698
51696
|
isError: true
|
|
51699
51697
|
};
|
|
@@ -54209,6 +54207,7 @@ var init_subscriptionsubscriptionlineitem = __esm(() => {
|
|
|
54209
54207
|
init_status();
|
|
54210
54208
|
init_subscriptionlineitementitytype();
|
|
54211
54209
|
SubscriptionSubscriptionLineItem$zodSchema = object({
|
|
54210
|
+
addon_association_id: string2().optional(),
|
|
54212
54211
|
billing_period: BillingPeriod$zodSchema.optional(),
|
|
54213
54212
|
billing_period_count: int().optional().describe("from price at create; default 1"),
|
|
54214
54213
|
commitment_amount: string2().optional().describe("Commitment fields"),
|
|
@@ -56461,16 +56460,6 @@ var init_paymentterms = __esm(() => {
|
|
|
56461
56460
|
]);
|
|
56462
56461
|
});
|
|
56463
56462
|
|
|
56464
|
-
// src/models/addontype.ts
|
|
56465
|
-
var AddonType$zodSchema;
|
|
56466
|
-
var init_addontype = __esm(() => {
|
|
56467
|
-
init_zod();
|
|
56468
|
-
AddonType$zodSchema = _enum([
|
|
56469
|
-
"onetime",
|
|
56470
|
-
"multiple_instance"
|
|
56471
|
-
]);
|
|
56472
|
-
});
|
|
56473
|
-
|
|
56474
56463
|
// src/models/priceunitresponse.ts
|
|
56475
56464
|
var PriceUnitResponse$zodSchema;
|
|
56476
56465
|
var init_priceunitresponse = __esm(() => {
|
|
@@ -56570,7 +56559,6 @@ Note: This is only applicable for recurring prices (BILLING_CADENCE_RECURRING)`)
|
|
|
56570
56559
|
var AddonResponse$zodSchema;
|
|
56571
56560
|
var init_addonresponse = __esm(() => {
|
|
56572
56561
|
init_zod();
|
|
56573
|
-
init_addontype();
|
|
56574
56562
|
init_entitlementresponse();
|
|
56575
56563
|
init_priceresponse();
|
|
56576
56564
|
init_status();
|
|
@@ -56587,7 +56575,6 @@ var init_addonresponse = __esm(() => {
|
|
|
56587
56575
|
prices: array(lazy(() => PriceResponse$zodSchema)).optional().describe("Optional expanded fields"),
|
|
56588
56576
|
status: Status$zodSchema.optional(),
|
|
56589
56577
|
tenant_id: string2().optional(),
|
|
56590
|
-
type: AddonType$zodSchema.optional(),
|
|
56591
56578
|
updated_at: exports_iso.datetime({ offset: true }).optional(),
|
|
56592
56579
|
updated_by: string2().optional()
|
|
56593
56580
|
});
|
|
@@ -60526,6 +60513,16 @@ Use when turning a draft subscription live (e.g. after collecting payment or com
|
|
|
60526
60513
|
};
|
|
60527
60514
|
});
|
|
60528
60515
|
|
|
60516
|
+
// src/models/addoncadence.ts
|
|
60517
|
+
var AddonCadence$zodSchema;
|
|
60518
|
+
var init_addoncadence = __esm(() => {
|
|
60519
|
+
init_zod();
|
|
60520
|
+
AddonCadence$zodSchema = _enum([
|
|
60521
|
+
"onetime",
|
|
60522
|
+
"recurring"
|
|
60523
|
+
]);
|
|
60524
|
+
});
|
|
60525
|
+
|
|
60529
60526
|
// src/models/lineitemcommitmentconfig.ts
|
|
60530
60527
|
var LineItemCommitmentConfig$zodSchema;
|
|
60531
60528
|
var init_lineitemcommitmentconfig = __esm(() => {
|
|
@@ -60547,11 +60544,15 @@ var init_lineitemcommitmentconfig = __esm(() => {
|
|
|
60547
60544
|
var AddAddonRequest$zodSchema;
|
|
60548
60545
|
var init_addaddonrequest = __esm(() => {
|
|
60549
60546
|
init_zod();
|
|
60547
|
+
init_addoncadence();
|
|
60550
60548
|
init_lineitemcommitmentconfig();
|
|
60549
|
+
init_prorationbehavior();
|
|
60551
60550
|
AddAddonRequest$zodSchema = object({
|
|
60552
60551
|
addon_id: string2(),
|
|
60552
|
+
cadence: AddonCadence$zodSchema.optional(),
|
|
60553
60553
|
line_item_commitments: record(string2(), LineItemCommitmentConfig$zodSchema).optional().describe("LineItemCommitments allows setting commitment configuration per addon line item (keyed by price_id)"),
|
|
60554
60554
|
metadata: record(string2(), any()).optional(),
|
|
60555
|
+
proration_behavior: ProrationBehavior$zodSchema.optional(),
|
|
60555
60556
|
start_date: exports_iso.datetime({ offset: true }).optional(),
|
|
60556
60557
|
subscription_id: string2()
|
|
60557
60558
|
});
|
|
@@ -61025,11 +61026,15 @@ Use when cancelling a scheduled change (e.g. customer changed mind). Identify by
|
|
|
61025
61026
|
var AddAddonToSubscriptionRequest$zodSchema;
|
|
61026
61027
|
var init_addaddontosubscriptionrequest = __esm(() => {
|
|
61027
61028
|
init_zod();
|
|
61029
|
+
init_addoncadence();
|
|
61028
61030
|
init_lineitemcommitmentconfig();
|
|
61031
|
+
init_prorationbehavior();
|
|
61029
61032
|
AddAddonToSubscriptionRequest$zodSchema = object({
|
|
61030
61033
|
addon_id: string2(),
|
|
61034
|
+
cadence: AddonCadence$zodSchema.optional(),
|
|
61031
61035
|
line_item_commitments: record(string2(), LineItemCommitmentConfig$zodSchema).optional().describe("LineItemCommitments allows setting commitment configuration per addon line item (keyed by price_id)"),
|
|
61032
61036
|
metadata: record(string2(), any()).optional(),
|
|
61037
|
+
proration_behavior: ProrationBehavior$zodSchema.optional(),
|
|
61033
61038
|
start_date: exports_iso.datetime({ offset: true }).optional()
|
|
61034
61039
|
});
|
|
61035
61040
|
});
|
|
@@ -61124,6 +61129,7 @@ var init_createsubscriptionlineitemrequest = __esm(() => {
|
|
|
61124
61129
|
init_zod();
|
|
61125
61130
|
init_billingperiod();
|
|
61126
61131
|
init_commitmenttype();
|
|
61132
|
+
init_prorationbehavior();
|
|
61127
61133
|
init_subscriptionpricecreaterequest();
|
|
61128
61134
|
CreateSubscriptionLineItemRequest$zodSchema = object({
|
|
61129
61135
|
commitment_amount: number2().optional().describe("Commitment fields"),
|
|
@@ -61138,6 +61144,7 @@ var init_createsubscriptionlineitemrequest = __esm(() => {
|
|
|
61138
61144
|
metadata: record(string2(), string2()).optional(),
|
|
61139
61145
|
price: SubscriptionPriceCreateRequest$zodSchema.optional(),
|
|
61140
61146
|
price_id: string2().optional().describe("PriceID references an existing price (plan, addon, or subscription-scoped). Exactly one of price_id or price must be set."),
|
|
61147
|
+
proration_behavior: ProrationBehavior$zodSchema.optional(),
|
|
61141
61148
|
quantity: number2().optional(),
|
|
61142
61149
|
start_date: exports_iso.datetime({ offset: true }).optional(),
|
|
61143
61150
|
subscription_phase_id: string2().optional()
|
|
@@ -61407,6 +61414,7 @@ var init_subscriptionlineitemresponse = __esm(() => {
|
|
|
61407
61414
|
init_status();
|
|
61408
61415
|
init_subscriptionlineitementitytype();
|
|
61409
61416
|
SubscriptionLineItemResponse$zodSchema = object({
|
|
61417
|
+
addon_association_id: string2().optional(),
|
|
61410
61418
|
billing_period: BillingPeriod$zodSchema.optional(),
|
|
61411
61419
|
billing_period_count: int().optional().describe("from price at create; default 1"),
|
|
61412
61420
|
commitment_amount: string2().optional().describe("Commitment fields"),
|
|
@@ -61584,8 +61592,10 @@ Use when adding a new charge or seat to a subscription (e.g. extra seat or one-t
|
|
|
61584
61592
|
var DeleteSubscriptionLineItemRequest$zodSchema;
|
|
61585
61593
|
var init_deletesubscriptionlineitemrequest = __esm(() => {
|
|
61586
61594
|
init_zod();
|
|
61595
|
+
init_prorationbehavior();
|
|
61587
61596
|
DeleteSubscriptionLineItemRequest$zodSchema = object({
|
|
61588
|
-
effective_from: string2().optional()
|
|
61597
|
+
effective_from: string2().optional(),
|
|
61598
|
+
proration_behavior: ProrationBehavior$zodSchema.optional()
|
|
61589
61599
|
});
|
|
61590
61600
|
});
|
|
61591
61601
|
|
|
@@ -62691,7 +62701,7 @@ var init_addonstatus = __esm(() => {
|
|
|
62691
62701
|
AddonStatus$zodSchema = _enum([
|
|
62692
62702
|
"active",
|
|
62693
62703
|
"cancelled",
|
|
62694
|
-
"
|
|
62704
|
+
"pending"
|
|
62695
62705
|
]);
|
|
62696
62706
|
});
|
|
62697
62707
|
|
|
@@ -64676,8 +64686,14 @@ Use when listing or searching subscriptions (e.g. admin view or customer subscri
|
|
|
64676
64686
|
var RemoveAddonRequest$zodSchema;
|
|
64677
64687
|
var init_removeaddonrequest = __esm(() => {
|
|
64678
64688
|
init_zod();
|
|
64689
|
+
init_prorationbehavior();
|
|
64679
64690
|
RemoveAddonRequest$zodSchema = object({
|
|
64680
64691
|
addon_association_id: string2(),
|
|
64692
|
+
effective_date: exports_iso.datetime({ offset: true }).optional().describe(`EffectiveDate is the date the cancellation takes effect.
|
|
64693
|
+
When nil the addon is cancelled at the end of the current period.
|
|
64694
|
+
When provided it must fall within [CurrentPeriodStart, CurrentPeriodEnd]; mid-period
|
|
64695
|
+
values combined with create_prorations will issue a wallet credit for unused time.`),
|
|
64696
|
+
proration_behavior: ProrationBehavior$zodSchema.optional(),
|
|
64681
64697
|
reason: string2().optional()
|
|
64682
64698
|
});
|
|
64683
64699
|
});
|
|
@@ -65248,7 +65264,7 @@ Use when changing a subscription line item (e.g. quantity or price). Implemented
|
|
|
65248
65264
|
function createMCPServer(deps) {
|
|
65249
65265
|
const server = new McpServer({
|
|
65250
65266
|
name: "Flexprice",
|
|
65251
|
-
version: "2.1.
|
|
65267
|
+
version: "2.1.5"
|
|
65252
65268
|
});
|
|
65253
65269
|
const getClient = deps.getSDK || (() => new FlexpriceCore({
|
|
65254
65270
|
security: deps.security,
|
|
@@ -69220,7 +69236,7 @@ var serveCommand = buildCommand({
|
|
|
69220
69236
|
},
|
|
69221
69237
|
mode: {
|
|
69222
69238
|
kind: "enum",
|
|
69223
|
-
brief: "Server mode (dynamic: expose list_tools,
|
|
69239
|
+
brief: "Server mode (dynamic: expose list_tools, describe_tool_input, and execute_tool instead of individual tools)",
|
|
69224
69240
|
values: ["dynamic"],
|
|
69225
69241
|
optional: true
|
|
69226
69242
|
},
|
|
@@ -69326,7 +69342,7 @@ var startCommand = buildCommand({
|
|
|
69326
69342
|
},
|
|
69327
69343
|
mode: {
|
|
69328
69344
|
kind: "enum",
|
|
69329
|
-
brief: "Server mode (dynamic: expose list_tools,
|
|
69345
|
+
brief: "Server mode (dynamic: expose list_tools, describe_tool_input, and execute_tool instead of individual tools)",
|
|
69330
69346
|
values: ["dynamic"],
|
|
69331
69347
|
optional: true
|
|
69332
69348
|
},
|
|
@@ -69411,7 +69427,7 @@ var routes = buildRouteMap({
|
|
|
69411
69427
|
var app = buildApplication(routes, {
|
|
69412
69428
|
name: "mcp",
|
|
69413
69429
|
versionInfo: {
|
|
69414
|
-
currentVersion: "2.1.
|
|
69430
|
+
currentVersion: "2.1.5"
|
|
69415
69431
|
}
|
|
69416
69432
|
});
|
|
69417
69433
|
run(app, process4.argv.slice(2), buildContext(process4));
|
|
@@ -69419,5 +69435,5 @@ export {
|
|
|
69419
69435
|
app
|
|
69420
69436
|
};
|
|
69421
69437
|
|
|
69422
|
-
//# debugId=
|
|
69438
|
+
//# debugId=C82BE3DD4332E7B264756E2164756E21
|
|
69423
69439
|
//# sourceMappingURL=mcp-server.js.map
|