Skip to content

Commit 7a8aefb

Browse files
fix(mcp): generate additionalProperties=true for map schemas to avoid validation issues
1 parent 53ee586 commit 7a8aefb

File tree

14 files changed

+73
-8
lines changed

14 files changed

+73
-8
lines changed

packages/mcp-server/src/tools/checkout-sessions/create-checkout-sessions.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ export const tool: Tool = {
4949
type: 'object',
5050
description:
5151
'Metadata that will get added to the purchase or subscription created when this checkout session succeeds. Ignored if the checkout session is of type `invoice`.',
52+
additionalProperties: true,
5253
},
5354
outputName: {
5455
type: 'string',
@@ -91,6 +92,7 @@ export const tool: Tool = {
9192
type: 'object',
9293
description:
9394
'Metadata that will get added to the purchase or subscription created when this checkout session succeeds. Ignored if the checkout session is of type `invoice`.',
95+
additionalProperties: true,
9496
},
9597
outputName: {
9698
type: 'string',
@@ -134,6 +136,7 @@ export const tool: Tool = {
134136
type: 'object',
135137
description:
136138
'Metadata that will get added to the purchase or subscription created when this checkout session succeeds. Ignored if the checkout session is of type `invoice`.',
139+
additionalProperties: true,
137140
},
138141
outputName: {
139142
type: 'string',

packages/mcp-server/src/tools/payment-methods/list-payment-methods.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ export const metadata: Metadata = {
1818
export const tool: Tool = {
1919
name: 'list_payment_methods',
2020
description:
21-
"When using this tool, always use the `jq_filter` parameter to reduce the response size and improve performance.\n\nOnly omit if you're sure you don't need the data.\n\nList Payment Methods\n\n# Response Schema\n```json\n{\n type: 'object',\n properties: {\n data: {\n type: 'array',\n items: {\n type: 'object',\n properties: {\n id: {\n type: 'string'\n },\n billingDetails: {\n type: 'object',\n properties: {\n address: {\n type: 'object',\n properties: {\n city: {\n type: 'string'\n },\n country: {\n type: 'string'\n },\n line1: {\n type: 'string'\n },\n line2: {\n type: 'string'\n },\n postal_code: {\n type: 'string'\n },\n state: {\n type: 'string'\n },\n address: {\n type: 'object',\n properties: {\n city: {\n type: 'string'\n },\n country: {\n type: 'string'\n },\n line1: {\n type: 'string'\n },\n line2: {\n type: 'string'\n },\n postal_code: {\n type: 'string'\n },\n state: {\n type: 'string'\n },\n name: {\n type: 'string'\n }\n },\n required: [ 'city',\n 'country',\n 'line1',\n 'line2',\n 'postal_code',\n 'state'\n ]\n },\n name: {\n type: 'string'\n }\n },\n required: [ 'city',\n 'country',\n 'line1',\n 'line2',\n 'postal_code',\n 'state'\n ]\n },\n email: {\n type: 'string'\n },\n name: {\n type: 'string'\n }\n },\n required: [ 'address',\n 'email',\n 'name'\n ]\n },\n createdAt: {\n type: 'string',\n format: 'date-time'\n },\n createdByCommit: {\n type: 'string'\n },\n customerId: {\n type: 'string'\n },\n default: {\n type: 'boolean'\n },\n livemode: {\n type: 'boolean'\n },\n metadata: {\n type: 'object'\n },\n paymentMethodData: {\n type: 'object'\n },\n type: {\n type: 'string',\n enum: [ 'card',\n 'link',\n 'us_bank_account',\n 'sepa_debit'\n ]\n },\n updatedAt: {\n type: 'string',\n format: 'date-time'\n },\n updatedByCommit: {\n type: 'string'\n }\n },\n required: [ 'id',\n 'billingDetails',\n 'createdAt',\n 'createdByCommit',\n 'customerId',\n 'default',\n 'livemode',\n 'metadata',\n 'paymentMethodData',\n 'type',\n 'updatedAt',\n 'updatedByCommit'\n ]\n }\n },\n hasMore: {\n type: 'boolean'\n },\n total: {\n type: 'number'\n },\n currentCursor: {\n type: 'string'\n },\n nextCursor: {\n type: 'string'\n }\n },\n required: [ 'data',\n 'hasMore',\n 'total'\n ]\n}\n```",
21+
"When using this tool, always use the `jq_filter` parameter to reduce the response size and improve performance.\n\nOnly omit if you're sure you don't need the data.\n\nList Payment Methods\n\n# Response Schema\n```json\n{\n type: 'object',\n properties: {\n data: {\n type: 'array',\n items: {\n type: 'object',\n properties: {\n id: {\n type: 'string'\n },\n billingDetails: {\n type: 'object',\n properties: {\n address: {\n type: 'object',\n properties: {\n city: {\n type: 'string'\n },\n country: {\n type: 'string'\n },\n line1: {\n type: 'string'\n },\n line2: {\n type: 'string'\n },\n postal_code: {\n type: 'string'\n },\n state: {\n type: 'string'\n },\n address: {\n type: 'object',\n properties: {\n city: {\n type: 'string'\n },\n country: {\n type: 'string'\n },\n line1: {\n type: 'string'\n },\n line2: {\n type: 'string'\n },\n postal_code: {\n type: 'string'\n },\n state: {\n type: 'string'\n },\n name: {\n type: 'string'\n }\n },\n required: [ 'city',\n 'country',\n 'line1',\n 'line2',\n 'postal_code',\n 'state'\n ]\n },\n name: {\n type: 'string'\n }\n },\n required: [ 'city',\n 'country',\n 'line1',\n 'line2',\n 'postal_code',\n 'state'\n ]\n },\n email: {\n type: 'string'\n },\n name: {\n type: 'string'\n }\n },\n required: [ 'address',\n 'email',\n 'name'\n ]\n },\n createdAt: {\n type: 'string',\n format: 'date-time'\n },\n createdByCommit: {\n type: 'string'\n },\n customerId: {\n type: 'string'\n },\n default: {\n type: 'boolean'\n },\n livemode: {\n type: 'boolean'\n },\n metadata: {\n type: 'object',\n additionalProperties: true\n },\n paymentMethodData: {\n type: 'object',\n additionalProperties: true\n },\n type: {\n type: 'string',\n enum: [ 'card',\n 'link',\n 'us_bank_account',\n 'sepa_debit'\n ]\n },\n updatedAt: {\n type: 'string',\n format: 'date-time'\n },\n updatedByCommit: {\n type: 'string'\n }\n },\n required: [ 'id',\n 'billingDetails',\n 'createdAt',\n 'createdByCommit',\n 'customerId',\n 'default',\n 'livemode',\n 'metadata',\n 'paymentMethodData',\n 'type',\n 'updatedAt',\n 'updatedByCommit'\n ]\n }\n },\n hasMore: {\n type: 'boolean'\n },\n total: {\n type: 'number'\n },\n currentCursor: {\n type: 'string'\n },\n nextCursor: {\n type: 'string'\n }\n },\n required: [ 'data',\n 'hasMore',\n 'total'\n ]\n}\n```",
2222
inputSchema: {
2323
type: 'object',
2424
properties: {

packages/mcp-server/src/tools/payment-methods/retrieve-payment-methods.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ export const metadata: Metadata = {
1818
export const tool: Tool = {
1919
name: 'retrieve_payment_methods',
2020
description:
21-
"When using this tool, always use the `jq_filter` parameter to reduce the response size and improve performance.\n\nOnly omit if you're sure you don't need the data.\n\nGet Payment Method\n\n# Response Schema\n```json\n{\n type: 'object',\n properties: {\n paymentMethod: {\n type: 'object',\n properties: {\n id: {\n type: 'string'\n },\n billingDetails: {\n type: 'object',\n properties: {\n address: {\n type: 'object',\n properties: {\n city: {\n type: 'string'\n },\n country: {\n type: 'string'\n },\n line1: {\n type: 'string'\n },\n line2: {\n type: 'string'\n },\n postal_code: {\n type: 'string'\n },\n state: {\n type: 'string'\n },\n address: {\n type: 'object',\n properties: {\n city: {\n type: 'string'\n },\n country: {\n type: 'string'\n },\n line1: {\n type: 'string'\n },\n line2: {\n type: 'string'\n },\n postal_code: {\n type: 'string'\n },\n state: {\n type: 'string'\n },\n name: {\n type: 'string'\n }\n },\n required: [ 'city',\n 'country',\n 'line1',\n 'line2',\n 'postal_code',\n 'state'\n ]\n },\n name: {\n type: 'string'\n }\n },\n required: [ 'city',\n 'country',\n 'line1',\n 'line2',\n 'postal_code',\n 'state'\n ]\n },\n email: {\n type: 'string'\n },\n name: {\n type: 'string'\n }\n },\n required: [ 'address',\n 'email',\n 'name'\n ]\n },\n createdAt: {\n type: 'string',\n format: 'date-time'\n },\n createdByCommit: {\n type: 'string'\n },\n customerId: {\n type: 'string'\n },\n default: {\n type: 'boolean'\n },\n livemode: {\n type: 'boolean'\n },\n metadata: {\n type: 'object'\n },\n paymentMethodData: {\n type: 'object'\n },\n type: {\n type: 'string',\n enum: [ 'card',\n 'link',\n 'us_bank_account',\n 'sepa_debit'\n ]\n },\n updatedAt: {\n type: 'string',\n format: 'date-time'\n },\n updatedByCommit: {\n type: 'string'\n }\n },\n required: [ 'id',\n 'billingDetails',\n 'createdAt',\n 'createdByCommit',\n 'customerId',\n 'default',\n 'livemode',\n 'metadata',\n 'paymentMethodData',\n 'type',\n 'updatedAt',\n 'updatedByCommit'\n ]\n }\n },\n required: [ 'paymentMethod'\n ]\n}\n```",
21+
"When using this tool, always use the `jq_filter` parameter to reduce the response size and improve performance.\n\nOnly omit if you're sure you don't need the data.\n\nGet Payment Method\n\n# Response Schema\n```json\n{\n type: 'object',\n properties: {\n paymentMethod: {\n type: 'object',\n properties: {\n id: {\n type: 'string'\n },\n billingDetails: {\n type: 'object',\n properties: {\n address: {\n type: 'object',\n properties: {\n city: {\n type: 'string'\n },\n country: {\n type: 'string'\n },\n line1: {\n type: 'string'\n },\n line2: {\n type: 'string'\n },\n postal_code: {\n type: 'string'\n },\n state: {\n type: 'string'\n },\n address: {\n type: 'object',\n properties: {\n city: {\n type: 'string'\n },\n country: {\n type: 'string'\n },\n line1: {\n type: 'string'\n },\n line2: {\n type: 'string'\n },\n postal_code: {\n type: 'string'\n },\n state: {\n type: 'string'\n },\n name: {\n type: 'string'\n }\n },\n required: [ 'city',\n 'country',\n 'line1',\n 'line2',\n 'postal_code',\n 'state'\n ]\n },\n name: {\n type: 'string'\n }\n },\n required: [ 'city',\n 'country',\n 'line1',\n 'line2',\n 'postal_code',\n 'state'\n ]\n },\n email: {\n type: 'string'\n },\n name: {\n type: 'string'\n }\n },\n required: [ 'address',\n 'email',\n 'name'\n ]\n },\n createdAt: {\n type: 'string',\n format: 'date-time'\n },\n createdByCommit: {\n type: 'string'\n },\n customerId: {\n type: 'string'\n },\n default: {\n type: 'boolean'\n },\n livemode: {\n type: 'boolean'\n },\n metadata: {\n type: 'object',\n additionalProperties: true\n },\n paymentMethodData: {\n type: 'object',\n additionalProperties: true\n },\n type: {\n type: 'string',\n enum: [ 'card',\n 'link',\n 'us_bank_account',\n 'sepa_debit'\n ]\n },\n updatedAt: {\n type: 'string',\n format: 'date-time'\n },\n updatedByCommit: {\n type: 'string'\n }\n },\n required: [ 'id',\n 'billingDetails',\n 'createdAt',\n 'createdByCommit',\n 'customerId',\n 'default',\n 'livemode',\n 'metadata',\n 'paymentMethodData',\n 'type',\n 'updatedAt',\n 'updatedByCommit'\n ]\n }\n },\n required: [ 'paymentMethod'\n ]\n}\n```",
2222
inputSchema: {
2323
type: 'object',
2424
properties: {

0 commit comments

Comments
 (0)