From b19a4e9c549f751fe6c53f15a7888a530bb0fa56 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 3 Jul 2025 04:11:22 +0000 Subject: [PATCH 01/44] chore: add docs to RequestOptions type --- src/client.ts | 2 ++ src/internal/request-options.ts | 53 +++++++++++++++++++++++++++++++++ 2 files changed, 55 insertions(+) diff --git a/src/client.ts b/src/client.ts index f4422a7..cb93eed 100644 --- a/src/client.ts +++ b/src/client.ts @@ -345,6 +345,8 @@ export interface ClientOptions { * * Note that request timeouts are retried by default, so in a worst-case scenario you may wait * much longer than this timeout before the promise succeeds or fails. + * + * @unit milliseconds */ timeout?: number | undefined; /** diff --git a/src/internal/request-options.ts b/src/internal/request-options.ts index 7de032f..2aabf9a 100644 --- a/src/internal/request-options.ts +++ b/src/internal/request-options.ts @@ -9,17 +9,70 @@ import { type HeadersLike } from './headers'; export type FinalRequestOptions = RequestOptions & { method: HTTPMethod; path: string }; export type RequestOptions = { + /** + * The HTTP method for the request (e.g., 'get', 'post', 'put', 'delete'). + */ method?: HTTPMethod; + + /** + * The URL path for the request. + * + * @example "/v1/foo" + */ path?: string; + + /** + * Query parameters to include in the request URL. + */ query?: object | undefined | null; + + /** + * The request body. Can be a string, JSON object, FormData, or other supported types. + */ body?: unknown; + + /** + * HTTP headers to include with the request. Can be a Headers object, plain object, or array of tuples. + */ headers?: HeadersLike; + + /** + * The maximum number of times that the client will retry a request in case of a + * temporary failure, like a network error or a 5XX error from the server. + * + * @default 2 + */ maxRetries?: number; + stream?: boolean | undefined; + + /** + * The maximum amount of time (in milliseconds) that the client should wait for a response + * from the server before timing out a single request. + * + * @unit milliseconds + */ timeout?: number; + + /** + * Additional `RequestInit` options to be passed to the underlying `fetch` call. + * These options will be merged with the client's default fetch options. + */ fetchOptions?: MergedRequestInit; + + /** + * An AbortSignal that can be used to cancel the request. + */ signal?: AbortSignal | undefined | null; + + /** + * A unique key for this request to enable idempotency. + */ idempotencyKey?: string; + + /** + * Override the default base URL for this specific request. + */ defaultBaseURL?: string | undefined; __binaryResponse?: boolean | undefined; From a4cd42713bbe37d5c2b1441359676a5cb2dd50c2 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 10 Jul 2025 04:44:28 +0000 Subject: [PATCH 02/44] chore: make some internal functions async --- src/client.ts | 41 ++++++++++++++++++++++------------------- tests/index.test.ts | 30 +++++++++++++++--------------- 2 files changed, 37 insertions(+), 34 deletions(-) diff --git a/src/client.ts b/src/client.ts index cb93eed..f0b2e83 100644 --- a/src/client.ts +++ b/src/client.ts @@ -502,7 +502,7 @@ export class Hyperswitch { * Create a new client instance re-using the same options given to the current client with optional overriding. */ withOptions(options: Partial): this { - return new (this.constructor as any as new (props: ClientOptions) => typeof this)({ + const client = new (this.constructor as any as new (props: ClientOptions) => typeof this)({ ...this._options, baseURL: this.baseURL, maxRetries: this.maxRetries, @@ -517,6 +517,7 @@ export class Hyperswitch { publishableKey: this.publishableKey, ...options, }); + return client; } /** @@ -534,28 +535,28 @@ export class Hyperswitch { return; } - protected authHeaders(opts: FinalRequestOptions): NullableHeaders | undefined { + protected async authHeaders(opts: FinalRequestOptions): Promise { return buildHeaders([ - this.apiKeyAuth(opts), - this.ephemeralKeyAuth(opts), - this.jwtKeyAuth(opts), - this.publishableKeyAuth(opts), + await this.apiKeyAuth(opts), + await this.ephemeralKeyAuth(opts), + await this.jwtKeyAuth(opts), + await this.publishableKeyAuth(opts), ]); } - protected apiKeyAuth(opts: FinalRequestOptions): NullableHeaders | undefined { + protected async apiKeyAuth(opts: FinalRequestOptions): Promise { return buildHeaders([{ 'api-key': this.apiKey }]); } - protected ephemeralKeyAuth(opts: FinalRequestOptions): NullableHeaders | undefined { + protected async ephemeralKeyAuth(opts: FinalRequestOptions): Promise { return buildHeaders([{ 'api-key': this.ephemeralKey }]); } - protected jwtKeyAuth(opts: FinalRequestOptions): NullableHeaders | undefined { + protected async jwtKeyAuth(opts: FinalRequestOptions): Promise { return buildHeaders([{ Authorization: `Bearer ${this.jwtKey}` }]); } - protected publishableKeyAuth(opts: FinalRequestOptions): NullableHeaders | undefined { + protected async publishableKeyAuth(opts: FinalRequestOptions): Promise { return buildHeaders([{ 'api-key': this.publishableKey }]); } @@ -671,7 +672,9 @@ export class Hyperswitch { await this.prepareOptions(options); - const { req, url, timeout } = this.buildRequest(options, { retryCount: maxRetries - retriesRemaining }); + const { req, url, timeout } = await this.buildRequest(options, { + retryCount: maxRetries - retriesRemaining, + }); await this.prepareRequest(req, { url, options }); @@ -749,7 +752,7 @@ export class Hyperswitch { } with status ${response.status} in ${headersTime - startTime}ms`; if (!response.ok) { - const shouldRetry = this.shouldRetry(response); + const shouldRetry = await this.shouldRetry(response); if (retriesRemaining && shouldRetry) { const retryMessage = `retrying, ${retriesRemaining} attempts remaining`; @@ -848,7 +851,7 @@ export class Hyperswitch { } } - private shouldRetry(response: Response): boolean { + private async shouldRetry(response: Response): Promise { // Note this is not a standard header. const shouldRetryHeader = response.headers.get('x-should-retry'); @@ -925,10 +928,10 @@ export class Hyperswitch { return sleepSeconds * jitter * 1000; } - buildRequest( + async buildRequest( inputOptions: FinalRequestOptions, { retryCount = 0 }: { retryCount?: number } = {}, - ): { req: FinalizedRequestInit; url: string; timeout: number } { + ): Promise<{ req: FinalizedRequestInit; url: string; timeout: number }> { const options = { ...inputOptions }; const { method, path, query, defaultBaseURL } = options; @@ -936,7 +939,7 @@ export class Hyperswitch { if ('timeout' in options) validatePositiveInteger('timeout', options.timeout); options.timeout = options.timeout ?? this.timeout; const { bodyHeaders, body } = this.buildBody({ options }); - const reqHeaders = this.buildHeaders({ options: inputOptions, method, bodyHeaders, retryCount }); + const reqHeaders = await this.buildHeaders({ options: inputOptions, method, bodyHeaders, retryCount }); const req: FinalizedRequestInit = { method, @@ -952,7 +955,7 @@ export class Hyperswitch { return { req, url, timeout: options.timeout }; } - private buildHeaders({ + private async buildHeaders({ options, method, bodyHeaders, @@ -962,7 +965,7 @@ export class Hyperswitch { method: HTTPMethod; bodyHeaders: HeadersLike; retryCount: number; - }): Headers { + }): Promise { let idempotencyHeaders: HeadersLike = {}; if (this.idempotencyHeader && method !== 'get') { if (!options.idempotencyKey) options.idempotencyKey = this.defaultIdempotencyKey(); @@ -978,7 +981,7 @@ export class Hyperswitch { ...(options.timeout ? { 'X-Stainless-Timeout': String(Math.trunc(options.timeout / 1000)) } : {}), ...getPlatformHeaders(), }, - this.authHeaders(options), + await this.authHeaders(options), this._options.defaultHeaders, bodyHeaders, options.headers, diff --git a/tests/index.test.ts b/tests/index.test.ts index 3894abc..7e28ee5 100644 --- a/tests/index.test.ts +++ b/tests/index.test.ts @@ -29,13 +29,13 @@ describe('instantiate client', () => { publishableKey: 'My Publishable Key', }); - test('they are used in the request', () => { - const { req } = client.buildRequest({ path: '/foo', method: 'post' }); + test('they are used in the request', async () => { + const { req } = await client.buildRequest({ path: '/foo', method: 'post' }); expect(req.headers.get('x-my-default-header')).toEqual('2'); }); - test('can ignore `undefined` and leave the default', () => { - const { req } = client.buildRequest({ + test('can ignore `undefined` and leave the default', async () => { + const { req } = await client.buildRequest({ path: '/foo', method: 'post', headers: { 'X-My-Default-Header': undefined }, @@ -43,8 +43,8 @@ describe('instantiate client', () => { expect(req.headers.get('x-my-default-header')).toEqual('2'); }); - test('can be removed with `null`', () => { - const { req } = client.buildRequest({ + test('can be removed with `null`', async () => { + const { req } = await client.buildRequest({ path: '/foo', method: 'post', headers: { 'X-My-Default-Header': null }, @@ -477,7 +477,7 @@ describe('instantiate client', () => { }); describe('withOptions', () => { - test('creates a new client with overridden options', () => { + test('creates a new client with overridden options', async () => { const client = new Hyperswitch({ baseURL: 'http://localhost:5000/', maxRetries: 3, @@ -505,7 +505,7 @@ describe('instantiate client', () => { expect(newClient.constructor).toBe(client.constructor); }); - test('inherits options from the parent client', () => { + test('inherits options from the parent client', async () => { const client = new Hyperswitch({ baseURL: 'http://localhost:5000/', defaultHeaders: { 'X-Test-Header': 'test-value' }, @@ -523,7 +523,7 @@ describe('instantiate client', () => { // Test inherited options remain the same expect(newClient.buildURL('/foo', null)).toEqual('http://localhost:5001/foo?test-param=test-value'); - const { req } = newClient.buildRequest({ path: '/foo', method: 'get' }); + const { req } = await newClient.buildRequest({ path: '/foo', method: 'get' }); expect(req.headers.get('x-test-header')).toEqual('test-value'); }); @@ -602,8 +602,8 @@ describe('request building', () => { }); describe('custom headers', () => { - test('handles undefined', () => { - const { req } = client.buildRequest({ + test('handles undefined', async () => { + const { req } = await client.buildRequest({ path: '/foo', method: 'post', body: { value: 'hello' }, @@ -643,8 +643,8 @@ describe('default encoder', () => { } } for (const jsonValue of [{}, [], { __proto__: null }, new Serializable(), new Collection(['item'])]) { - test(`serializes ${util.inspect(jsonValue)} as json`, () => { - const { req } = client.buildRequest({ + test(`serializes ${util.inspect(jsonValue)} as json`, async () => { + const { req } = await client.buildRequest({ path: '/foo', method: 'post', body: jsonValue, @@ -667,7 +667,7 @@ describe('default encoder', () => { asyncIterable, ]) { test(`converts ${util.inspect(streamValue)} to ReadableStream`, async () => { - const { req } = client.buildRequest({ + const { req } = await client.buildRequest({ path: '/foo', method: 'post', body: streamValue, @@ -680,7 +680,7 @@ describe('default encoder', () => { } test(`can set content-type for ReadableStream`, async () => { - const { req } = client.buildRequest({ + const { req } = await client.buildRequest({ path: '/foo', method: 'post', body: new Response('a\nb\nc\n').body, From 1eba97c82c9501f1be5d958502e9d069bb99cc0a Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 11 Jul 2025 04:03:07 +0000 Subject: [PATCH 03/44] chore(internal): codegen related update --- packages/mcp-server/package.json | 1 + packages/mcp-server/src/filtering.ts | 13 +++++++++++++ .../create-accounts-business-profile.ts | 3 ++- .../delete-accounts-business-profile.ts | 14 ++++++++++++-- ...routing-business-profile-accounts-contracts.ts | 15 +++++++++++++-- ...routing-business-profile-accounts-contracts.ts | 15 +++++++++++++-- ...uting-business-profile-accounts-elimination.ts | 15 +++++++++++++-- ...ing-business-profile-accounts-success-based.ts | 15 +++++++++++++-- ...ing-business-profile-accounts-success-based.ts | 15 +++++++++++++-- .../list-accounts-business-profile.ts | 3 ++- .../retrieve-accounts-business-profile.ts | 3 ++- .../update-accounts-business-profile.ts | 3 ++- .../connectors/create-accounts-connectors.ts | 2 +- .../connectors/delete-accounts-connectors.ts | 14 ++++++++++++-- .../connectors/list-accounts-connectors.ts | 3 ++- .../connectors/retrieve-accounts-connectors.ts | 3 ++- .../connectors/update-accounts-connectors.ts | 2 +- .../src/tools/accounts/create-accounts.ts | 2 +- .../src/tools/accounts/delete-accounts.ts | 12 ++++++++++-- .../mcp-server/src/tools/accounts/kv-accounts.ts | 12 ++++++++++-- .../accounts/list-payment-methods-accounts.ts | 2 +- .../src/tools/accounts/retrieve-accounts.ts | 3 ++- .../src/tools/accounts/update-accounts.ts | 2 +- .../src/tools/api-keys/create-api-keys.ts | 11 +++++++++-- .../src/tools/api-keys/list-api-keys.ts | 12 ++++++++++-- .../src/tools/api-keys/retrieve-api-keys.ts | 12 ++++++++++-- .../src/tools/api-keys/revoke-api-keys.ts | 11 +++++++++-- .../src/tools/api-keys/update-api-keys.ts | 12 ++++++++++-- .../tools/authentication/create-authentication.ts | 3 ++- .../src/tools/blocklist/create-blocklist.ts | 14 ++++++++++++-- .../src/tools/blocklist/delete-blocklist.ts | 14 ++++++++++++-- .../src/tools/blocklist/retrieve-blocklist.ts | 12 ++++++++++-- .../src/tools/blocklist/toggle-blocklist.ts | 12 ++++++++++-- .../src/tools/customers/create-customers.ts | 2 +- .../src/tools/customers/delete-customers.ts | 12 ++++++++++-- .../src/tools/customers/list-customers.ts | 12 ++++++++++-- .../tools/customers/list-mandates-customers.ts | 12 ++++++++++-- .../list-customers-payment-methods.ts | 3 ++- .../list-saved-customers-payment-methods.ts | 2 +- .../src/tools/customers/retrieve-customers.ts | 12 ++++++++++-- .../src/tools/customers/update-customers.ts | 3 ++- .../src/tools/disputes/list-disputes.ts | 12 ++++++++++-- .../src/tools/disputes/retrieve-disputes.ts | 12 ++++++++++-- .../src/tools/events/delivery-attempts-events.ts | 12 ++++++++++-- .../mcp-server/src/tools/events/list-events.ts | 12 ++++++++++-- .../tools/events/profile/list-events-profile.ts | 12 ++++++++++-- .../mcp-server/src/tools/events/retry-events.ts | 12 ++++++++++-- packages/mcp-server/src/tools/gsm/create-gsm.ts | 11 +++++++++-- packages/mcp-server/src/tools/gsm/delete-gsm.ts | 12 ++++++++++-- packages/mcp-server/src/tools/gsm/retrieve-gsm.ts | 12 ++++++++++-- packages/mcp-server/src/tools/gsm/update-gsm.ts | 12 ++++++++++-- .../src/tools/mandates/retrieve-mandates.ts | 12 ++++++++++-- .../src/tools/mandates/revoke-mandates.ts | 12 ++++++++++-- .../src/tools/organization/create-organization.ts | 12 ++++++++++-- .../tools/organization/retrieve-organization.ts | 12 ++++++++++-- .../src/tools/organization/update-organization.ts | 12 ++++++++++-- .../tools/payment-link/retrieve-payment-link.ts | 13 +++++++++++-- .../payment-methods/create-payment-methods.ts | 2 +- .../payment-methods/delete-payment-methods.ts | 12 ++++++++++-- .../payment-methods/retrieve-payment-methods.ts | 3 ++- .../set-default-payment-methods.ts | 14 ++++++++++++-- .../payment-methods/update-payment-methods.ts | 2 +- .../src/tools/payments/cancel-payments.ts | 8 +++++++- .../src/tools/payments/capture-payments.ts | 2 +- .../tools/payments/complete-authorize-payments.ts | 3 ++- .../src/tools/payments/confirm-payments.ts | 2 +- .../src/tools/payments/create-payments.ts | 2 +- .../payments/create-session-token-payments.ts | 2 +- .../incremental-authorization-payments.ts | 3 ++- .../src/tools/payments/list-payments.ts | 3 ++- .../authenticate-payments-number-3ds.ts | 14 ++++++++++++-- .../payments/post-session-tokens-payments.ts | 3 ++- .../src/tools/payments/retrieve-payments.ts | 2 +- .../tools/payments/update-metadata-payments.ts | 12 ++++++++++-- .../src/tools/payments/update-payments.ts | 2 +- .../src/tools/payouts/cancel-payouts.ts | 3 ++- .../src/tools/payouts/confirm-payouts.ts | 3 ++- .../src/tools/payouts/create-payouts.ts | 3 ++- .../src/tools/payouts/fulfill-payouts.ts | 3 ++- .../src/tools/payouts/list-filters-payouts.ts | 12 ++++++++++-- .../tools/payouts/list/retrieve-payouts-list.ts | 3 ++- .../payouts/list/with-filters-payouts-list.ts | 3 ++- .../src/tools/payouts/retrieve-payouts.ts | 3 ++- .../src/tools/payouts/update-payouts.ts | 3 ++- .../src/tools/poll/retrieve-status-poll.ts | 12 ++++++++++-- .../profile-acquirers/create-profile-acquirers.ts | 12 ++++++++++-- .../profile-acquirers/update-profile-acquirers.ts | 14 ++++++++++++-- .../src/tools/refunds/create-refunds.ts | 2 +- .../mcp-server/src/tools/refunds/list-refunds.ts | 2 +- .../src/tools/refunds/retrieve-refunds.ts | 12 ++++++++++-- .../src/tools/refunds/update-refunds.ts | 11 +++++++++-- .../mcp-server/src/tools/relay/create-relay.ts | 12 ++++++++++-- .../mcp-server/src/tools/relay/retrieve-relay.ts | 12 ++++++++++-- .../src/tools/routing/activate-routing.ts | 12 ++++++++++-- .../src/tools/routing/create-routing.ts | 3 ++- .../src/tools/routing/deactivate-routing.ts | 3 ++- .../profile/retrieve-default-routing-profile.ts | 15 ++++++++++++--- .../profile/update-default-routing-profile.ts | 14 ++++++++++++-- .../routing/default/retrieve-routing-default.ts | 15 ++++++++++++--- .../routing/default/update-routing-default.ts | 12 ++++++++++-- .../mcp-server/src/tools/routing/list-routing.ts | 12 ++++++++++-- .../src/tools/routing/retrieve-active-routing.ts | 3 ++- .../src/tools/routing/retrieve-routing.ts | 3 ++- .../execute-three-ds-decision.ts | 3 ++- packages/mcp-server/src/tools/types.ts | 2 +- 105 files changed, 687 insertions(+), 161 deletions(-) create mode 100644 packages/mcp-server/src/filtering.ts diff --git a/packages/mcp-server/package.json b/packages/mcp-server/package.json index cc291df..167c841 100644 --- a/packages/mcp-server/package.json +++ b/packages/mcp-server/package.json @@ -29,6 +29,7 @@ "dependencies": { "hyperswitch": "file:../../dist/", "@modelcontextprotocol/sdk": "^1.11.5", + "jq-web": "^0.6.2", "yargs": "^17.7.2", "@cloudflare/cabidela": "^0.2.4", "zod": "^3.25.20", diff --git a/packages/mcp-server/src/filtering.ts b/packages/mcp-server/src/filtering.ts new file mode 100644 index 0000000..e560736 --- /dev/null +++ b/packages/mcp-server/src/filtering.ts @@ -0,0 +1,13 @@ +export async function maybeFilter(args: Record | undefined, response: any): Promise { + const jqFilter = args?.['jq_filter']; + if (jqFilter && typeof jqFilter === 'string') { + return await jq(response, jqFilter); + } else { + return response; + } +} + +var jqWeb = require('jq-web'); +async function jq(json: any, jqFilter: string) { + return (await jqWeb).json(json, jqFilter); +} diff --git a/packages/mcp-server/src/tools/accounts/business-profile/create-accounts-business-profile.ts b/packages/mcp-server/src/tools/accounts/business-profile/create-accounts-business-profile.ts index f0244b2..908b82f 100644 --- a/packages/mcp-server/src/tools/accounts/business-profile/create-accounts-business-profile.ts +++ b/packages/mcp-server/src/tools/accounts/business-profile/create-accounts-business-profile.ts @@ -17,7 +17,8 @@ export const metadata: Metadata = { export const tool: Tool = { name: 'create_accounts_business_profile', - description: 'Creates a new *profile* for a merchant', + description: + "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\nCreates a new *profile* for a merchant", inputSchema: { type: 'object', properties: { diff --git a/packages/mcp-server/src/tools/accounts/business-profile/delete-accounts-business-profile.ts b/packages/mcp-server/src/tools/accounts/business-profile/delete-accounts-business-profile.ts index 2984f13..f2e9f8f 100644 --- a/packages/mcp-server/src/tools/accounts/business-profile/delete-accounts-business-profile.ts +++ b/packages/mcp-server/src/tools/accounts/business-profile/delete-accounts-business-profile.ts @@ -1,5 +1,6 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. +import { maybeFilter } from 'hyperswitch-mcp/filtering'; import { asTextContentResult } from 'hyperswitch-mcp/tools/types'; import { Tool } from '@modelcontextprotocol/sdk/types.js'; @@ -17,7 +18,8 @@ export const metadata: Metadata = { export const tool: Tool = { name: 'delete_accounts_business_profile', - description: 'Delete the *profile*', + description: + "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\nDelete the *profile*\n\n# Response Schema\n```json\n{\n type: 'boolean'\n}\n```", inputSchema: { type: 'object', properties: { @@ -27,13 +29,21 @@ export const tool: Tool = { profile_id: { type: 'string', }, + jq_filter: { + type: 'string', + title: 'jq Filter', + description: + 'A jq filter to apply to the response to include certain fields. Consult the output schema in the tool description to see the fields that are available.\n\nFor example: to include only the `name` field in every object of a results array, you can provide ".results[].name".\n\nFor more information, see the [jq documentation](https://jqlang.org/manual/).', + }, }, }, }; export const handler = async (client: Hyperswitch, args: Record | undefined) => { const { profile_id, ...body } = args as any; - return asTextContentResult(await client.accounts.businessProfile.delete(profile_id, body)); + return asTextContentResult( + await maybeFilter(args, await client.accounts.businessProfile.delete(profile_id, body)), + ); }; export default { metadata, tool, handler }; diff --git a/packages/mcp-server/src/tools/accounts/business-profile/dynamic-routing/contracts/toggle-dynamic-routing-business-profile-accounts-contracts.ts b/packages/mcp-server/src/tools/accounts/business-profile/dynamic-routing/contracts/toggle-dynamic-routing-business-profile-accounts-contracts.ts index 7829510..8be3193 100644 --- a/packages/mcp-server/src/tools/accounts/business-profile/dynamic-routing/contracts/toggle-dynamic-routing-business-profile-accounts-contracts.ts +++ b/packages/mcp-server/src/tools/accounts/business-profile/dynamic-routing/contracts/toggle-dynamic-routing-business-profile-accounts-contracts.ts @@ -1,5 +1,6 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. +import { maybeFilter } from 'hyperswitch-mcp/filtering'; import { asTextContentResult } from 'hyperswitch-mcp/tools/types'; import { Tool } from '@modelcontextprotocol/sdk/types.js'; @@ -17,7 +18,8 @@ export const metadata: Metadata = { export const tool: Tool = { name: 'toggle_dynamic_routing_business_profile_accounts_contracts', - description: 'Create a Contract based dynamic routing algorithm', + description: + "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\nCreate a Contract based dynamic routing algorithm\n\n# Response Schema\n```json\n{\n $ref: '#/$defs/routing_dictionary_record',\n $defs: {\n routing_dictionary_record: {\n type: 'object',\n properties: {\n id: {\n type: 'string'\n },\n created_at: {\n type: 'integer'\n },\n description: {\n type: 'string'\n },\n kind: {\n type: 'string',\n enum: [ 'single',\n 'priority',\n 'volume_split',\n 'advanced',\n 'dynamic',\n 'three_ds_decision_rule'\n ]\n },\n modified_at: {\n type: 'integer'\n },\n name: {\n type: 'string'\n },\n profile_id: {\n type: 'string'\n },\n algorithm_for: {\n $ref: '#/$defs/transaction_type'\n },\n decision_engine_routing_id: {\n type: 'string'\n }\n },\n required: [ 'id',\n 'created_at',\n 'description',\n 'kind',\n 'modified_at',\n 'name',\n 'profile_id'\n ]\n },\n transaction_type: {\n type: 'string',\n enum: [ 'payment',\n 'payout',\n 'three_ds_authentication'\n ]\n }\n }\n}\n```", inputSchema: { type: 'object', properties: { @@ -67,6 +69,12 @@ export const tool: Tool = { required: ['label', 'mca_id', 'target_count', 'target_time'], }, }, + jq_filter: { + type: 'string', + title: 'jq Filter', + description: + 'A jq filter to apply to the response to include certain fields. Consult the output schema in the tool description to see the fields that are available.\n\nFor example: to include only the `name` field in every object of a results array, you can provide ".results[].name".\n\nFor more information, see the [jq documentation](https://jqlang.org/manual/).', + }, }, $defs: { dynamic_routing_features: { @@ -80,7 +88,10 @@ export const tool: Tool = { export const handler = async (client: Hyperswitch, args: Record | undefined) => { const { profile_id, ...body } = args as any; return asTextContentResult( - await client.accounts.businessProfile.dynamicRouting.contracts.toggle(profile_id, body), + await maybeFilter( + args, + await client.accounts.businessProfile.dynamicRouting.contracts.toggle(profile_id, body), + ), ); }; diff --git a/packages/mcp-server/src/tools/accounts/business-profile/dynamic-routing/contracts/update-config-dynamic-routing-business-profile-accounts-contracts.ts b/packages/mcp-server/src/tools/accounts/business-profile/dynamic-routing/contracts/update-config-dynamic-routing-business-profile-accounts-contracts.ts index 778341b..375cc9f 100644 --- a/packages/mcp-server/src/tools/accounts/business-profile/dynamic-routing/contracts/update-config-dynamic-routing-business-profile-accounts-contracts.ts +++ b/packages/mcp-server/src/tools/accounts/business-profile/dynamic-routing/contracts/update-config-dynamic-routing-business-profile-accounts-contracts.ts @@ -1,5 +1,6 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. +import { maybeFilter } from 'hyperswitch-mcp/filtering'; import { asTextContentResult } from 'hyperswitch-mcp/tools/types'; import { Tool } from '@modelcontextprotocol/sdk/types.js'; @@ -18,7 +19,8 @@ export const metadata: Metadata = { export const tool: Tool = { name: 'update_config_dynamic_routing_business_profile_accounts_contracts', - description: 'Update contract based dynamic routing algorithm', + description: + "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\nUpdate contract based dynamic routing algorithm\n\n# Response Schema\n```json\n{\n $ref: '#/$defs/routing_dictionary_record',\n $defs: {\n routing_dictionary_record: {\n type: 'object',\n properties: {\n id: {\n type: 'string'\n },\n created_at: {\n type: 'integer'\n },\n description: {\n type: 'string'\n },\n kind: {\n type: 'string',\n enum: [ 'single',\n 'priority',\n 'volume_split',\n 'advanced',\n 'dynamic',\n 'three_ds_decision_rule'\n ]\n },\n modified_at: {\n type: 'integer'\n },\n name: {\n type: 'string'\n },\n profile_id: {\n type: 'string'\n },\n algorithm_for: {\n $ref: '#/$defs/transaction_type'\n },\n decision_engine_routing_id: {\n type: 'string'\n }\n },\n required: [ 'id',\n 'created_at',\n 'description',\n 'kind',\n 'modified_at',\n 'name',\n 'profile_id'\n ]\n },\n transaction_type: {\n type: 'string',\n enum: [ 'payment',\n 'payout',\n 'three_ds_authentication'\n ]\n }\n }\n}\n```", inputSchema: { type: 'object', properties: { @@ -68,6 +70,12 @@ export const tool: Tool = { required: ['label', 'mca_id', 'target_count', 'target_time'], }, }, + jq_filter: { + type: 'string', + title: 'jq Filter', + description: + 'A jq filter to apply to the response to include certain fields. Consult the output schema in the tool description to see the fields that are available.\n\nFor example: to include only the `name` field in every object of a results array, you can provide ".results[].name".\n\nFor more information, see the [jq documentation](https://jqlang.org/manual/).', + }, }, }, }; @@ -75,7 +83,10 @@ export const tool: Tool = { export const handler = async (client: Hyperswitch, args: Record | undefined) => { const { algorithm_id, ...body } = args as any; return asTextContentResult( - await client.accounts.businessProfile.dynamicRouting.contracts.updateConfig(algorithm_id, body), + await maybeFilter( + args, + await client.accounts.businessProfile.dynamicRouting.contracts.updateConfig(algorithm_id, body), + ), ); }; diff --git a/packages/mcp-server/src/tools/accounts/business-profile/dynamic-routing/elimination/toggle-dynamic-routing-business-profile-accounts-elimination.ts b/packages/mcp-server/src/tools/accounts/business-profile/dynamic-routing/elimination/toggle-dynamic-routing-business-profile-accounts-elimination.ts index fa675ce..6bd4f44 100644 --- a/packages/mcp-server/src/tools/accounts/business-profile/dynamic-routing/elimination/toggle-dynamic-routing-business-profile-accounts-elimination.ts +++ b/packages/mcp-server/src/tools/accounts/business-profile/dynamic-routing/elimination/toggle-dynamic-routing-business-profile-accounts-elimination.ts @@ -1,5 +1,6 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. +import { maybeFilter } from 'hyperswitch-mcp/filtering'; import { asTextContentResult } from 'hyperswitch-mcp/tools/types'; import { Tool } from '@modelcontextprotocol/sdk/types.js'; @@ -17,7 +18,8 @@ export const metadata: Metadata = { export const tool: Tool = { name: 'toggle_dynamic_routing_business_profile_accounts_elimination', - description: 'Create a elimination based dynamic routing algorithm', + description: + "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\nCreate a elimination based dynamic routing algorithm\n\n# Response Schema\n```json\n{\n $ref: '#/$defs/routing_dictionary_record',\n $defs: {\n routing_dictionary_record: {\n type: 'object',\n properties: {\n id: {\n type: 'string'\n },\n created_at: {\n type: 'integer'\n },\n description: {\n type: 'string'\n },\n kind: {\n type: 'string',\n enum: [ 'single',\n 'priority',\n 'volume_split',\n 'advanced',\n 'dynamic',\n 'three_ds_decision_rule'\n ]\n },\n modified_at: {\n type: 'integer'\n },\n name: {\n type: 'string'\n },\n profile_id: {\n type: 'string'\n },\n algorithm_for: {\n $ref: '#/$defs/transaction_type'\n },\n decision_engine_routing_id: {\n type: 'string'\n }\n },\n required: [ 'id',\n 'created_at',\n 'description',\n 'kind',\n 'modified_at',\n 'name',\n 'profile_id'\n ]\n },\n transaction_type: {\n type: 'string',\n enum: [ 'payment',\n 'payout',\n 'three_ds_authentication'\n ]\n }\n }\n}\n```", inputSchema: { type: 'object', properties: { @@ -30,6 +32,12 @@ export const tool: Tool = { enable: { $ref: '#/$defs/dynamic_routing_features', }, + jq_filter: { + type: 'string', + title: 'jq Filter', + description: + 'A jq filter to apply to the response to include certain fields. Consult the output schema in the tool description to see the fields that are available.\n\nFor example: to include only the `name` field in every object of a results array, you can provide ".results[].name".\n\nFor more information, see the [jq documentation](https://jqlang.org/manual/).', + }, }, $defs: { dynamic_routing_features: { @@ -43,7 +51,10 @@ export const tool: Tool = { export const handler = async (client: Hyperswitch, args: Record | undefined) => { const { profile_id, ...body } = args as any; return asTextContentResult( - await client.accounts.businessProfile.dynamicRouting.elimination.toggle(profile_id, body), + await maybeFilter( + args, + await client.accounts.businessProfile.dynamicRouting.elimination.toggle(profile_id, body), + ), ); }; diff --git a/packages/mcp-server/src/tools/accounts/business-profile/dynamic-routing/success-based/toggle-dynamic-routing-business-profile-accounts-success-based.ts b/packages/mcp-server/src/tools/accounts/business-profile/dynamic-routing/success-based/toggle-dynamic-routing-business-profile-accounts-success-based.ts index d196453..2d0b26e 100644 --- a/packages/mcp-server/src/tools/accounts/business-profile/dynamic-routing/success-based/toggle-dynamic-routing-business-profile-accounts-success-based.ts +++ b/packages/mcp-server/src/tools/accounts/business-profile/dynamic-routing/success-based/toggle-dynamic-routing-business-profile-accounts-success-based.ts @@ -1,5 +1,6 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. +import { maybeFilter } from 'hyperswitch-mcp/filtering'; import { asTextContentResult } from 'hyperswitch-mcp/tools/types'; import { Tool } from '@modelcontextprotocol/sdk/types.js'; @@ -17,7 +18,8 @@ export const metadata: Metadata = { export const tool: Tool = { name: 'toggle_dynamic_routing_business_profile_accounts_success_based', - description: 'Create a success based dynamic routing algorithm', + description: + "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\nCreate a success based dynamic routing algorithm\n\n# Response Schema\n```json\n{\n $ref: '#/$defs/routing_dictionary_record',\n $defs: {\n routing_dictionary_record: {\n type: 'object',\n properties: {\n id: {\n type: 'string'\n },\n created_at: {\n type: 'integer'\n },\n description: {\n type: 'string'\n },\n kind: {\n type: 'string',\n enum: [ 'single',\n 'priority',\n 'volume_split',\n 'advanced',\n 'dynamic',\n 'three_ds_decision_rule'\n ]\n },\n modified_at: {\n type: 'integer'\n },\n name: {\n type: 'string'\n },\n profile_id: {\n type: 'string'\n },\n algorithm_for: {\n $ref: '#/$defs/transaction_type'\n },\n decision_engine_routing_id: {\n type: 'string'\n }\n },\n required: [ 'id',\n 'created_at',\n 'description',\n 'kind',\n 'modified_at',\n 'name',\n 'profile_id'\n ]\n },\n transaction_type: {\n type: 'string',\n enum: [ 'payment',\n 'payout',\n 'three_ds_authentication'\n ]\n }\n }\n}\n```", inputSchema: { type: 'object', properties: { @@ -30,6 +32,12 @@ export const tool: Tool = { enable: { $ref: '#/$defs/dynamic_routing_features', }, + jq_filter: { + type: 'string', + title: 'jq Filter', + description: + 'A jq filter to apply to the response to include certain fields. Consult the output schema in the tool description to see the fields that are available.\n\nFor example: to include only the `name` field in every object of a results array, you can provide ".results[].name".\n\nFor more information, see the [jq documentation](https://jqlang.org/manual/).', + }, }, $defs: { dynamic_routing_features: { @@ -43,7 +51,10 @@ export const tool: Tool = { export const handler = async (client: Hyperswitch, args: Record | undefined) => { const { profile_id, ...body } = args as any; return asTextContentResult( - await client.accounts.businessProfile.dynamicRouting.successBased.toggle(profile_id, body), + await maybeFilter( + args, + await client.accounts.businessProfile.dynamicRouting.successBased.toggle(profile_id, body), + ), ); }; diff --git a/packages/mcp-server/src/tools/accounts/business-profile/dynamic-routing/success-based/update-config-dynamic-routing-business-profile-accounts-success-based.ts b/packages/mcp-server/src/tools/accounts/business-profile/dynamic-routing/success-based/update-config-dynamic-routing-business-profile-accounts-success-based.ts index 3bb58a3..2193196 100644 --- a/packages/mcp-server/src/tools/accounts/business-profile/dynamic-routing/success-based/update-config-dynamic-routing-business-profile-accounts-success-based.ts +++ b/packages/mcp-server/src/tools/accounts/business-profile/dynamic-routing/success-based/update-config-dynamic-routing-business-profile-accounts-success-based.ts @@ -1,5 +1,6 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. +import { maybeFilter } from 'hyperswitch-mcp/filtering'; import { asTextContentResult } from 'hyperswitch-mcp/tools/types'; import { Tool } from '@modelcontextprotocol/sdk/types.js'; @@ -18,7 +19,8 @@ export const metadata: Metadata = { export const tool: Tool = { name: 'update_config_dynamic_routing_business_profile_accounts_success_based', - description: 'Update success based dynamic routing algorithm', + description: + "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\nUpdate success based dynamic routing algorithm\n\n# Response Schema\n```json\n{\n $ref: '#/$defs/routing_dictionary_record',\n $defs: {\n routing_dictionary_record: {\n type: 'object',\n properties: {\n id: {\n type: 'string'\n },\n created_at: {\n type: 'integer'\n },\n description: {\n type: 'string'\n },\n kind: {\n type: 'string',\n enum: [ 'single',\n 'priority',\n 'volume_split',\n 'advanced',\n 'dynamic',\n 'three_ds_decision_rule'\n ]\n },\n modified_at: {\n type: 'integer'\n },\n name: {\n type: 'string'\n },\n profile_id: {\n type: 'string'\n },\n algorithm_for: {\n $ref: '#/$defs/transaction_type'\n },\n decision_engine_routing_id: {\n type: 'string'\n }\n },\n required: [ 'id',\n 'created_at',\n 'description',\n 'kind',\n 'modified_at',\n 'name',\n 'profile_id'\n ]\n },\n transaction_type: {\n type: 'string',\n enum: [ 'payment',\n 'payout',\n 'three_ds_authentication'\n ]\n }\n }\n}\n```", inputSchema: { type: 'object', properties: { @@ -137,6 +139,12 @@ export const tool: Tool = { $ref: '#/$defs/dynamic_routing_config_params', }, }, + jq_filter: { + type: 'string', + title: 'jq Filter', + description: + 'A jq filter to apply to the response to include certain fields. Consult the output schema in the tool description to see the fields that are available.\n\nFor example: to include only the `name` field in every object of a results array, you can provide ".results[].name".\n\nFor more information, see the [jq documentation](https://jqlang.org/manual/).', + }, }, $defs: { decision_engine_gateway_wise_extra_score: { @@ -170,7 +178,10 @@ export const tool: Tool = { export const handler = async (client: Hyperswitch, args: Record | undefined) => { const { algorithm_id, ...body } = args as any; return asTextContentResult( - await client.accounts.businessProfile.dynamicRouting.successBased.updateConfig(algorithm_id, body), + await maybeFilter( + args, + await client.accounts.businessProfile.dynamicRouting.successBased.updateConfig(algorithm_id, body), + ), ); }; diff --git a/packages/mcp-server/src/tools/accounts/business-profile/list-accounts-business-profile.ts b/packages/mcp-server/src/tools/accounts/business-profile/list-accounts-business-profile.ts index 0f73acb..0fe4761 100644 --- a/packages/mcp-server/src/tools/accounts/business-profile/list-accounts-business-profile.ts +++ b/packages/mcp-server/src/tools/accounts/business-profile/list-accounts-business-profile.ts @@ -17,7 +17,8 @@ export const metadata: Metadata = { export const tool: Tool = { name: 'list_accounts_business_profile', - description: 'Lists all the *profiles* under a merchant', + description: + "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\nLists all the *profiles* under a merchant", inputSchema: { type: 'object', properties: { diff --git a/packages/mcp-server/src/tools/accounts/business-profile/retrieve-accounts-business-profile.ts b/packages/mcp-server/src/tools/accounts/business-profile/retrieve-accounts-business-profile.ts index 5959baa..29174da 100644 --- a/packages/mcp-server/src/tools/accounts/business-profile/retrieve-accounts-business-profile.ts +++ b/packages/mcp-server/src/tools/accounts/business-profile/retrieve-accounts-business-profile.ts @@ -17,7 +17,8 @@ export const metadata: Metadata = { export const tool: Tool = { name: 'retrieve_accounts_business_profile', - description: 'Retrieve existing *profile*', + description: + "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\nRetrieve existing *profile*", inputSchema: { type: 'object', properties: { diff --git a/packages/mcp-server/src/tools/accounts/business-profile/update-accounts-business-profile.ts b/packages/mcp-server/src/tools/accounts/business-profile/update-accounts-business-profile.ts index 90f4dc6..c590b54 100644 --- a/packages/mcp-server/src/tools/accounts/business-profile/update-accounts-business-profile.ts +++ b/packages/mcp-server/src/tools/accounts/business-profile/update-accounts-business-profile.ts @@ -17,7 +17,8 @@ export const metadata: Metadata = { export const tool: Tool = { name: 'update_accounts_business_profile', - description: 'Update the *profile*', + description: + "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\nUpdate the *profile*", inputSchema: { type: 'object', properties: { diff --git a/packages/mcp-server/src/tools/accounts/connectors/create-accounts-connectors.ts b/packages/mcp-server/src/tools/accounts/connectors/create-accounts-connectors.ts index 03f7415..564f75d 100644 --- a/packages/mcp-server/src/tools/accounts/connectors/create-accounts-connectors.ts +++ b/packages/mcp-server/src/tools/accounts/connectors/create-accounts-connectors.ts @@ -18,7 +18,7 @@ export const metadata: Metadata = { export const tool: Tool = { name: 'create_accounts_connectors', description: - 'Creates a new Merchant Connector for the merchant account. The connector could be a payment processor/facilitator/acquirer or a provider of specialized services like Fraud/Accounting etc.', + "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\nCreates a new Merchant Connector for the merchant account. The connector could be a payment processor/facilitator/acquirer or a provider of specialized services like Fraud/Accounting etc.", inputSchema: { type: 'object', properties: { diff --git a/packages/mcp-server/src/tools/accounts/connectors/delete-accounts-connectors.ts b/packages/mcp-server/src/tools/accounts/connectors/delete-accounts-connectors.ts index 266a843..96d0e55 100644 --- a/packages/mcp-server/src/tools/accounts/connectors/delete-accounts-connectors.ts +++ b/packages/mcp-server/src/tools/accounts/connectors/delete-accounts-connectors.ts @@ -1,5 +1,6 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. +import { maybeFilter } from 'hyperswitch-mcp/filtering'; import { asTextContentResult } from 'hyperswitch-mcp/tools/types'; import { Tool } from '@modelcontextprotocol/sdk/types.js'; @@ -17,7 +18,8 @@ export const metadata: Metadata = { export const tool: Tool = { name: 'delete_accounts_connectors', - description: 'Delete or Detach a Merchant Connector from Merchant Account', + description: + "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\nDelete or Detach a Merchant Connector from Merchant Account\n\n# Response Schema\n```json\n{\n type: 'object',\n properties: {\n deleted: {\n type: 'boolean',\n description: 'If the connector is deleted or not'\n },\n merchant_connector_id: {\n type: 'string',\n description: 'Unique ID of the connector'\n },\n merchant_id: {\n type: 'string',\n description: 'The identifier for the Merchant Account'\n }\n },\n required: [ 'deleted',\n 'merchant_connector_id',\n 'merchant_id'\n ]\n}\n```", inputSchema: { type: 'object', properties: { @@ -27,13 +29,21 @@ export const tool: Tool = { merchant_connector_id: { type: 'string', }, + jq_filter: { + type: 'string', + title: 'jq Filter', + description: + 'A jq filter to apply to the response to include certain fields. Consult the output schema in the tool description to see the fields that are available.\n\nFor example: to include only the `name` field in every object of a results array, you can provide ".results[].name".\n\nFor more information, see the [jq documentation](https://jqlang.org/manual/).', + }, }, }, }; export const handler = async (client: Hyperswitch, args: Record | undefined) => { const { merchant_connector_id, ...body } = args as any; - return asTextContentResult(await client.accounts.connectors.delete(merchant_connector_id, body)); + return asTextContentResult( + await maybeFilter(args, await client.accounts.connectors.delete(merchant_connector_id, body)), + ); }; export default { metadata, tool, handler }; diff --git a/packages/mcp-server/src/tools/accounts/connectors/list-accounts-connectors.ts b/packages/mcp-server/src/tools/accounts/connectors/list-accounts-connectors.ts index 6d32fb7..24399e0 100644 --- a/packages/mcp-server/src/tools/accounts/connectors/list-accounts-connectors.ts +++ b/packages/mcp-server/src/tools/accounts/connectors/list-accounts-connectors.ts @@ -17,7 +17,8 @@ export const metadata: Metadata = { export const tool: Tool = { name: 'list_accounts_connectors', - description: 'List Merchant Connector Details for the merchant', + description: + "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 Merchant Connector Details for the merchant", inputSchema: { type: 'object', properties: { diff --git a/packages/mcp-server/src/tools/accounts/connectors/retrieve-accounts-connectors.ts b/packages/mcp-server/src/tools/accounts/connectors/retrieve-accounts-connectors.ts index 31bfc99..df8e197 100644 --- a/packages/mcp-server/src/tools/accounts/connectors/retrieve-accounts-connectors.ts +++ b/packages/mcp-server/src/tools/accounts/connectors/retrieve-accounts-connectors.ts @@ -17,7 +17,8 @@ export const metadata: Metadata = { export const tool: Tool = { name: 'retrieve_accounts_connectors', - description: 'Retrieves details of a Connector account', + description: + "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\nRetrieves details of a Connector account", inputSchema: { type: 'object', properties: { diff --git a/packages/mcp-server/src/tools/accounts/connectors/update-accounts-connectors.ts b/packages/mcp-server/src/tools/accounts/connectors/update-accounts-connectors.ts index 5130de8..1c1b63a 100644 --- a/packages/mcp-server/src/tools/accounts/connectors/update-accounts-connectors.ts +++ b/packages/mcp-server/src/tools/accounts/connectors/update-accounts-connectors.ts @@ -18,7 +18,7 @@ export const metadata: Metadata = { export const tool: Tool = { name: 'update_accounts_connectors', description: - 'To update an existing Merchant Connector account. Helpful in enabling/disabling different payment methods and other settings for the connector', + "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\nTo update an existing Merchant Connector account. Helpful in enabling/disabling different payment methods and other settings for the connector", inputSchema: { type: 'object', properties: { diff --git a/packages/mcp-server/src/tools/accounts/create-accounts.ts b/packages/mcp-server/src/tools/accounts/create-accounts.ts index 28ace54..8f3a981 100644 --- a/packages/mcp-server/src/tools/accounts/create-accounts.ts +++ b/packages/mcp-server/src/tools/accounts/create-accounts.ts @@ -18,7 +18,7 @@ export const metadata: Metadata = { export const tool: Tool = { name: 'create_accounts', description: - 'Create a new account for a *merchant* and the *merchant* could be a seller or retailer or client who likes to receive and send payments.', + "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\nCreate a new account for a *merchant* and the *merchant* could be a seller or retailer or client who likes to receive and send payments.", inputSchema: { type: 'object', properties: { diff --git a/packages/mcp-server/src/tools/accounts/delete-accounts.ts b/packages/mcp-server/src/tools/accounts/delete-accounts.ts index 76aa969..f998fa4 100644 --- a/packages/mcp-server/src/tools/accounts/delete-accounts.ts +++ b/packages/mcp-server/src/tools/accounts/delete-accounts.ts @@ -1,5 +1,6 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. +import { maybeFilter } from 'hyperswitch-mcp/filtering'; import { asTextContentResult } from 'hyperswitch-mcp/tools/types'; import { Tool } from '@modelcontextprotocol/sdk/types.js'; @@ -17,20 +18,27 @@ export const metadata: Metadata = { export const tool: Tool = { name: 'delete_accounts', - description: 'Delete a *merchant* account', + description: + "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\nDelete a *merchant* account\n\n# Response Schema\n```json\n{\n type: 'object',\n properties: {\n deleted: {\n type: 'boolean',\n description: 'If the connector is deleted or not'\n },\n merchant_id: {\n type: 'string',\n description: 'The identifier for the Merchant Account'\n }\n },\n required: [ 'deleted',\n 'merchant_id'\n ]\n}\n```", inputSchema: { type: 'object', properties: { account_id: { type: 'string', }, + jq_filter: { + type: 'string', + title: 'jq Filter', + description: + 'A jq filter to apply to the response to include certain fields. Consult the output schema in the tool description to see the fields that are available.\n\nFor example: to include only the `name` field in every object of a results array, you can provide ".results[].name".\n\nFor more information, see the [jq documentation](https://jqlang.org/manual/).', + }, }, }, }; export const handler = async (client: Hyperswitch, args: Record | undefined) => { const { account_id, ...body } = args as any; - return asTextContentResult(await client.accounts.delete(account_id)); + return asTextContentResult(await maybeFilter(args, await client.accounts.delete(account_id))); }; export default { metadata, tool, handler }; diff --git a/packages/mcp-server/src/tools/accounts/kv-accounts.ts b/packages/mcp-server/src/tools/accounts/kv-accounts.ts index 290a5db..541d016 100644 --- a/packages/mcp-server/src/tools/accounts/kv-accounts.ts +++ b/packages/mcp-server/src/tools/accounts/kv-accounts.ts @@ -1,5 +1,6 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. +import { maybeFilter } from 'hyperswitch-mcp/filtering'; import { asTextContentResult } from 'hyperswitch-mcp/tools/types'; import { Tool } from '@modelcontextprotocol/sdk/types.js'; @@ -17,7 +18,8 @@ export const metadata: Metadata = { export const tool: Tool = { name: 'kv_accounts', - description: 'Toggle KV mode for the Merchant Account', + description: + "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\nToggle KV mode for the Merchant Account\n\n# Response Schema\n```json\n{\n type: 'object',\n properties: {\n kv_enabled: {\n type: 'boolean',\n description: 'Status of KV for the specific merchant'\n },\n merchant_id: {\n type: 'string',\n description: 'The identifier for the Merchant Account'\n }\n },\n required: [ 'kv_enabled',\n 'merchant_id'\n ]\n}\n```", inputSchema: { type: 'object', properties: { @@ -28,13 +30,19 @@ export const tool: Tool = { type: 'boolean', description: 'Status of KV for the specific merchant', }, + jq_filter: { + type: 'string', + title: 'jq Filter', + description: + 'A jq filter to apply to the response to include certain fields. Consult the output schema in the tool description to see the fields that are available.\n\nFor example: to include only the `name` field in every object of a results array, you can provide ".results[].name".\n\nFor more information, see the [jq documentation](https://jqlang.org/manual/).', + }, }, }, }; export const handler = async (client: Hyperswitch, args: Record | undefined) => { const { account_id, ...body } = args as any; - return asTextContentResult(await client.accounts.kv(account_id, body)); + return asTextContentResult(await maybeFilter(args, await client.accounts.kv(account_id, body))); }; export default { metadata, tool, handler }; diff --git a/packages/mcp-server/src/tools/accounts/list-payment-methods-accounts.ts b/packages/mcp-server/src/tools/accounts/list-payment-methods-accounts.ts index 65d3720..77f6b13 100644 --- a/packages/mcp-server/src/tools/accounts/list-payment-methods-accounts.ts +++ b/packages/mcp-server/src/tools/accounts/list-payment-methods-accounts.ts @@ -18,7 +18,7 @@ export const metadata: Metadata = { export const tool: Tool = { name: 'list_payment_methods_accounts', description: - 'Lists the applicable payment methods for a particular Merchant ID.\nUse the client secret and publishable key authorization to list all relevant payment methods of the merchant for the payment corresponding to the client secret.', + "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\nLists the applicable payment methods for a particular Merchant ID.\nUse the client secret and publishable key authorization to list all relevant payment methods of the merchant for the payment corresponding to the client secret.", inputSchema: { type: 'object', properties: { diff --git a/packages/mcp-server/src/tools/accounts/retrieve-accounts.ts b/packages/mcp-server/src/tools/accounts/retrieve-accounts.ts index 1402366..02af03b 100644 --- a/packages/mcp-server/src/tools/accounts/retrieve-accounts.ts +++ b/packages/mcp-server/src/tools/accounts/retrieve-accounts.ts @@ -17,7 +17,8 @@ export const metadata: Metadata = { export const tool: Tool = { name: 'retrieve_accounts', - description: 'Retrieve a *merchant* account details.', + description: + "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\nRetrieve a *merchant* account details.", inputSchema: { type: 'object', properties: { diff --git a/packages/mcp-server/src/tools/accounts/update-accounts.ts b/packages/mcp-server/src/tools/accounts/update-accounts.ts index 9538db5..7f475f8 100644 --- a/packages/mcp-server/src/tools/accounts/update-accounts.ts +++ b/packages/mcp-server/src/tools/accounts/update-accounts.ts @@ -18,7 +18,7 @@ export const metadata: Metadata = { export const tool: Tool = { name: 'update_accounts', description: - 'Updates details of an existing merchant account. Helpful in updating merchant details such as email, contact details, or other configuration details like webhook, routing algorithm etc', + "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\nUpdates details of an existing merchant account. Helpful in updating merchant details such as email, contact details, or other configuration details like webhook, routing algorithm etc", inputSchema: { type: 'object', properties: { diff --git a/packages/mcp-server/src/tools/api-keys/create-api-keys.ts b/packages/mcp-server/src/tools/api-keys/create-api-keys.ts index 722d161..9555430 100644 --- a/packages/mcp-server/src/tools/api-keys/create-api-keys.ts +++ b/packages/mcp-server/src/tools/api-keys/create-api-keys.ts @@ -1,5 +1,6 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. +import { maybeFilter } from 'hyperswitch-mcp/filtering'; import { asTextContentResult } from 'hyperswitch-mcp/tools/types'; import { Tool } from '@modelcontextprotocol/sdk/types.js'; @@ -18,7 +19,7 @@ export const metadata: Metadata = { export const tool: Tool = { name: 'create_api_keys', description: - 'Create a new API Key for accessing our APIs from your servers. The plaintext API Key will be\ndisplayed only once on creation, so ensure you store it securely.', + "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\nCreate a new API Key for accessing our APIs from your servers. The plaintext API Key will be\ndisplayed only once on creation, so ensure you store it securely.\n\n# Response Schema\n```json\n{\n type: 'object',\n description: 'The response body for creating an API Key.',\n properties: {\n api_key: {\n type: 'string',\n description: 'The plaintext API Key used for server-side API access. Ensure you store the API Key\\nsecurely as you will not be able to see it again.'\n },\n created: {\n type: 'string',\n description: 'The time at which the API Key was created.',\n format: 'date-time'\n },\n expiration: {\n $ref: '#/$defs/api_key_expiration'\n },\n key_id: {\n type: 'string',\n description: 'The identifier for the API Key.'\n },\n merchant_id: {\n type: 'string',\n description: 'The identifier for the Merchant Account.'\n },\n name: {\n type: 'string',\n description: 'The unique name for the API Key to help you identify it.'\n },\n description: {\n type: 'string',\n description: 'The description to provide more context about the API Key.'\n }\n },\n required: [ 'api_key',\n 'created',\n 'expiration',\n 'key_id',\n 'merchant_id',\n 'name'\n ],\n $defs: {\n api_key_expiration: {\n anyOf: [ {\n type: 'string',\n enum: [ 'never'\n ]\n },\n {\n type: 'string',\n format: 'date-time'\n }\n ]\n }\n }\n}\n```", inputSchema: { type: 'object', properties: { @@ -36,6 +37,12 @@ export const tool: Tool = { type: 'string', description: 'A description to provide more context about the API Key.', }, + jq_filter: { + type: 'string', + title: 'jq Filter', + description: + 'A jq filter to apply to the response to include certain fields. Consult the output schema in the tool description to see the fields that are available.\n\nFor example: to include only the `name` field in every object of a results array, you can provide ".results[].name".\n\nFor more information, see the [jq documentation](https://jqlang.org/manual/).', + }, }, $defs: { api_key_expiration: { @@ -56,7 +63,7 @@ export const tool: Tool = { export const handler = async (client: Hyperswitch, args: Record | undefined) => { const { merchant_id, ...body } = args as any; - return asTextContentResult(await client.apiKeys.create(merchant_id, body)); + return asTextContentResult(await maybeFilter(args, await client.apiKeys.create(merchant_id, body))); }; export default { metadata, tool, handler }; diff --git a/packages/mcp-server/src/tools/api-keys/list-api-keys.ts b/packages/mcp-server/src/tools/api-keys/list-api-keys.ts index 7cbe8b4..29052ed 100644 --- a/packages/mcp-server/src/tools/api-keys/list-api-keys.ts +++ b/packages/mcp-server/src/tools/api-keys/list-api-keys.ts @@ -1,5 +1,6 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. +import { maybeFilter } from 'hyperswitch-mcp/filtering'; import { asTextContentResult } from 'hyperswitch-mcp/tools/types'; import { Tool } from '@modelcontextprotocol/sdk/types.js'; @@ -17,7 +18,8 @@ export const metadata: Metadata = { export const tool: Tool = { name: 'list_api_keys', - description: 'List all the API Keys associated to a merchant account.', + description: + "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 all the API Keys associated to a merchant account.\n\n# Response Schema\n```json\n{\n type: 'array',\n items: {\n $ref: '#/$defs/retrieve_api_key'\n },\n $defs: {\n retrieve_api_key: {\n type: 'object',\n description: 'The response body for retrieving an API Key.',\n properties: {\n created: {\n type: 'string',\n description: 'The time at which the API Key was created.',\n format: 'date-time'\n },\n expiration: {\n $ref: '#/$defs/api_key_expiration'\n },\n key_id: {\n type: 'string',\n description: 'The identifier for the API Key.'\n },\n merchant_id: {\n type: 'string',\n description: 'The identifier for the Merchant Account.'\n },\n name: {\n type: 'string',\n description: 'The unique name for the API Key to help you identify it.'\n },\n prefix: {\n type: 'string',\n description: 'The first few characters of the plaintext API Key to help you identify it.'\n },\n description: {\n type: 'string',\n description: 'The description to provide more context about the API Key.'\n }\n },\n required: [ 'created',\n 'expiration',\n 'key_id',\n 'merchant_id',\n 'name',\n 'prefix'\n ]\n },\n api_key_expiration: {\n anyOf: [ {\n type: 'string',\n enum: [ 'never'\n ]\n },\n {\n type: 'string',\n format: 'date-time'\n }\n ]\n }\n }\n}\n```", inputSchema: { type: 'object', properties: { @@ -32,13 +34,19 @@ export const tool: Tool = { type: 'integer', description: 'The number of API Keys to skip when retrieving the list of API keys.', }, + jq_filter: { + type: 'string', + title: 'jq Filter', + description: + 'A jq filter to apply to the response to include certain fields. Consult the output schema in the tool description to see the fields that are available.\n\nFor example: to include only the `name` field in every object of a results array, you can provide ".results[].name".\n\nFor more information, see the [jq documentation](https://jqlang.org/manual/).', + }, }, }, }; export const handler = async (client: Hyperswitch, args: Record | undefined) => { const { merchant_id, ...body } = args as any; - return asTextContentResult(await client.apiKeys.list(merchant_id, body)); + return asTextContentResult(await maybeFilter(args, await client.apiKeys.list(merchant_id, body))); }; export default { metadata, tool, handler }; diff --git a/packages/mcp-server/src/tools/api-keys/retrieve-api-keys.ts b/packages/mcp-server/src/tools/api-keys/retrieve-api-keys.ts index ab52916..3350b84 100644 --- a/packages/mcp-server/src/tools/api-keys/retrieve-api-keys.ts +++ b/packages/mcp-server/src/tools/api-keys/retrieve-api-keys.ts @@ -1,5 +1,6 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. +import { maybeFilter } from 'hyperswitch-mcp/filtering'; import { asTextContentResult } from 'hyperswitch-mcp/tools/types'; import { Tool } from '@modelcontextprotocol/sdk/types.js'; @@ -17,7 +18,8 @@ export const metadata: Metadata = { export const tool: Tool = { name: 'retrieve_api_keys', - description: 'Retrieve information about the specified API Key.', + description: + "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\nRetrieve information about the specified API Key.\n\n# Response Schema\n```json\n{\n $ref: '#/$defs/retrieve_api_key',\n $defs: {\n retrieve_api_key: {\n type: 'object',\n description: 'The response body for retrieving an API Key.',\n properties: {\n created: {\n type: 'string',\n description: 'The time at which the API Key was created.',\n format: 'date-time'\n },\n expiration: {\n $ref: '#/$defs/api_key_expiration'\n },\n key_id: {\n type: 'string',\n description: 'The identifier for the API Key.'\n },\n merchant_id: {\n type: 'string',\n description: 'The identifier for the Merchant Account.'\n },\n name: {\n type: 'string',\n description: 'The unique name for the API Key to help you identify it.'\n },\n prefix: {\n type: 'string',\n description: 'The first few characters of the plaintext API Key to help you identify it.'\n },\n description: {\n type: 'string',\n description: 'The description to provide more context about the API Key.'\n }\n },\n required: [ 'created',\n 'expiration',\n 'key_id',\n 'merchant_id',\n 'name',\n 'prefix'\n ]\n },\n api_key_expiration: {\n anyOf: [ {\n type: 'string',\n enum: [ 'never'\n ]\n },\n {\n type: 'string',\n format: 'date-time'\n }\n ]\n }\n }\n}\n```", inputSchema: { type: 'object', properties: { @@ -27,13 +29,19 @@ export const tool: Tool = { key_id: { type: 'string', }, + jq_filter: { + type: 'string', + title: 'jq Filter', + description: + 'A jq filter to apply to the response to include certain fields. Consult the output schema in the tool description to see the fields that are available.\n\nFor example: to include only the `name` field in every object of a results array, you can provide ".results[].name".\n\nFor more information, see the [jq documentation](https://jqlang.org/manual/).', + }, }, }, }; export const handler = async (client: Hyperswitch, args: Record | undefined) => { const { key_id, ...body } = args as any; - return asTextContentResult(await client.apiKeys.retrieve(key_id, body)); + return asTextContentResult(await maybeFilter(args, await client.apiKeys.retrieve(key_id, body))); }; export default { metadata, tool, handler }; diff --git a/packages/mcp-server/src/tools/api-keys/revoke-api-keys.ts b/packages/mcp-server/src/tools/api-keys/revoke-api-keys.ts index 8cc5291..e495483 100644 --- a/packages/mcp-server/src/tools/api-keys/revoke-api-keys.ts +++ b/packages/mcp-server/src/tools/api-keys/revoke-api-keys.ts @@ -1,5 +1,6 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. +import { maybeFilter } from 'hyperswitch-mcp/filtering'; import { asTextContentResult } from 'hyperswitch-mcp/tools/types'; import { Tool } from '@modelcontextprotocol/sdk/types.js'; @@ -18,7 +19,7 @@ export const metadata: Metadata = { export const tool: Tool = { name: 'revoke_api_keys', description: - 'Revoke the specified API Key. Once revoked, the API Key can no longer be used for\nauthenticating with our APIs.', + "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\nRevoke the specified API Key. Once revoked, the API Key can no longer be used for\nauthenticating with our APIs.\n\n# Response Schema\n```json\n{\n type: 'object',\n description: 'The response body for revoking an API Key.',\n properties: {\n key_id: {\n type: 'string',\n description: 'The identifier for the API Key.'\n },\n merchant_id: {\n type: 'string',\n description: 'The identifier for the Merchant Account.'\n },\n revoked: {\n type: 'boolean',\n description: 'Indicates whether the API key was revoked or not.'\n }\n },\n required: [ 'key_id',\n 'merchant_id',\n 'revoked'\n ]\n}\n```", inputSchema: { type: 'object', properties: { @@ -28,13 +29,19 @@ export const tool: Tool = { key_id: { type: 'string', }, + jq_filter: { + type: 'string', + title: 'jq Filter', + description: + 'A jq filter to apply to the response to include certain fields. Consult the output schema in the tool description to see the fields that are available.\n\nFor example: to include only the `name` field in every object of a results array, you can provide ".results[].name".\n\nFor more information, see the [jq documentation](https://jqlang.org/manual/).', + }, }, }, }; export const handler = async (client: Hyperswitch, args: Record | undefined) => { const { key_id, ...body } = args as any; - return asTextContentResult(await client.apiKeys.revoke(key_id, body)); + return asTextContentResult(await maybeFilter(args, await client.apiKeys.revoke(key_id, body))); }; export default { metadata, tool, handler }; diff --git a/packages/mcp-server/src/tools/api-keys/update-api-keys.ts b/packages/mcp-server/src/tools/api-keys/update-api-keys.ts index 766c9dc..6229446 100644 --- a/packages/mcp-server/src/tools/api-keys/update-api-keys.ts +++ b/packages/mcp-server/src/tools/api-keys/update-api-keys.ts @@ -1,5 +1,6 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. +import { maybeFilter } from 'hyperswitch-mcp/filtering'; import { asTextContentResult } from 'hyperswitch-mcp/tools/types'; import { Tool } from '@modelcontextprotocol/sdk/types.js'; @@ -17,7 +18,8 @@ export const metadata: Metadata = { export const tool: Tool = { name: 'update_api_keys', - description: 'Update information for the specified API Key.', + description: + "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\nUpdate information for the specified API Key.\n\n# Response Schema\n```json\n{\n $ref: '#/$defs/retrieve_api_key',\n $defs: {\n retrieve_api_key: {\n type: 'object',\n description: 'The response body for retrieving an API Key.',\n properties: {\n created: {\n type: 'string',\n description: 'The time at which the API Key was created.',\n format: 'date-time'\n },\n expiration: {\n $ref: '#/$defs/api_key_expiration'\n },\n key_id: {\n type: 'string',\n description: 'The identifier for the API Key.'\n },\n merchant_id: {\n type: 'string',\n description: 'The identifier for the Merchant Account.'\n },\n name: {\n type: 'string',\n description: 'The unique name for the API Key to help you identify it.'\n },\n prefix: {\n type: 'string',\n description: 'The first few characters of the plaintext API Key to help you identify it.'\n },\n description: {\n type: 'string',\n description: 'The description to provide more context about the API Key.'\n }\n },\n required: [ 'created',\n 'expiration',\n 'key_id',\n 'merchant_id',\n 'name',\n 'prefix'\n ]\n },\n api_key_expiration: {\n anyOf: [ {\n type: 'string',\n enum: [ 'never'\n ]\n },\n {\n type: 'string',\n format: 'date-time'\n }\n ]\n }\n }\n}\n```", inputSchema: { type: 'object', properties: { @@ -38,6 +40,12 @@ export const tool: Tool = { type: 'string', description: 'A unique name for the API Key to help you identify it.', }, + jq_filter: { + type: 'string', + title: 'jq Filter', + description: + 'A jq filter to apply to the response to include certain fields. Consult the output schema in the tool description to see the fields that are available.\n\nFor example: to include only the `name` field in every object of a results array, you can provide ".results[].name".\n\nFor more information, see the [jq documentation](https://jqlang.org/manual/).', + }, }, $defs: { api_key_expiration: { @@ -58,7 +66,7 @@ export const tool: Tool = { export const handler = async (client: Hyperswitch, args: Record | undefined) => { const { key_id, ...body } = args as any; - return asTextContentResult(await client.apiKeys.update(key_id, body)); + return asTextContentResult(await maybeFilter(args, await client.apiKeys.update(key_id, body))); }; export default { metadata, tool, handler }; diff --git a/packages/mcp-server/src/tools/authentication/create-authentication.ts b/packages/mcp-server/src/tools/authentication/create-authentication.ts index 7ed18a1..1f2815e 100644 --- a/packages/mcp-server/src/tools/authentication/create-authentication.ts +++ b/packages/mcp-server/src/tools/authentication/create-authentication.ts @@ -17,7 +17,8 @@ export const metadata: Metadata = { export const tool: Tool = { name: 'create_authentication', - description: 'Create a new authentication for accessing our APIs from your servers.\n', + description: + "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\nCreate a new authentication for accessing our APIs from your servers.\n", inputSchema: { type: 'object', properties: { diff --git a/packages/mcp-server/src/tools/blocklist/create-blocklist.ts b/packages/mcp-server/src/tools/blocklist/create-blocklist.ts index a4a9132..a7f73bc 100644 --- a/packages/mcp-server/src/tools/blocklist/create-blocklist.ts +++ b/packages/mcp-server/src/tools/blocklist/create-blocklist.ts @@ -1,5 +1,6 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. +import { maybeFilter } from 'hyperswitch-mcp/filtering'; import { asTextContentResult } from 'hyperswitch-mcp/tools/types'; import { Tool } from '@modelcontextprotocol/sdk/types.js'; @@ -17,7 +18,8 @@ export const metadata: Metadata = { export const tool: Tool = { name: 'create_blocklist', - description: '', + description: + "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\n\n\n# Response Schema\n```json\n{\n $ref: '#/$defs/blocklist_response',\n $defs: {\n blocklist_response: {\n type: 'object',\n properties: {\n created_at: {\n type: 'string',\n format: 'date-time'\n },\n data_kind: {\n $ref: '#/$defs/blocklist_data_kind'\n },\n fingerprint_id: {\n type: 'string'\n }\n },\n required: [ 'created_at',\n 'data_kind',\n 'fingerprint_id'\n ]\n },\n blocklist_data_kind: {\n type: 'string',\n enum: [ 'payment_method',\n 'card_bin',\n 'extended_card_bin'\n ]\n }\n }\n}\n```", inputSchema: { type: 'object', anyOf: [ @@ -58,12 +60,20 @@ export const tool: Tool = { }, }, ], + properties: { + jq_filter: { + type: 'string', + title: 'jq Filter', + description: + 'A jq filter to apply to the response to include certain fields. Consult the output schema in the tool description to see the fields that are available.\n\nFor example: to include only the `name` field in every object of a results array, you can provide ".results[].name".\n\nFor more information, see the [jq documentation](https://jqlang.org/manual/).', + }, + }, }, }; export const handler = async (client: Hyperswitch, args: Record | undefined) => { const body = args as any; - return asTextContentResult(await client.blocklist.create(body)); + return asTextContentResult(await maybeFilter(args, await client.blocklist.create(body))); }; export default { metadata, tool, handler }; diff --git a/packages/mcp-server/src/tools/blocklist/delete-blocklist.ts b/packages/mcp-server/src/tools/blocklist/delete-blocklist.ts index 72cf4ae..99b92f1 100644 --- a/packages/mcp-server/src/tools/blocklist/delete-blocklist.ts +++ b/packages/mcp-server/src/tools/blocklist/delete-blocklist.ts @@ -1,5 +1,6 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. +import { maybeFilter } from 'hyperswitch-mcp/filtering'; import { asTextContentResult } from 'hyperswitch-mcp/tools/types'; import { Tool } from '@modelcontextprotocol/sdk/types.js'; @@ -17,7 +18,8 @@ export const metadata: Metadata = { export const tool: Tool = { name: 'delete_blocklist', - description: '', + description: + "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\n\n\n# Response Schema\n```json\n{\n $ref: '#/$defs/blocklist_response',\n $defs: {\n blocklist_response: {\n type: 'object',\n properties: {\n created_at: {\n type: 'string',\n format: 'date-time'\n },\n data_kind: {\n $ref: '#/$defs/blocklist_data_kind'\n },\n fingerprint_id: {\n type: 'string'\n }\n },\n required: [ 'created_at',\n 'data_kind',\n 'fingerprint_id'\n ]\n },\n blocklist_data_kind: {\n type: 'string',\n enum: [ 'payment_method',\n 'card_bin',\n 'extended_card_bin'\n ]\n }\n }\n}\n```", inputSchema: { type: 'object', anyOf: [ @@ -58,12 +60,20 @@ export const tool: Tool = { }, }, ], + properties: { + jq_filter: { + type: 'string', + title: 'jq Filter', + description: + 'A jq filter to apply to the response to include certain fields. Consult the output schema in the tool description to see the fields that are available.\n\nFor example: to include only the `name` field in every object of a results array, you can provide ".results[].name".\n\nFor more information, see the [jq documentation](https://jqlang.org/manual/).', + }, + }, }, }; export const handler = async (client: Hyperswitch, args: Record | undefined) => { const body = args as any; - return asTextContentResult(await client.blocklist.delete(body)); + return asTextContentResult(await maybeFilter(args, await client.blocklist.delete(body))); }; export default { metadata, tool, handler }; diff --git a/packages/mcp-server/src/tools/blocklist/retrieve-blocklist.ts b/packages/mcp-server/src/tools/blocklist/retrieve-blocklist.ts index ad638e0..51d807b 100644 --- a/packages/mcp-server/src/tools/blocklist/retrieve-blocklist.ts +++ b/packages/mcp-server/src/tools/blocklist/retrieve-blocklist.ts @@ -1,5 +1,6 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. +import { maybeFilter } from 'hyperswitch-mcp/filtering'; import { asTextContentResult } from 'hyperswitch-mcp/tools/types'; import { Tool } from '@modelcontextprotocol/sdk/types.js'; @@ -17,13 +18,20 @@ export const metadata: Metadata = { export const tool: Tool = { name: 'retrieve_blocklist', - description: '', + description: + "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\n\n\n# Response Schema\n```json\n{\n $ref: '#/$defs/blocklist_response',\n $defs: {\n blocklist_response: {\n type: 'object',\n properties: {\n created_at: {\n type: 'string',\n format: 'date-time'\n },\n data_kind: {\n $ref: '#/$defs/blocklist_data_kind'\n },\n fingerprint_id: {\n type: 'string'\n }\n },\n required: [ 'created_at',\n 'data_kind',\n 'fingerprint_id'\n ]\n },\n blocklist_data_kind: {\n type: 'string',\n enum: [ 'payment_method',\n 'card_bin',\n 'extended_card_bin'\n ]\n }\n }\n}\n```", inputSchema: { type: 'object', properties: { data_kind: { $ref: '#/$defs/blocklist_data_kind', }, + jq_filter: { + type: 'string', + title: 'jq Filter', + description: + 'A jq filter to apply to the response to include certain fields. Consult the output schema in the tool description to see the fields that are available.\n\nFor example: to include only the `name` field in every object of a results array, you can provide ".results[].name".\n\nFor more information, see the [jq documentation](https://jqlang.org/manual/).', + }, }, $defs: { blocklist_data_kind: { @@ -36,7 +44,7 @@ export const tool: Tool = { export const handler = async (client: Hyperswitch, args: Record | undefined) => { const body = args as any; - return asTextContentResult(await client.blocklist.retrieve(body)); + return asTextContentResult(await maybeFilter(args, await client.blocklist.retrieve(body))); }; export default { metadata, tool, handler }; diff --git a/packages/mcp-server/src/tools/blocklist/toggle-blocklist.ts b/packages/mcp-server/src/tools/blocklist/toggle-blocklist.ts index 009196c..74664ce 100644 --- a/packages/mcp-server/src/tools/blocklist/toggle-blocklist.ts +++ b/packages/mcp-server/src/tools/blocklist/toggle-blocklist.ts @@ -1,5 +1,6 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. +import { maybeFilter } from 'hyperswitch-mcp/filtering'; import { asTextContentResult } from 'hyperswitch-mcp/tools/types'; import { Tool } from '@modelcontextprotocol/sdk/types.js'; @@ -17,7 +18,8 @@ export const metadata: Metadata = { export const tool: Tool = { name: 'toggle_blocklist', - description: '', + description: + "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\n\n\n# Response Schema\n```json\n{\n type: 'object',\n properties: {\n blocklist_guard_status: {\n type: 'string'\n }\n },\n required: [ 'blocklist_guard_status'\n ]\n}\n```", inputSchema: { type: 'object', properties: { @@ -25,13 +27,19 @@ export const tool: Tool = { type: 'boolean', description: 'Boolean value to enable/disable blocklist', }, + jq_filter: { + type: 'string', + title: 'jq Filter', + description: + 'A jq filter to apply to the response to include certain fields. Consult the output schema in the tool description to see the fields that are available.\n\nFor example: to include only the `name` field in every object of a results array, you can provide ".results[].name".\n\nFor more information, see the [jq documentation](https://jqlang.org/manual/).', + }, }, }, }; export const handler = async (client: Hyperswitch, args: Record | undefined) => { const body = args as any; - return asTextContentResult(await client.blocklist.toggle(body)); + return asTextContentResult(await maybeFilter(args, await client.blocklist.toggle(body))); }; export default { metadata, tool, handler }; diff --git a/packages/mcp-server/src/tools/customers/create-customers.ts b/packages/mcp-server/src/tools/customers/create-customers.ts index 12f7bfb..eb98e2a 100644 --- a/packages/mcp-server/src/tools/customers/create-customers.ts +++ b/packages/mcp-server/src/tools/customers/create-customers.ts @@ -18,7 +18,7 @@ export const metadata: Metadata = { export const tool: Tool = { name: 'create_customers', description: - 'Creates a customer object and stores the customer details to be reused for future payments.\nIncase the customer already exists in the system, this API will respond with the customer details.', + "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\nCreates a customer object and stores the customer details to be reused for future payments.\nIncase the customer already exists in the system, this API will respond with the customer details.", inputSchema: { type: 'object', properties: { diff --git a/packages/mcp-server/src/tools/customers/delete-customers.ts b/packages/mcp-server/src/tools/customers/delete-customers.ts index 51e5f15..c555785 100644 --- a/packages/mcp-server/src/tools/customers/delete-customers.ts +++ b/packages/mcp-server/src/tools/customers/delete-customers.ts @@ -1,5 +1,6 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. +import { maybeFilter } from 'hyperswitch-mcp/filtering'; import { asTextContentResult } from 'hyperswitch-mcp/tools/types'; import { Tool } from '@modelcontextprotocol/sdk/types.js'; @@ -17,20 +18,27 @@ export const metadata: Metadata = { export const tool: Tool = { name: 'delete_customers', - description: 'Delete a customer record.', + description: + "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\nDelete a customer record.\n\n# Response Schema\n```json\n{\n type: 'object',\n properties: {\n address_deleted: {\n type: 'boolean',\n description: 'Whether address was deleted or not'\n },\n customer_deleted: {\n type: 'boolean',\n description: 'Whether customer was deleted or not'\n },\n customer_id: {\n type: 'string',\n description: 'The identifier for the customer object'\n },\n payment_methods_deleted: {\n type: 'boolean',\n description: 'Whether payment methods deleted or not'\n }\n },\n required: [ 'address_deleted',\n 'customer_deleted',\n 'customer_id',\n 'payment_methods_deleted'\n ]\n}\n```", inputSchema: { type: 'object', properties: { customer_id: { type: 'string', }, + jq_filter: { + type: 'string', + title: 'jq Filter', + description: + 'A jq filter to apply to the response to include certain fields. Consult the output schema in the tool description to see the fields that are available.\n\nFor example: to include only the `name` field in every object of a results array, you can provide ".results[].name".\n\nFor more information, see the [jq documentation](https://jqlang.org/manual/).', + }, }, }, }; export const handler = async (client: Hyperswitch, args: Record | undefined) => { const { customer_id, ...body } = args as any; - return asTextContentResult(await client.customers.delete(customer_id)); + return asTextContentResult(await maybeFilter(args, await client.customers.delete(customer_id))); }; export default { metadata, tool, handler }; diff --git a/packages/mcp-server/src/tools/customers/list-customers.ts b/packages/mcp-server/src/tools/customers/list-customers.ts index f115f17..81734a8 100644 --- a/packages/mcp-server/src/tools/customers/list-customers.ts +++ b/packages/mcp-server/src/tools/customers/list-customers.ts @@ -1,5 +1,6 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. +import { maybeFilter } from 'hyperswitch-mcp/filtering'; import { asTextContentResult } from 'hyperswitch-mcp/tools/types'; import { Tool } from '@modelcontextprotocol/sdk/types.js'; @@ -17,7 +18,8 @@ export const metadata: Metadata = { export const tool: Tool = { name: 'list_customers', - description: 'Lists all the customers for a particular merchant id.', + description: + "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\nLists all the customers for a particular merchant id.\n\n# Response Schema\n```json\n{\n type: 'array',\n items: {\n $ref: '#/$defs/customer'\n },\n $defs: {\n customer: {\n type: 'object',\n properties: {\n created_at: {\n type: 'string',\n description: 'A timestamp (ISO 8601 code) that determines when the customer was created',\n format: 'date-time'\n },\n customer_id: {\n type: 'string',\n description: 'The identifier for the customer object'\n },\n address: {\n $ref: '#/$defs/address_details'\n },\n default_payment_method_id: {\n type: 'string',\n description: 'The identifier for the default payment method.'\n },\n description: {\n type: 'string',\n description: 'An arbitrary string that you can attach to a customer object.'\n },\n email: {\n type: 'string',\n description: 'The customer\\'s email address'\n },\n metadata: {\n type: 'object',\n description: 'You can specify up to 50 keys, with key names up to 40 characters long and values up to 500\\ncharacters long. Metadata is useful for storing additional, structured information on an\\nobject.'\n },\n name: {\n type: 'string',\n description: 'The customer\\'s name'\n },\n phone: {\n type: 'string',\n description: 'The customer\\'s phone number'\n },\n phone_country_code: {\n type: 'string',\n description: 'The country code for the customer phone number'\n }\n },\n required: [ 'created_at',\n 'customer_id'\n ]\n },\n address_details: {\n type: 'object',\n description: 'Address details',\n properties: {\n city: {\n type: 'string',\n description: 'The city, district, suburb, town, or village of the address.'\n },\n country: {\n $ref: '#/$defs/country_alpha2'\n },\n first_name: {\n type: 'string',\n description: 'The first name for the address'\n },\n last_name: {\n type: 'string',\n description: 'The last name for the address'\n },\n line1: {\n type: 'string',\n description: 'The first line of the street address or P.O. Box.'\n },\n line2: {\n type: 'string',\n description: 'The second line of the street address or P.O. Box (e.g., apartment, suite, unit, or building).'\n },\n line3: {\n type: 'string',\n description: 'The third line of the street address, if applicable.'\n },\n state: {\n type: 'string',\n description: 'The address state'\n },\n zip: {\n type: 'string',\n description: 'The zip/postal code for the address'\n }\n },\n required: []\n },\n country_alpha2: {\n type: 'string',\n enum: [ 'AF',\n 'AX',\n 'AL',\n 'DZ',\n 'AS',\n 'AD',\n 'AO',\n 'AI',\n 'AQ',\n 'AG',\n 'AR',\n 'AM',\n 'AW',\n 'AU',\n 'AT',\n 'AZ',\n 'BS',\n 'BH',\n 'BD',\n 'BB',\n 'BY',\n 'BE',\n 'BZ',\n 'BJ',\n 'BM',\n 'BT',\n 'BO',\n 'BQ',\n 'BA',\n 'BW',\n 'BV',\n 'BR',\n 'IO',\n 'BN',\n 'BG',\n 'BF',\n 'BI',\n 'KH',\n 'CM',\n 'CA',\n 'CV',\n 'KY',\n 'CF',\n 'TD',\n 'CL',\n 'CN',\n 'CX',\n 'CC',\n 'CO',\n 'KM',\n 'CG',\n 'CD',\n 'CK',\n 'CR',\n 'CI',\n 'HR',\n 'CU',\n 'CW',\n 'CY',\n 'CZ',\n 'DK',\n 'DJ',\n 'DM',\n 'DO',\n 'EC',\n 'EG',\n 'SV',\n 'GQ',\n 'ER',\n 'EE',\n 'ET',\n 'FK',\n 'FO',\n 'FJ',\n 'FI',\n 'FR',\n 'GF',\n 'PF',\n 'TF',\n 'GA',\n 'GM',\n 'GE',\n 'DE',\n 'GH',\n 'GI',\n 'GR',\n 'GL',\n 'GD',\n 'GP',\n 'GU',\n 'GT',\n 'GG',\n 'GN',\n 'GW',\n 'GY',\n 'HT',\n 'HM',\n 'VA',\n 'HN',\n 'HK',\n 'HU',\n 'IS',\n 'IN',\n 'ID',\n 'IR',\n 'IQ',\n 'IE',\n 'IM',\n 'IL',\n 'IT',\n 'JM',\n 'JP',\n 'JE',\n 'JO',\n 'KZ',\n 'KE',\n 'KI',\n 'KP',\n 'KR',\n 'KW',\n 'KG',\n 'LA',\n 'LV',\n 'LB',\n 'LS',\n 'LR',\n 'LY',\n 'LI',\n 'LT',\n 'LU',\n 'MO',\n 'MK',\n 'MG',\n 'MW',\n 'MY',\n 'MV',\n 'ML',\n 'MT',\n 'MH',\n 'MQ',\n 'MR',\n 'MU',\n 'YT',\n 'MX',\n 'FM',\n 'MD',\n 'MC',\n 'MN',\n 'ME',\n 'MS',\n 'MA',\n 'MZ',\n 'MM',\n 'NA',\n 'NR',\n 'NP',\n 'NL',\n 'NC',\n 'NZ',\n 'NI',\n 'NE',\n 'NG',\n 'NU',\n 'NF',\n 'MP',\n 'NO',\n 'OM',\n 'PK',\n 'PW',\n 'PS',\n 'PA',\n 'PG',\n 'PY',\n 'PE',\n 'PH',\n 'PN',\n 'PL',\n 'PT',\n 'PR',\n 'QA',\n 'RE',\n 'RO',\n 'RU',\n 'RW',\n 'BL',\n 'SH',\n 'KN',\n 'LC',\n 'MF',\n 'PM',\n 'VC',\n 'WS',\n 'SM',\n 'ST',\n 'SA',\n 'SN',\n 'RS',\n 'SC',\n 'SL',\n 'SG',\n 'SX',\n 'SK',\n 'SI',\n 'SB',\n 'SO',\n 'ZA',\n 'GS',\n 'SS',\n 'ES',\n 'LK',\n 'SD',\n 'SR',\n 'SJ',\n 'SZ',\n 'SE',\n 'CH',\n 'SY',\n 'TW',\n 'TJ',\n 'TZ',\n 'TH',\n 'TL',\n 'TG',\n 'TK',\n 'TO',\n 'TT',\n 'TN',\n 'TR',\n 'TM',\n 'TC',\n 'TV',\n 'UG',\n 'UA',\n 'AE',\n 'GB',\n 'UM',\n 'UY',\n 'UZ',\n 'VU',\n 'VE',\n 'VN',\n 'VG',\n 'VI',\n 'WF',\n 'EH',\n 'YE',\n 'ZM',\n 'ZW',\n 'US'\n ]\n }\n }\n}\n```", inputSchema: { type: 'object', properties: { @@ -29,13 +31,19 @@ export const tool: Tool = { type: 'integer', description: 'Offset for pagination', }, + jq_filter: { + type: 'string', + title: 'jq Filter', + description: + 'A jq filter to apply to the response to include certain fields. Consult the output schema in the tool description to see the fields that are available.\n\nFor example: to include only the `name` field in every object of a results array, you can provide ".results[].name".\n\nFor more information, see the [jq documentation](https://jqlang.org/manual/).', + }, }, }, }; export const handler = async (client: Hyperswitch, args: Record | undefined) => { const body = args as any; - return asTextContentResult(await client.customers.list(body)); + return asTextContentResult(await maybeFilter(args, await client.customers.list(body))); }; export default { metadata, tool, handler }; diff --git a/packages/mcp-server/src/tools/customers/list-mandates-customers.ts b/packages/mcp-server/src/tools/customers/list-mandates-customers.ts index 063f27c..7413e85 100644 --- a/packages/mcp-server/src/tools/customers/list-mandates-customers.ts +++ b/packages/mcp-server/src/tools/customers/list-mandates-customers.ts @@ -1,5 +1,6 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. +import { maybeFilter } from 'hyperswitch-mcp/filtering'; import { asTextContentResult } from 'hyperswitch-mcp/tools/types'; import { Tool } from '@modelcontextprotocol/sdk/types.js'; @@ -17,20 +18,27 @@ export const metadata: Metadata = { export const tool: Tool = { name: 'list_mandates_customers', - description: 'Lists all the mandates for a particular customer id.', + description: + "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\nLists all the mandates for a particular customer id.\n\n# Response Schema\n```json\n{\n type: 'array',\n items: {\n $ref: '#/$defs/mandate_response'\n },\n $defs: {\n mandate_response: {\n type: 'object',\n properties: {\n mandate_id: {\n type: 'string',\n description: 'The identifier for mandate'\n },\n payment_method: {\n type: 'string',\n description: 'The payment method'\n },\n payment_method_id: {\n type: 'string',\n description: 'The identifier for payment method'\n },\n status: {\n $ref: '#/$defs/mandate_status'\n },\n card: {\n type: 'object',\n properties: {\n card_exp_month: {\n type: 'string',\n description: 'The expiry month of card'\n },\n card_exp_year: {\n type: 'string',\n description: 'The expiry year of card'\n },\n card_fingerprint: {\n type: 'string',\n description: 'A unique identifier alias to identify a particular card'\n },\n card_holder_name: {\n type: 'string',\n description: 'The card holder name'\n },\n card_isin: {\n type: 'string',\n description: 'The first 6 digits of card'\n },\n card_issuer: {\n type: 'string',\n description: 'The bank that issued the card'\n },\n card_network: {\n $ref: '#/$defs/card_network'\n },\n card_token: {\n type: 'string',\n description: 'The token from card locker'\n },\n card_type: {\n type: 'string',\n description: 'The type of the payment card'\n },\n issuer_country: {\n type: 'string',\n description: 'The country code in in which the card was issued'\n },\n last4_digits: {\n type: 'string',\n description: 'The last 4 digits of card'\n },\n nick_name: {\n type: 'string',\n description: 'The nick_name of the card holder'\n },\n scheme: {\n type: 'string',\n description: 'The card scheme network for the particular card'\n }\n },\n required: []\n },\n customer_acceptance: {\n $ref: '#/$defs/customer_acceptance'\n },\n payment_method_type: {\n type: 'string',\n description: 'The payment method type'\n }\n },\n required: [ 'mandate_id',\n 'payment_method',\n 'payment_method_id',\n 'status'\n ]\n },\n mandate_status: {\n type: 'string',\n description: 'The status of the mandate, which indicates whether it can be used to initiate a payment.',\n enum: [ 'active',\n 'inactive',\n 'pending',\n 'revoked'\n ]\n },\n card_network: {\n type: 'string',\n description: 'Indicates the card network.',\n enum: [ 'Visa',\n 'Mastercard',\n 'AmericanExpress',\n 'JCB',\n 'DinersClub',\n 'Discover',\n 'CartesBancaires',\n 'UnionPay',\n 'Interac',\n 'RuPay',\n 'Maestro',\n 'Star',\n 'Pulse',\n 'Accel',\n 'Nyce'\n ]\n },\n customer_acceptance: {\n type: 'object',\n description: 'This \"CustomerAcceptance\" object is passed during Payments-Confirm request, it enlists the type, time, and mode of acceptance properties related to an acceptance done by the customer. The customer_acceptance sub object is usually passed by the SDK or client.',\n properties: {\n acceptance_type: {\n type: 'string',\n description: 'This is used to indicate if the mandate was accepted online or offline',\n enum: [ 'online',\n 'offline'\n ]\n },\n accepted_at: {\n type: 'string',\n description: 'Specifying when the customer acceptance was provided',\n format: 'date-time'\n },\n online: {\n type: 'object',\n description: 'Details of online mandate',\n properties: {\n ip_address: {\n type: 'string',\n description: 'Ip address of the customer machine from which the mandate was created'\n },\n user_agent: {\n type: 'string',\n description: 'The user-agent of the customer\\'s browser'\n }\n },\n required: [ 'ip_address',\n 'user_agent'\n ]\n }\n },\n required: [ 'acceptance_type'\n ]\n }\n }\n}\n```", inputSchema: { type: 'object', properties: { customer_id: { type: 'string', }, + jq_filter: { + type: 'string', + title: 'jq Filter', + description: + 'A jq filter to apply to the response to include certain fields. Consult the output schema in the tool description to see the fields that are available.\n\nFor example: to include only the `name` field in every object of a results array, you can provide ".results[].name".\n\nFor more information, see the [jq documentation](https://jqlang.org/manual/).', + }, }, }, }; export const handler = async (client: Hyperswitch, args: Record | undefined) => { const { customer_id, ...body } = args as any; - return asTextContentResult(await client.customers.listMandates(customer_id)); + return asTextContentResult(await maybeFilter(args, await client.customers.listMandates(customer_id))); }; export default { metadata, tool, handler }; diff --git a/packages/mcp-server/src/tools/customers/payment-methods/list-customers-payment-methods.ts b/packages/mcp-server/src/tools/customers/payment-methods/list-customers-payment-methods.ts index 8db5c39..2bd58ba 100644 --- a/packages/mcp-server/src/tools/customers/payment-methods/list-customers-payment-methods.ts +++ b/packages/mcp-server/src/tools/customers/payment-methods/list-customers-payment-methods.ts @@ -17,7 +17,8 @@ export const metadata: Metadata = { export const tool: Tool = { name: 'list_customers_payment_methods', - description: 'Lists all the applicable payment methods for a particular Customer ID.', + description: + "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\nLists all the applicable payment methods for a particular Customer ID.", inputSchema: { type: 'object', properties: { diff --git a/packages/mcp-server/src/tools/customers/payment-methods/list-saved-customers-payment-methods.ts b/packages/mcp-server/src/tools/customers/payment-methods/list-saved-customers-payment-methods.ts index e34221f..4cd803c 100644 --- a/packages/mcp-server/src/tools/customers/payment-methods/list-saved-customers-payment-methods.ts +++ b/packages/mcp-server/src/tools/customers/payment-methods/list-saved-customers-payment-methods.ts @@ -18,7 +18,7 @@ export const metadata: Metadata = { export const tool: Tool = { name: 'list_saved_customers_payment_methods', description: - 'Lists all the applicable payment methods for a particular payment tied to the `client_secret`.', + "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\nLists all the applicable payment methods for a particular payment tied to the `client_secret`.", inputSchema: { type: 'object', properties: { diff --git a/packages/mcp-server/src/tools/customers/retrieve-customers.ts b/packages/mcp-server/src/tools/customers/retrieve-customers.ts index e9a47d6..d260c6b 100644 --- a/packages/mcp-server/src/tools/customers/retrieve-customers.ts +++ b/packages/mcp-server/src/tools/customers/retrieve-customers.ts @@ -1,5 +1,6 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. +import { maybeFilter } from 'hyperswitch-mcp/filtering'; import { asTextContentResult } from 'hyperswitch-mcp/tools/types'; import { Tool } from '@modelcontextprotocol/sdk/types.js'; @@ -17,20 +18,27 @@ export const metadata: Metadata = { export const tool: Tool = { name: 'retrieve_customers', - description: "Retrieves a customer's details.", + description: + "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\nRetrieves a customer's details.\n\n# Response Schema\n```json\n{\n $ref: '#/$defs/customer',\n $defs: {\n customer: {\n type: 'object',\n properties: {\n created_at: {\n type: 'string',\n description: 'A timestamp (ISO 8601 code) that determines when the customer was created',\n format: 'date-time'\n },\n customer_id: {\n type: 'string',\n description: 'The identifier for the customer object'\n },\n address: {\n $ref: '#/$defs/address_details'\n },\n default_payment_method_id: {\n type: 'string',\n description: 'The identifier for the default payment method.'\n },\n description: {\n type: 'string',\n description: 'An arbitrary string that you can attach to a customer object.'\n },\n email: {\n type: 'string',\n description: 'The customer\\'s email address'\n },\n metadata: {\n type: 'object',\n description: 'You can specify up to 50 keys, with key names up to 40 characters long and values up to 500\\ncharacters long. Metadata is useful for storing additional, structured information on an\\nobject.'\n },\n name: {\n type: 'string',\n description: 'The customer\\'s name'\n },\n phone: {\n type: 'string',\n description: 'The customer\\'s phone number'\n },\n phone_country_code: {\n type: 'string',\n description: 'The country code for the customer phone number'\n }\n },\n required: [ 'created_at',\n 'customer_id'\n ]\n },\n address_details: {\n type: 'object',\n description: 'Address details',\n properties: {\n city: {\n type: 'string',\n description: 'The city, district, suburb, town, or village of the address.'\n },\n country: {\n $ref: '#/$defs/country_alpha2'\n },\n first_name: {\n type: 'string',\n description: 'The first name for the address'\n },\n last_name: {\n type: 'string',\n description: 'The last name for the address'\n },\n line1: {\n type: 'string',\n description: 'The first line of the street address or P.O. Box.'\n },\n line2: {\n type: 'string',\n description: 'The second line of the street address or P.O. Box (e.g., apartment, suite, unit, or building).'\n },\n line3: {\n type: 'string',\n description: 'The third line of the street address, if applicable.'\n },\n state: {\n type: 'string',\n description: 'The address state'\n },\n zip: {\n type: 'string',\n description: 'The zip/postal code for the address'\n }\n },\n required: []\n },\n country_alpha2: {\n type: 'string',\n enum: [ 'AF',\n 'AX',\n 'AL',\n 'DZ',\n 'AS',\n 'AD',\n 'AO',\n 'AI',\n 'AQ',\n 'AG',\n 'AR',\n 'AM',\n 'AW',\n 'AU',\n 'AT',\n 'AZ',\n 'BS',\n 'BH',\n 'BD',\n 'BB',\n 'BY',\n 'BE',\n 'BZ',\n 'BJ',\n 'BM',\n 'BT',\n 'BO',\n 'BQ',\n 'BA',\n 'BW',\n 'BV',\n 'BR',\n 'IO',\n 'BN',\n 'BG',\n 'BF',\n 'BI',\n 'KH',\n 'CM',\n 'CA',\n 'CV',\n 'KY',\n 'CF',\n 'TD',\n 'CL',\n 'CN',\n 'CX',\n 'CC',\n 'CO',\n 'KM',\n 'CG',\n 'CD',\n 'CK',\n 'CR',\n 'CI',\n 'HR',\n 'CU',\n 'CW',\n 'CY',\n 'CZ',\n 'DK',\n 'DJ',\n 'DM',\n 'DO',\n 'EC',\n 'EG',\n 'SV',\n 'GQ',\n 'ER',\n 'EE',\n 'ET',\n 'FK',\n 'FO',\n 'FJ',\n 'FI',\n 'FR',\n 'GF',\n 'PF',\n 'TF',\n 'GA',\n 'GM',\n 'GE',\n 'DE',\n 'GH',\n 'GI',\n 'GR',\n 'GL',\n 'GD',\n 'GP',\n 'GU',\n 'GT',\n 'GG',\n 'GN',\n 'GW',\n 'GY',\n 'HT',\n 'HM',\n 'VA',\n 'HN',\n 'HK',\n 'HU',\n 'IS',\n 'IN',\n 'ID',\n 'IR',\n 'IQ',\n 'IE',\n 'IM',\n 'IL',\n 'IT',\n 'JM',\n 'JP',\n 'JE',\n 'JO',\n 'KZ',\n 'KE',\n 'KI',\n 'KP',\n 'KR',\n 'KW',\n 'KG',\n 'LA',\n 'LV',\n 'LB',\n 'LS',\n 'LR',\n 'LY',\n 'LI',\n 'LT',\n 'LU',\n 'MO',\n 'MK',\n 'MG',\n 'MW',\n 'MY',\n 'MV',\n 'ML',\n 'MT',\n 'MH',\n 'MQ',\n 'MR',\n 'MU',\n 'YT',\n 'MX',\n 'FM',\n 'MD',\n 'MC',\n 'MN',\n 'ME',\n 'MS',\n 'MA',\n 'MZ',\n 'MM',\n 'NA',\n 'NR',\n 'NP',\n 'NL',\n 'NC',\n 'NZ',\n 'NI',\n 'NE',\n 'NG',\n 'NU',\n 'NF',\n 'MP',\n 'NO',\n 'OM',\n 'PK',\n 'PW',\n 'PS',\n 'PA',\n 'PG',\n 'PY',\n 'PE',\n 'PH',\n 'PN',\n 'PL',\n 'PT',\n 'PR',\n 'QA',\n 'RE',\n 'RO',\n 'RU',\n 'RW',\n 'BL',\n 'SH',\n 'KN',\n 'LC',\n 'MF',\n 'PM',\n 'VC',\n 'WS',\n 'SM',\n 'ST',\n 'SA',\n 'SN',\n 'RS',\n 'SC',\n 'SL',\n 'SG',\n 'SX',\n 'SK',\n 'SI',\n 'SB',\n 'SO',\n 'ZA',\n 'GS',\n 'SS',\n 'ES',\n 'LK',\n 'SD',\n 'SR',\n 'SJ',\n 'SZ',\n 'SE',\n 'CH',\n 'SY',\n 'TW',\n 'TJ',\n 'TZ',\n 'TH',\n 'TL',\n 'TG',\n 'TK',\n 'TO',\n 'TT',\n 'TN',\n 'TR',\n 'TM',\n 'TC',\n 'TV',\n 'UG',\n 'UA',\n 'AE',\n 'GB',\n 'UM',\n 'UY',\n 'UZ',\n 'VU',\n 'VE',\n 'VN',\n 'VG',\n 'VI',\n 'WF',\n 'EH',\n 'YE',\n 'ZM',\n 'ZW',\n 'US'\n ]\n }\n }\n}\n```", inputSchema: { type: 'object', properties: { customer_id: { type: 'string', }, + jq_filter: { + type: 'string', + title: 'jq Filter', + description: + 'A jq filter to apply to the response to include certain fields. Consult the output schema in the tool description to see the fields that are available.\n\nFor example: to include only the `name` field in every object of a results array, you can provide ".results[].name".\n\nFor more information, see the [jq documentation](https://jqlang.org/manual/).', + }, }, }, }; export const handler = async (client: Hyperswitch, args: Record | undefined) => { const { customer_id, ...body } = args as any; - return asTextContentResult(await client.customers.retrieve(customer_id)); + return asTextContentResult(await maybeFilter(args, await client.customers.retrieve(customer_id))); }; export default { metadata, tool, handler }; diff --git a/packages/mcp-server/src/tools/customers/update-customers.ts b/packages/mcp-server/src/tools/customers/update-customers.ts index 2a25cd8..4bbd631 100644 --- a/packages/mcp-server/src/tools/customers/update-customers.ts +++ b/packages/mcp-server/src/tools/customers/update-customers.ts @@ -17,7 +17,8 @@ export const metadata: Metadata = { export const tool: Tool = { name: 'update_customers', - description: "Updates the customer's details in a customer object.", + description: + "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\nUpdates the customer's details in a customer object.", inputSchema: { type: 'object', properties: { diff --git a/packages/mcp-server/src/tools/disputes/list-disputes.ts b/packages/mcp-server/src/tools/disputes/list-disputes.ts index 1816e6b..3a93efc 100644 --- a/packages/mcp-server/src/tools/disputes/list-disputes.ts +++ b/packages/mcp-server/src/tools/disputes/list-disputes.ts @@ -1,5 +1,6 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. +import { maybeFilter } from 'hyperswitch-mcp/filtering'; import { asTextContentResult } from 'hyperswitch-mcp/tools/types'; import { Tool } from '@modelcontextprotocol/sdk/types.js'; @@ -17,7 +18,8 @@ export const metadata: Metadata = { export const tool: Tool = { name: 'list_disputes', - description: 'Lists all the Disputes for a merchant', + description: + "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\nLists all the Disputes for a merchant\n\n# Response Schema\n```json\n{\n type: 'array',\n items: {\n $ref: '#/$defs/dispute_response'\n },\n $defs: {\n dispute_response: {\n type: 'object',\n properties: {\n amount: {\n type: 'string',\n description: 'Connector specific types to send'\n },\n attempt_id: {\n type: 'string',\n description: 'The identifier for payment_attempt'\n },\n connector: {\n type: 'string',\n description: 'connector to which dispute is associated with'\n },\n connector_dispute_id: {\n type: 'string',\n description: 'Dispute id sent by connector'\n },\n connector_status: {\n type: 'string',\n description: 'Status of the dispute sent by connector'\n },\n created_at: {\n type: 'string',\n description: 'Time at which dispute is received',\n format: 'date-time'\n },\n currency: {\n $ref: '#/$defs/currency'\n },\n dispute_id: {\n type: 'string',\n description: 'The identifier for dispute'\n },\n dispute_stage: {\n $ref: '#/$defs/dispute_stage'\n },\n dispute_status: {\n $ref: '#/$defs/dispute_status'\n },\n payment_id: {\n type: 'string',\n description: 'The identifier for payment_intent'\n },\n challenge_required_by: {\n type: 'string',\n description: 'Evidence deadline of dispute sent by connector',\n format: 'date-time'\n },\n connector_created_at: {\n type: 'string',\n description: 'Dispute created time sent by connector',\n format: 'date-time'\n },\n connector_reason: {\n type: 'string',\n description: 'Reason of dispute sent by connector'\n },\n connector_reason_code: {\n type: 'string',\n description: 'Reason code of dispute sent by connector'\n },\n connector_updated_at: {\n type: 'string',\n description: 'Dispute updated time sent by connector',\n format: 'date-time'\n },\n merchant_connector_id: {\n type: 'string',\n description: 'The `merchant_connector_id` of the connector / processor through which the dispute was processed'\n },\n profile_id: {\n type: 'string',\n description: 'The `profile_id` associated with the dispute'\n }\n },\n required: [ 'amount',\n 'attempt_id',\n 'connector',\n 'connector_dispute_id',\n 'connector_status',\n 'created_at',\n 'currency',\n 'dispute_id',\n 'dispute_stage',\n 'dispute_status',\n 'payment_id'\n ]\n },\n currency: {\n type: 'string',\n description: 'The three-letter ISO 4217 currency code (e.g., \"USD\", \"EUR\") for the payment amount. This field is mandatory for creating a payment.',\n enum: [ 'AED',\n 'AFN',\n 'ALL',\n 'AMD',\n 'ANG',\n 'AOA',\n 'ARS',\n 'AUD',\n 'AWG',\n 'AZN',\n 'BAM',\n 'BBD',\n 'BDT',\n 'BGN',\n 'BHD',\n 'BIF',\n 'BMD',\n 'BND',\n 'BOB',\n 'BRL',\n 'BSD',\n 'BTN',\n 'BWP',\n 'BYN',\n 'BZD',\n 'CAD',\n 'CDF',\n 'CHF',\n 'CLF',\n 'CLP',\n 'CNY',\n 'COP',\n 'CRC',\n 'CUC',\n 'CUP',\n 'CVE',\n 'CZK',\n 'DJF',\n 'DKK',\n 'DOP',\n 'DZD',\n 'EGP',\n 'ERN',\n 'ETB',\n 'EUR',\n 'FJD',\n 'FKP',\n 'GBP',\n 'GEL',\n 'GHS',\n 'GIP',\n 'GMD',\n 'GNF',\n 'GTQ',\n 'GYD',\n 'HKD',\n 'HNL',\n 'HRK',\n 'HTG',\n 'HUF',\n 'IDR',\n 'ILS',\n 'INR',\n 'IQD',\n 'IRR',\n 'ISK',\n 'JMD',\n 'JOD',\n 'JPY',\n 'KES',\n 'KGS',\n 'KHR',\n 'KMF',\n 'KPW',\n 'KRW',\n 'KWD',\n 'KYD',\n 'KZT',\n 'LAK',\n 'LBP',\n 'LKR',\n 'LRD',\n 'LSL',\n 'LYD',\n 'MAD',\n 'MDL',\n 'MGA',\n 'MKD',\n 'MMK',\n 'MNT',\n 'MOP',\n 'MRU',\n 'MUR',\n 'MVR',\n 'MWK',\n 'MXN',\n 'MYR',\n 'MZN',\n 'NAD',\n 'NGN',\n 'NIO',\n 'NOK',\n 'NPR',\n 'NZD',\n 'OMR',\n 'PAB',\n 'PEN',\n 'PGK',\n 'PHP',\n 'PKR',\n 'PLN',\n 'PYG',\n 'QAR',\n 'RON',\n 'RSD',\n 'RUB',\n 'RWF',\n 'SAR',\n 'SBD',\n 'SCR',\n 'SDG',\n 'SEK',\n 'SGD',\n 'SHP',\n 'SLE',\n 'SLL',\n 'SOS',\n 'SRD',\n 'SSP',\n 'STD',\n 'STN',\n 'SVC',\n 'SYP',\n 'SZL',\n 'THB',\n 'TJS',\n 'TMT',\n 'TND',\n 'TOP',\n 'TRY',\n 'TTD',\n 'TWD',\n 'TZS',\n 'UAH',\n 'UGX',\n 'USD',\n 'UYU',\n 'UZS',\n 'VES',\n 'VND',\n 'VUV',\n 'WST',\n 'XAF',\n 'XCD',\n 'XOF',\n 'XPF',\n 'YER',\n 'ZAR',\n 'ZMW',\n 'ZWL'\n ]\n },\n dispute_stage: {\n type: 'string',\n description: 'Stage of the dispute',\n enum: [ 'pre_dispute',\n 'dispute',\n 'pre_arbitration'\n ]\n },\n dispute_status: {\n type: 'string',\n description: 'Status of the dispute',\n enum: [ 'dispute_opened',\n 'dispute_expired',\n 'dispute_accepted',\n 'dispute_cancelled',\n 'dispute_challenged',\n 'dispute_won',\n 'dispute_lost'\n ]\n }\n }\n}\n```", inputSchema: { type: 'object', properties: { @@ -65,6 +67,12 @@ export const tool: Tool = { }, required: [], }, + jq_filter: { + type: 'string', + title: 'jq Filter', + description: + 'A jq filter to apply to the response to include certain fields. Consult the output schema in the tool description to see the fields that are available.\n\nFor example: to include only the `name` field in every object of a results array, you can provide ".results[].name".\n\nFor more information, see the [jq documentation](https://jqlang.org/manual/).', + }, }, $defs: { dispute_stage: { @@ -91,7 +99,7 @@ export const tool: Tool = { export const handler = async (client: Hyperswitch, args: Record | undefined) => { const body = args as any; - return asTextContentResult(await client.disputes.list(body)); + return asTextContentResult(await maybeFilter(args, await client.disputes.list(body))); }; export default { metadata, tool, handler }; diff --git a/packages/mcp-server/src/tools/disputes/retrieve-disputes.ts b/packages/mcp-server/src/tools/disputes/retrieve-disputes.ts index 5affe8e..c5cef21 100644 --- a/packages/mcp-server/src/tools/disputes/retrieve-disputes.ts +++ b/packages/mcp-server/src/tools/disputes/retrieve-disputes.ts @@ -1,5 +1,6 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. +import { maybeFilter } from 'hyperswitch-mcp/filtering'; import { asTextContentResult } from 'hyperswitch-mcp/tools/types'; import { Tool } from '@modelcontextprotocol/sdk/types.js'; @@ -17,20 +18,27 @@ export const metadata: Metadata = { export const tool: Tool = { name: 'retrieve_disputes', - description: 'Retrieves a dispute', + description: + "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\nRetrieves a dispute\n\n# Response Schema\n```json\n{\n $ref: '#/$defs/dispute_response',\n $defs: {\n dispute_response: {\n type: 'object',\n properties: {\n amount: {\n type: 'string',\n description: 'Connector specific types to send'\n },\n attempt_id: {\n type: 'string',\n description: 'The identifier for payment_attempt'\n },\n connector: {\n type: 'string',\n description: 'connector to which dispute is associated with'\n },\n connector_dispute_id: {\n type: 'string',\n description: 'Dispute id sent by connector'\n },\n connector_status: {\n type: 'string',\n description: 'Status of the dispute sent by connector'\n },\n created_at: {\n type: 'string',\n description: 'Time at which dispute is received',\n format: 'date-time'\n },\n currency: {\n $ref: '#/$defs/currency'\n },\n dispute_id: {\n type: 'string',\n description: 'The identifier for dispute'\n },\n dispute_stage: {\n $ref: '#/$defs/dispute_stage'\n },\n dispute_status: {\n $ref: '#/$defs/dispute_status'\n },\n payment_id: {\n type: 'string',\n description: 'The identifier for payment_intent'\n },\n challenge_required_by: {\n type: 'string',\n description: 'Evidence deadline of dispute sent by connector',\n format: 'date-time'\n },\n connector_created_at: {\n type: 'string',\n description: 'Dispute created time sent by connector',\n format: 'date-time'\n },\n connector_reason: {\n type: 'string',\n description: 'Reason of dispute sent by connector'\n },\n connector_reason_code: {\n type: 'string',\n description: 'Reason code of dispute sent by connector'\n },\n connector_updated_at: {\n type: 'string',\n description: 'Dispute updated time sent by connector',\n format: 'date-time'\n },\n merchant_connector_id: {\n type: 'string',\n description: 'The `merchant_connector_id` of the connector / processor through which the dispute was processed'\n },\n profile_id: {\n type: 'string',\n description: 'The `profile_id` associated with the dispute'\n }\n },\n required: [ 'amount',\n 'attempt_id',\n 'connector',\n 'connector_dispute_id',\n 'connector_status',\n 'created_at',\n 'currency',\n 'dispute_id',\n 'dispute_stage',\n 'dispute_status',\n 'payment_id'\n ]\n },\n currency: {\n type: 'string',\n description: 'The three-letter ISO 4217 currency code (e.g., \"USD\", \"EUR\") for the payment amount. This field is mandatory for creating a payment.',\n enum: [ 'AED',\n 'AFN',\n 'ALL',\n 'AMD',\n 'ANG',\n 'AOA',\n 'ARS',\n 'AUD',\n 'AWG',\n 'AZN',\n 'BAM',\n 'BBD',\n 'BDT',\n 'BGN',\n 'BHD',\n 'BIF',\n 'BMD',\n 'BND',\n 'BOB',\n 'BRL',\n 'BSD',\n 'BTN',\n 'BWP',\n 'BYN',\n 'BZD',\n 'CAD',\n 'CDF',\n 'CHF',\n 'CLF',\n 'CLP',\n 'CNY',\n 'COP',\n 'CRC',\n 'CUC',\n 'CUP',\n 'CVE',\n 'CZK',\n 'DJF',\n 'DKK',\n 'DOP',\n 'DZD',\n 'EGP',\n 'ERN',\n 'ETB',\n 'EUR',\n 'FJD',\n 'FKP',\n 'GBP',\n 'GEL',\n 'GHS',\n 'GIP',\n 'GMD',\n 'GNF',\n 'GTQ',\n 'GYD',\n 'HKD',\n 'HNL',\n 'HRK',\n 'HTG',\n 'HUF',\n 'IDR',\n 'ILS',\n 'INR',\n 'IQD',\n 'IRR',\n 'ISK',\n 'JMD',\n 'JOD',\n 'JPY',\n 'KES',\n 'KGS',\n 'KHR',\n 'KMF',\n 'KPW',\n 'KRW',\n 'KWD',\n 'KYD',\n 'KZT',\n 'LAK',\n 'LBP',\n 'LKR',\n 'LRD',\n 'LSL',\n 'LYD',\n 'MAD',\n 'MDL',\n 'MGA',\n 'MKD',\n 'MMK',\n 'MNT',\n 'MOP',\n 'MRU',\n 'MUR',\n 'MVR',\n 'MWK',\n 'MXN',\n 'MYR',\n 'MZN',\n 'NAD',\n 'NGN',\n 'NIO',\n 'NOK',\n 'NPR',\n 'NZD',\n 'OMR',\n 'PAB',\n 'PEN',\n 'PGK',\n 'PHP',\n 'PKR',\n 'PLN',\n 'PYG',\n 'QAR',\n 'RON',\n 'RSD',\n 'RUB',\n 'RWF',\n 'SAR',\n 'SBD',\n 'SCR',\n 'SDG',\n 'SEK',\n 'SGD',\n 'SHP',\n 'SLE',\n 'SLL',\n 'SOS',\n 'SRD',\n 'SSP',\n 'STD',\n 'STN',\n 'SVC',\n 'SYP',\n 'SZL',\n 'THB',\n 'TJS',\n 'TMT',\n 'TND',\n 'TOP',\n 'TRY',\n 'TTD',\n 'TWD',\n 'TZS',\n 'UAH',\n 'UGX',\n 'USD',\n 'UYU',\n 'UZS',\n 'VES',\n 'VND',\n 'VUV',\n 'WST',\n 'XAF',\n 'XCD',\n 'XOF',\n 'XPF',\n 'YER',\n 'ZAR',\n 'ZMW',\n 'ZWL'\n ]\n },\n dispute_stage: {\n type: 'string',\n description: 'Stage of the dispute',\n enum: [ 'pre_dispute',\n 'dispute',\n 'pre_arbitration'\n ]\n },\n dispute_status: {\n type: 'string',\n description: 'Status of the dispute',\n enum: [ 'dispute_opened',\n 'dispute_expired',\n 'dispute_accepted',\n 'dispute_cancelled',\n 'dispute_challenged',\n 'dispute_won',\n 'dispute_lost'\n ]\n }\n }\n}\n```", inputSchema: { type: 'object', properties: { dispute_id: { type: 'string', }, + jq_filter: { + type: 'string', + title: 'jq Filter', + description: + 'A jq filter to apply to the response to include certain fields. Consult the output schema in the tool description to see the fields that are available.\n\nFor example: to include only the `name` field in every object of a results array, you can provide ".results[].name".\n\nFor more information, see the [jq documentation](https://jqlang.org/manual/).', + }, }, }, }; export const handler = async (client: Hyperswitch, args: Record | undefined) => { const { dispute_id, ...body } = args as any; - return asTextContentResult(await client.disputes.retrieve(dispute_id)); + return asTextContentResult(await maybeFilter(args, await client.disputes.retrieve(dispute_id))); }; export default { metadata, tool, handler }; diff --git a/packages/mcp-server/src/tools/events/delivery-attempts-events.ts b/packages/mcp-server/src/tools/events/delivery-attempts-events.ts index a37341d..558c772 100644 --- a/packages/mcp-server/src/tools/events/delivery-attempts-events.ts +++ b/packages/mcp-server/src/tools/events/delivery-attempts-events.ts @@ -1,5 +1,6 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. +import { maybeFilter } from 'hyperswitch-mcp/filtering'; import { asTextContentResult } from 'hyperswitch-mcp/tools/types'; import { Tool } from '@modelcontextprotocol/sdk/types.js'; @@ -17,7 +18,8 @@ export const metadata: Metadata = { export const tool: Tool = { name: 'delivery_attempts_events', - description: 'List all delivery attempts for the specified Event.', + description: + "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 all delivery attempts for the specified Event.\n\n# Response Schema\n```json\n{\n type: 'array',\n items: {\n $ref: '#/$defs/event_retrieve'\n },\n $defs: {\n event_retrieve: {\n allOf: [ {\n $ref: '#/$defs/event_list_item'\n }\n ],\n description: 'The response body for retrieving an event.'\n },\n event_list_item: {\n type: 'object',\n description: 'The response body for each item when listing events.',\n properties: {\n created: {\n type: 'string',\n description: 'Time at which the event was created.',\n format: 'date-time'\n },\n event_class: {\n $ref: '#/$defs/event_class'\n },\n event_id: {\n type: 'string',\n description: 'The identifier for the Event.'\n },\n event_type: {\n $ref: '#/$defs/event_type'\n },\n initial_attempt_id: {\n type: 'string',\n description: 'The identifier for the initial delivery attempt. This will be the same as `event_id` for\\nthe initial delivery attempt.'\n },\n merchant_id: {\n type: 'string',\n description: 'The identifier for the Merchant Account.'\n },\n object_id: {\n type: 'string',\n description: 'The identifier for the object (Payment Intent ID, Refund ID, etc.)'\n },\n profile_id: {\n type: 'string',\n description: 'The identifier for the Business Profile.'\n },\n is_delivery_successful: {\n type: 'boolean',\n description: 'Indicates whether the webhook was ultimately delivered or not.'\n }\n },\n required: [ 'created',\n 'event_class',\n 'event_id',\n 'event_type',\n 'initial_attempt_id',\n 'merchant_id',\n 'object_id',\n 'profile_id'\n ]\n },\n event_class: {\n type: 'string',\n enum: [ 'payments',\n 'refunds',\n 'disputes',\n 'mandates',\n 'payouts'\n ]\n },\n event_type: {\n type: 'string',\n enum: [ 'payment_succeeded',\n 'payment_failed',\n 'payment_processing',\n 'payment_cancelled',\n 'payment_authorized',\n 'payment_captured',\n 'action_required',\n 'refund_succeeded',\n 'refund_failed',\n 'dispute_opened',\n 'dispute_expired',\n 'dispute_accepted',\n 'dispute_cancelled',\n 'dispute_challenged',\n 'dispute_won',\n 'dispute_lost',\n 'mandate_active',\n 'mandate_revoked',\n 'payout_success',\n 'payout_failed',\n 'payout_initiated',\n 'payout_processing',\n 'payout_cancelled',\n 'payout_expired',\n 'payout_reversed'\n ]\n }\n }\n}\n```", inputSchema: { type: 'object', properties: { @@ -27,13 +29,19 @@ export const tool: Tool = { event_id: { type: 'string', }, + jq_filter: { + type: 'string', + title: 'jq Filter', + description: + 'A jq filter to apply to the response to include certain fields. Consult the output schema in the tool description to see the fields that are available.\n\nFor example: to include only the `name` field in every object of a results array, you can provide ".results[].name".\n\nFor more information, see the [jq documentation](https://jqlang.org/manual/).', + }, }, }, }; export const handler = async (client: Hyperswitch, args: Record | undefined) => { const { event_id, ...body } = args as any; - return asTextContentResult(await client.events.deliveryAttempts(event_id, body)); + return asTextContentResult(await maybeFilter(args, await client.events.deliveryAttempts(event_id, body))); }; export default { metadata, tool, handler }; diff --git a/packages/mcp-server/src/tools/events/list-events.ts b/packages/mcp-server/src/tools/events/list-events.ts index cff247c..8acd1c1 100644 --- a/packages/mcp-server/src/tools/events/list-events.ts +++ b/packages/mcp-server/src/tools/events/list-events.ts @@ -1,5 +1,6 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. +import { maybeFilter } from 'hyperswitch-mcp/filtering'; import { asTextContentResult } from 'hyperswitch-mcp/tools/types'; import { Tool } from '@modelcontextprotocol/sdk/types.js'; @@ -17,7 +18,8 @@ export const metadata: Metadata = { export const tool: Tool = { name: 'list_events', - description: 'List all Events associated with a Merchant Account or Profile.', + description: + "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 all Events associated with a Merchant Account or Profile.\n\n# Response Schema\n```json\n{\n $ref: '#/$defs/total_events',\n $defs: {\n total_events: {\n type: 'object',\n description: 'The response body of list initial delivery attempts api call.',\n properties: {\n events: {\n type: 'array',\n description: 'The list of events',\n items: {\n $ref: '#/$defs/event_list_item'\n }\n },\n total_count: {\n type: 'integer',\n description: 'Count of total events'\n }\n },\n required: [ 'events',\n 'total_count'\n ]\n },\n event_list_item: {\n type: 'object',\n description: 'The response body for each item when listing events.',\n properties: {\n created: {\n type: 'string',\n description: 'Time at which the event was created.',\n format: 'date-time'\n },\n event_class: {\n $ref: '#/$defs/event_class'\n },\n event_id: {\n type: 'string',\n description: 'The identifier for the Event.'\n },\n event_type: {\n $ref: '#/$defs/event_type'\n },\n initial_attempt_id: {\n type: 'string',\n description: 'The identifier for the initial delivery attempt. This will be the same as `event_id` for\\nthe initial delivery attempt.'\n },\n merchant_id: {\n type: 'string',\n description: 'The identifier for the Merchant Account.'\n },\n object_id: {\n type: 'string',\n description: 'The identifier for the object (Payment Intent ID, Refund ID, etc.)'\n },\n profile_id: {\n type: 'string',\n description: 'The identifier for the Business Profile.'\n },\n is_delivery_successful: {\n type: 'boolean',\n description: 'Indicates whether the webhook was ultimately delivered or not.'\n }\n },\n required: [ 'created',\n 'event_class',\n 'event_id',\n 'event_type',\n 'initial_attempt_id',\n 'merchant_id',\n 'object_id',\n 'profile_id'\n ]\n },\n event_class: {\n type: 'string',\n enum: [ 'payments',\n 'refunds',\n 'disputes',\n 'mandates',\n 'payouts'\n ]\n },\n event_type: {\n type: 'string',\n enum: [ 'payment_succeeded',\n 'payment_failed',\n 'payment_processing',\n 'payment_cancelled',\n 'payment_authorized',\n 'payment_captured',\n 'action_required',\n 'refund_succeeded',\n 'refund_failed',\n 'dispute_opened',\n 'dispute_expired',\n 'dispute_accepted',\n 'dispute_cancelled',\n 'dispute_challenged',\n 'dispute_won',\n 'dispute_lost',\n 'mandate_active',\n 'mandate_revoked',\n 'payout_success',\n 'payout_failed',\n 'payout_initiated',\n 'payout_processing',\n 'payout_cancelled',\n 'payout_expired',\n 'payout_reversed'\n ]\n }\n }\n}\n```", inputSchema: { type: 'object', properties: { @@ -69,6 +71,12 @@ export const tool: Tool = { type: 'string', description: 'Filter all events associated with the specified business profile ID.', }, + jq_filter: { + type: 'string', + title: 'jq Filter', + description: + 'A jq filter to apply to the response to include certain fields. Consult the output schema in the tool description to see the fields that are available.\n\nFor example: to include only the `name` field in every object of a results array, you can provide ".results[].name".\n\nFor more information, see the [jq documentation](https://jqlang.org/manual/).', + }, }, $defs: { event_class: { @@ -111,7 +119,7 @@ export const tool: Tool = { export const handler = async (client: Hyperswitch, args: Record | undefined) => { const { merchant_id, ...body } = args as any; - return asTextContentResult(await client.events.list(merchant_id, body)); + return asTextContentResult(await maybeFilter(args, await client.events.list(merchant_id, body))); }; export default { metadata, tool, handler }; diff --git a/packages/mcp-server/src/tools/events/profile/list-events-profile.ts b/packages/mcp-server/src/tools/events/profile/list-events-profile.ts index 9150419..3532a46 100644 --- a/packages/mcp-server/src/tools/events/profile/list-events-profile.ts +++ b/packages/mcp-server/src/tools/events/profile/list-events-profile.ts @@ -1,5 +1,6 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. +import { maybeFilter } from 'hyperswitch-mcp/filtering'; import { asTextContentResult } from 'hyperswitch-mcp/tools/types'; import { Tool } from '@modelcontextprotocol/sdk/types.js'; @@ -17,7 +18,8 @@ export const metadata: Metadata = { export const tool: Tool = { name: 'list_events_profile', - description: 'List all Events associated with a Profile.', + description: + "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 all Events associated with a Profile.\n\n# Response Schema\n```json\n{\n $ref: '#/$defs/total_events',\n $defs: {\n total_events: {\n type: 'object',\n description: 'The response body of list initial delivery attempts api call.',\n properties: {\n events: {\n type: 'array',\n description: 'The list of events',\n items: {\n $ref: '#/$defs/event_list_item'\n }\n },\n total_count: {\n type: 'integer',\n description: 'Count of total events'\n }\n },\n required: [ 'events',\n 'total_count'\n ]\n },\n event_list_item: {\n type: 'object',\n description: 'The response body for each item when listing events.',\n properties: {\n created: {\n type: 'string',\n description: 'Time at which the event was created.',\n format: 'date-time'\n },\n event_class: {\n $ref: '#/$defs/event_class'\n },\n event_id: {\n type: 'string',\n description: 'The identifier for the Event.'\n },\n event_type: {\n $ref: '#/$defs/event_type'\n },\n initial_attempt_id: {\n type: 'string',\n description: 'The identifier for the initial delivery attempt. This will be the same as `event_id` for\\nthe initial delivery attempt.'\n },\n merchant_id: {\n type: 'string',\n description: 'The identifier for the Merchant Account.'\n },\n object_id: {\n type: 'string',\n description: 'The identifier for the object (Payment Intent ID, Refund ID, etc.)'\n },\n profile_id: {\n type: 'string',\n description: 'The identifier for the Business Profile.'\n },\n is_delivery_successful: {\n type: 'boolean',\n description: 'Indicates whether the webhook was ultimately delivered or not.'\n }\n },\n required: [ 'created',\n 'event_class',\n 'event_id',\n 'event_type',\n 'initial_attempt_id',\n 'merchant_id',\n 'object_id',\n 'profile_id'\n ]\n },\n event_class: {\n type: 'string',\n enum: [ 'payments',\n 'refunds',\n 'disputes',\n 'mandates',\n 'payouts'\n ]\n },\n event_type: {\n type: 'string',\n enum: [ 'payment_succeeded',\n 'payment_failed',\n 'payment_processing',\n 'payment_cancelled',\n 'payment_authorized',\n 'payment_captured',\n 'action_required',\n 'refund_succeeded',\n 'refund_failed',\n 'dispute_opened',\n 'dispute_expired',\n 'dispute_accepted',\n 'dispute_cancelled',\n 'dispute_challenged',\n 'dispute_won',\n 'dispute_lost',\n 'mandate_active',\n 'mandate_revoked',\n 'payout_success',\n 'payout_failed',\n 'payout_initiated',\n 'payout_processing',\n 'payout_cancelled',\n 'payout_expired',\n 'payout_reversed'\n ]\n }\n }\n}\n```", inputSchema: { type: 'object', properties: { @@ -66,6 +68,12 @@ export const tool: Tool = { type: 'string', description: 'Filter all events associated with the specified business profile ID.', }, + jq_filter: { + type: 'string', + title: 'jq Filter', + description: + 'A jq filter to apply to the response to include certain fields. Consult the output schema in the tool description to see the fields that are available.\n\nFor example: to include only the `name` field in every object of a results array, you can provide ".results[].name".\n\nFor more information, see the [jq documentation](https://jqlang.org/manual/).', + }, }, $defs: { event_class: { @@ -108,7 +116,7 @@ export const tool: Tool = { export const handler = async (client: Hyperswitch, args: Record | undefined) => { const body = args as any; - return asTextContentResult(await client.events.profile.list(body)); + return asTextContentResult(await maybeFilter(args, await client.events.profile.list(body))); }; export default { metadata, tool, handler }; diff --git a/packages/mcp-server/src/tools/events/retry-events.ts b/packages/mcp-server/src/tools/events/retry-events.ts index 104a190..202b060 100644 --- a/packages/mcp-server/src/tools/events/retry-events.ts +++ b/packages/mcp-server/src/tools/events/retry-events.ts @@ -1,5 +1,6 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. +import { maybeFilter } from 'hyperswitch-mcp/filtering'; import { asTextContentResult } from 'hyperswitch-mcp/tools/types'; import { Tool } from '@modelcontextprotocol/sdk/types.js'; @@ -17,7 +18,8 @@ export const metadata: Metadata = { export const tool: Tool = { name: 'retry_events', - description: 'Manually retry the delivery of the specified Event.', + description: + "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\nManually retry the delivery of the specified Event.\n\n# Response Schema\n```json\n{\n $ref: '#/$defs/event_retrieve',\n $defs: {\n event_retrieve: {\n allOf: [ {\n $ref: '#/$defs/event_list_item'\n }\n ],\n description: 'The response body for retrieving an event.'\n },\n event_list_item: {\n type: 'object',\n description: 'The response body for each item when listing events.',\n properties: {\n created: {\n type: 'string',\n description: 'Time at which the event was created.',\n format: 'date-time'\n },\n event_class: {\n $ref: '#/$defs/event_class'\n },\n event_id: {\n type: 'string',\n description: 'The identifier for the Event.'\n },\n event_type: {\n $ref: '#/$defs/event_type'\n },\n initial_attempt_id: {\n type: 'string',\n description: 'The identifier for the initial delivery attempt. This will be the same as `event_id` for\\nthe initial delivery attempt.'\n },\n merchant_id: {\n type: 'string',\n description: 'The identifier for the Merchant Account.'\n },\n object_id: {\n type: 'string',\n description: 'The identifier for the object (Payment Intent ID, Refund ID, etc.)'\n },\n profile_id: {\n type: 'string',\n description: 'The identifier for the Business Profile.'\n },\n is_delivery_successful: {\n type: 'boolean',\n description: 'Indicates whether the webhook was ultimately delivered or not.'\n }\n },\n required: [ 'created',\n 'event_class',\n 'event_id',\n 'event_type',\n 'initial_attempt_id',\n 'merchant_id',\n 'object_id',\n 'profile_id'\n ]\n },\n event_class: {\n type: 'string',\n enum: [ 'payments',\n 'refunds',\n 'disputes',\n 'mandates',\n 'payouts'\n ]\n },\n event_type: {\n type: 'string',\n enum: [ 'payment_succeeded',\n 'payment_failed',\n 'payment_processing',\n 'payment_cancelled',\n 'payment_authorized',\n 'payment_captured',\n 'action_required',\n 'refund_succeeded',\n 'refund_failed',\n 'dispute_opened',\n 'dispute_expired',\n 'dispute_accepted',\n 'dispute_cancelled',\n 'dispute_challenged',\n 'dispute_won',\n 'dispute_lost',\n 'mandate_active',\n 'mandate_revoked',\n 'payout_success',\n 'payout_failed',\n 'payout_initiated',\n 'payout_processing',\n 'payout_cancelled',\n 'payout_expired',\n 'payout_reversed'\n ]\n }\n }\n}\n```", inputSchema: { type: 'object', properties: { @@ -27,13 +29,19 @@ export const tool: Tool = { event_id: { type: 'string', }, + jq_filter: { + type: 'string', + title: 'jq Filter', + description: + 'A jq filter to apply to the response to include certain fields. Consult the output schema in the tool description to see the fields that are available.\n\nFor example: to include only the `name` field in every object of a results array, you can provide ".results[].name".\n\nFor more information, see the [jq documentation](https://jqlang.org/manual/).', + }, }, }, }; export const handler = async (client: Hyperswitch, args: Record | undefined) => { const { event_id, ...body } = args as any; - return asTextContentResult(await client.events.retry(event_id, body)); + return asTextContentResult(await maybeFilter(args, await client.events.retry(event_id, body))); }; export default { metadata, tool, handler }; diff --git a/packages/mcp-server/src/tools/gsm/create-gsm.ts b/packages/mcp-server/src/tools/gsm/create-gsm.ts index 71dd94f..c4466e4 100644 --- a/packages/mcp-server/src/tools/gsm/create-gsm.ts +++ b/packages/mcp-server/src/tools/gsm/create-gsm.ts @@ -1,5 +1,6 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. +import { maybeFilter } from 'hyperswitch-mcp/filtering'; import { asTextContentResult } from 'hyperswitch-mcp/tools/types'; import { Tool } from '@modelcontextprotocol/sdk/types.js'; @@ -18,7 +19,7 @@ export const metadata: Metadata = { export const tool: Tool = { name: 'create_gsm', description: - "Creates a GSM (Global Status Mapping) Rule. A GSM rule is used to map a connector's error message/error code combination during a particular payments flow/sub-flow to Hyperswitch's unified status/error code/error message combination. It is also used to decide the next action in the flow - retry/requeue/do_default", + "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\nCreates a GSM (Global Status Mapping) Rule. A GSM rule is used to map a connector's error message/error code combination during a particular payments flow/sub-flow to Hyperswitch's unified status/error code/error message combination. It is also used to decide the next action in the flow - retry/requeue/do_default\n\n# Response Schema\n```json\n{\n $ref: '#/$defs/gsm_response',\n $defs: {\n gsm_response: {\n type: 'object',\n properties: {\n clear_pan_possible: {\n type: 'boolean',\n description: 'indicates if retry with pan is possible'\n },\n code: {\n type: 'string',\n description: 'code received from the connector'\n },\n connector: {\n type: 'string',\n description: 'The connector through which payment has gone through'\n },\n decision: {\n type: 'string',\n description: 'decision to be taken for auto retries flow'\n },\n flow: {\n type: 'string',\n description: 'The flow in which the code and message occurred for a connector'\n },\n message: {\n type: 'string',\n description: 'message received from the connector'\n },\n status: {\n type: 'string',\n description: 'status provided by the router'\n },\n step_up_possible: {\n type: 'boolean',\n description: 'indicates if step_up retry is possible'\n },\n sub_flow: {\n type: 'string',\n description: 'The sub_flow in which the code and message occurred for a connector'\n },\n error_category: {\n $ref: '#/$defs/error_category'\n },\n router_error: {\n type: 'string',\n description: 'optional error provided by the router'\n },\n unified_code: {\n type: 'string',\n description: 'error code unified across the connectors'\n },\n unified_message: {\n type: 'string',\n description: 'error message unified across the connectors'\n }\n },\n required: [ 'clear_pan_possible',\n 'code',\n 'connector',\n 'decision',\n 'flow',\n 'message',\n 'status',\n 'step_up_possible',\n 'sub_flow'\n ]\n },\n error_category: {\n type: 'string',\n enum: [ 'frm_decline',\n 'processor_downtime',\n 'processor_decline_unauthorized',\n 'issue_with_payment_method',\n 'processor_decline_incorrect_data'\n ]\n }\n }\n}\n```", inputSchema: { type: 'object', properties: { @@ -71,6 +72,12 @@ export const tool: Tool = { type: 'string', description: 'error message unified across the connectors', }, + jq_filter: { + type: 'string', + title: 'jq Filter', + description: + 'A jq filter to apply to the response to include certain fields. Consult the output schema in the tool description to see the fields that are available.\n\nFor example: to include only the `name` field in every object of a results array, you can provide ".results[].name".\n\nFor more information, see the [jq documentation](https://jqlang.org/manual/).', + }, }, $defs: { connector: { @@ -205,7 +212,7 @@ export const tool: Tool = { export const handler = async (client: Hyperswitch, args: Record | undefined) => { const body = args as any; - return asTextContentResult(await client.gsm.create(body)); + return asTextContentResult(await maybeFilter(args, await client.gsm.create(body))); }; export default { metadata, tool, handler }; diff --git a/packages/mcp-server/src/tools/gsm/delete-gsm.ts b/packages/mcp-server/src/tools/gsm/delete-gsm.ts index 5581584..6c4f5f5 100644 --- a/packages/mcp-server/src/tools/gsm/delete-gsm.ts +++ b/packages/mcp-server/src/tools/gsm/delete-gsm.ts @@ -1,5 +1,6 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. +import { maybeFilter } from 'hyperswitch-mcp/filtering'; import { asTextContentResult } from 'hyperswitch-mcp/tools/types'; import { Tool } from '@modelcontextprotocol/sdk/types.js'; @@ -17,7 +18,8 @@ export const metadata: Metadata = { export const tool: Tool = { name: 'delete_gsm', - description: 'Deletes a Gsm Rule', + description: + "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\nDeletes a Gsm Rule\n\n# Response Schema\n```json\n{\n type: 'object',\n properties: {\n code: {\n type: 'string',\n description: 'code received from the connector'\n },\n connector: {\n type: 'string',\n description: 'The connector through which payment has gone through'\n },\n flow: {\n type: 'string',\n description: 'The flow in which the code and message occurred for a connector'\n },\n gsm_rule_delete: {\n type: 'boolean'\n },\n sub_flow: {\n type: 'string',\n description: 'The sub_flow in which the code and message occurred for a connector'\n }\n },\n required: [ 'code',\n 'connector',\n 'flow',\n 'gsm_rule_delete',\n 'sub_flow'\n ]\n}\n```", inputSchema: { type: 'object', properties: { @@ -41,13 +43,19 @@ export const tool: Tool = { type: 'string', description: 'The sub_flow in which the code and message occurred for a connector', }, + jq_filter: { + type: 'string', + title: 'jq Filter', + description: + 'A jq filter to apply to the response to include certain fields. Consult the output schema in the tool description to see the fields that are available.\n\nFor example: to include only the `name` field in every object of a results array, you can provide ".results[].name".\n\nFor more information, see the [jq documentation](https://jqlang.org/manual/).', + }, }, }, }; export const handler = async (client: Hyperswitch, args: Record | undefined) => { const body = args as any; - return asTextContentResult(await client.gsm.delete(body)); + return asTextContentResult(await maybeFilter(args, await client.gsm.delete(body))); }; export default { metadata, tool, handler }; diff --git a/packages/mcp-server/src/tools/gsm/retrieve-gsm.ts b/packages/mcp-server/src/tools/gsm/retrieve-gsm.ts index 4dc10de..40fdfaa 100644 --- a/packages/mcp-server/src/tools/gsm/retrieve-gsm.ts +++ b/packages/mcp-server/src/tools/gsm/retrieve-gsm.ts @@ -1,5 +1,6 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. +import { maybeFilter } from 'hyperswitch-mcp/filtering'; import { asTextContentResult } from 'hyperswitch-mcp/tools/types'; import { Tool } from '@modelcontextprotocol/sdk/types.js'; @@ -17,7 +18,8 @@ export const metadata: Metadata = { export const tool: Tool = { name: 'retrieve_gsm', - description: 'Retrieves a Gsm Rule', + description: + "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\nRetrieves a Gsm Rule\n\n# Response Schema\n```json\n{\n $ref: '#/$defs/gsm_response',\n $defs: {\n gsm_response: {\n type: 'object',\n properties: {\n clear_pan_possible: {\n type: 'boolean',\n description: 'indicates if retry with pan is possible'\n },\n code: {\n type: 'string',\n description: 'code received from the connector'\n },\n connector: {\n type: 'string',\n description: 'The connector through which payment has gone through'\n },\n decision: {\n type: 'string',\n description: 'decision to be taken for auto retries flow'\n },\n flow: {\n type: 'string',\n description: 'The flow in which the code and message occurred for a connector'\n },\n message: {\n type: 'string',\n description: 'message received from the connector'\n },\n status: {\n type: 'string',\n description: 'status provided by the router'\n },\n step_up_possible: {\n type: 'boolean',\n description: 'indicates if step_up retry is possible'\n },\n sub_flow: {\n type: 'string',\n description: 'The sub_flow in which the code and message occurred for a connector'\n },\n error_category: {\n $ref: '#/$defs/error_category'\n },\n router_error: {\n type: 'string',\n description: 'optional error provided by the router'\n },\n unified_code: {\n type: 'string',\n description: 'error code unified across the connectors'\n },\n unified_message: {\n type: 'string',\n description: 'error message unified across the connectors'\n }\n },\n required: [ 'clear_pan_possible',\n 'code',\n 'connector',\n 'decision',\n 'flow',\n 'message',\n 'status',\n 'step_up_possible',\n 'sub_flow'\n ]\n },\n error_category: {\n type: 'string',\n enum: [ 'frm_decline',\n 'processor_downtime',\n 'processor_decline_unauthorized',\n 'issue_with_payment_method',\n 'processor_decline_incorrect_data'\n ]\n }\n }\n}\n```", inputSchema: { type: 'object', properties: { @@ -40,6 +42,12 @@ export const tool: Tool = { type: 'string', description: 'The sub_flow in which the code and message occurred for a connector', }, + jq_filter: { + type: 'string', + title: 'jq Filter', + description: + 'A jq filter to apply to the response to include certain fields. Consult the output schema in the tool description to see the fields that are available.\n\nFor example: to include only the `name` field in every object of a results array, you can provide ".results[].name".\n\nFor more information, see the [jq documentation](https://jqlang.org/manual/).', + }, }, $defs: { connector: { @@ -160,7 +168,7 @@ export const tool: Tool = { export const handler = async (client: Hyperswitch, args: Record | undefined) => { const body = args as any; - return asTextContentResult(await client.gsm.retrieve(body)); + return asTextContentResult(await maybeFilter(args, await client.gsm.retrieve(body))); }; export default { metadata, tool, handler }; diff --git a/packages/mcp-server/src/tools/gsm/update-gsm.ts b/packages/mcp-server/src/tools/gsm/update-gsm.ts index dc5a11a..836d165 100644 --- a/packages/mcp-server/src/tools/gsm/update-gsm.ts +++ b/packages/mcp-server/src/tools/gsm/update-gsm.ts @@ -1,5 +1,6 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. +import { maybeFilter } from 'hyperswitch-mcp/filtering'; import { asTextContentResult } from 'hyperswitch-mcp/tools/types'; import { Tool } from '@modelcontextprotocol/sdk/types.js'; @@ -17,7 +18,8 @@ export const metadata: Metadata = { export const tool: Tool = { name: 'update_gsm', - description: 'Updates a Gsm Rule', + description: + "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\nUpdates a Gsm Rule\n\n# Response Schema\n```json\n{\n $ref: '#/$defs/gsm_response',\n $defs: {\n gsm_response: {\n type: 'object',\n properties: {\n clear_pan_possible: {\n type: 'boolean',\n description: 'indicates if retry with pan is possible'\n },\n code: {\n type: 'string',\n description: 'code received from the connector'\n },\n connector: {\n type: 'string',\n description: 'The connector through which payment has gone through'\n },\n decision: {\n type: 'string',\n description: 'decision to be taken for auto retries flow'\n },\n flow: {\n type: 'string',\n description: 'The flow in which the code and message occurred for a connector'\n },\n message: {\n type: 'string',\n description: 'message received from the connector'\n },\n status: {\n type: 'string',\n description: 'status provided by the router'\n },\n step_up_possible: {\n type: 'boolean',\n description: 'indicates if step_up retry is possible'\n },\n sub_flow: {\n type: 'string',\n description: 'The sub_flow in which the code and message occurred for a connector'\n },\n error_category: {\n $ref: '#/$defs/error_category'\n },\n router_error: {\n type: 'string',\n description: 'optional error provided by the router'\n },\n unified_code: {\n type: 'string',\n description: 'error code unified across the connectors'\n },\n unified_message: {\n type: 'string',\n description: 'error message unified across the connectors'\n }\n },\n required: [ 'clear_pan_possible',\n 'code',\n 'connector',\n 'decision',\n 'flow',\n 'message',\n 'status',\n 'step_up_possible',\n 'sub_flow'\n ]\n },\n error_category: {\n type: 'string',\n enum: [ 'frm_decline',\n 'processor_downtime',\n 'processor_decline_unauthorized',\n 'issue_with_payment_method',\n 'processor_decline_incorrect_data'\n ]\n }\n }\n}\n```", inputSchema: { type: 'object', properties: { @@ -71,6 +73,12 @@ export const tool: Tool = { type: 'string', description: 'error message unified across the connectors', }, + jq_filter: { + type: 'string', + title: 'jq Filter', + description: + 'A jq filter to apply to the response to include certain fields. Consult the output schema in the tool description to see the fields that are available.\n\nFor example: to include only the `name` field in every object of a results array, you can provide ".results[].name".\n\nFor more information, see the [jq documentation](https://jqlang.org/manual/).', + }, }, $defs: { gsm_decision: { @@ -93,7 +101,7 @@ export const tool: Tool = { export const handler = async (client: Hyperswitch, args: Record | undefined) => { const body = args as any; - return asTextContentResult(await client.gsm.update(body)); + return asTextContentResult(await maybeFilter(args, await client.gsm.update(body))); }; export default { metadata, tool, handler }; diff --git a/packages/mcp-server/src/tools/mandates/retrieve-mandates.ts b/packages/mcp-server/src/tools/mandates/retrieve-mandates.ts index 1153442..d162b54 100644 --- a/packages/mcp-server/src/tools/mandates/retrieve-mandates.ts +++ b/packages/mcp-server/src/tools/mandates/retrieve-mandates.ts @@ -1,5 +1,6 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. +import { maybeFilter } from 'hyperswitch-mcp/filtering'; import { asTextContentResult } from 'hyperswitch-mcp/tools/types'; import { Tool } from '@modelcontextprotocol/sdk/types.js'; @@ -17,20 +18,27 @@ export const metadata: Metadata = { export const tool: Tool = { name: 'retrieve_mandates', - description: 'Retrieves a mandate created using the Payments/Create API', + description: + "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\nRetrieves a mandate created using the Payments/Create API\n\n# Response Schema\n```json\n{\n $ref: '#/$defs/mandate_response',\n $defs: {\n mandate_response: {\n type: 'object',\n properties: {\n mandate_id: {\n type: 'string',\n description: 'The identifier for mandate'\n },\n payment_method: {\n type: 'string',\n description: 'The payment method'\n },\n payment_method_id: {\n type: 'string',\n description: 'The identifier for payment method'\n },\n status: {\n $ref: '#/$defs/mandate_status'\n },\n card: {\n type: 'object',\n properties: {\n card_exp_month: {\n type: 'string',\n description: 'The expiry month of card'\n },\n card_exp_year: {\n type: 'string',\n description: 'The expiry year of card'\n },\n card_fingerprint: {\n type: 'string',\n description: 'A unique identifier alias to identify a particular card'\n },\n card_holder_name: {\n type: 'string',\n description: 'The card holder name'\n },\n card_isin: {\n type: 'string',\n description: 'The first 6 digits of card'\n },\n card_issuer: {\n type: 'string',\n description: 'The bank that issued the card'\n },\n card_network: {\n $ref: '#/$defs/card_network'\n },\n card_token: {\n type: 'string',\n description: 'The token from card locker'\n },\n card_type: {\n type: 'string',\n description: 'The type of the payment card'\n },\n issuer_country: {\n type: 'string',\n description: 'The country code in in which the card was issued'\n },\n last4_digits: {\n type: 'string',\n description: 'The last 4 digits of card'\n },\n nick_name: {\n type: 'string',\n description: 'The nick_name of the card holder'\n },\n scheme: {\n type: 'string',\n description: 'The card scheme network for the particular card'\n }\n },\n required: []\n },\n customer_acceptance: {\n $ref: '#/$defs/customer_acceptance'\n },\n payment_method_type: {\n type: 'string',\n description: 'The payment method type'\n }\n },\n required: [ 'mandate_id',\n 'payment_method',\n 'payment_method_id',\n 'status'\n ]\n },\n mandate_status: {\n type: 'string',\n description: 'The status of the mandate, which indicates whether it can be used to initiate a payment.',\n enum: [ 'active',\n 'inactive',\n 'pending',\n 'revoked'\n ]\n },\n card_network: {\n type: 'string',\n description: 'Indicates the card network.',\n enum: [ 'Visa',\n 'Mastercard',\n 'AmericanExpress',\n 'JCB',\n 'DinersClub',\n 'Discover',\n 'CartesBancaires',\n 'UnionPay',\n 'Interac',\n 'RuPay',\n 'Maestro',\n 'Star',\n 'Pulse',\n 'Accel',\n 'Nyce'\n ]\n },\n customer_acceptance: {\n type: 'object',\n description: 'This \"CustomerAcceptance\" object is passed during Payments-Confirm request, it enlists the type, time, and mode of acceptance properties related to an acceptance done by the customer. The customer_acceptance sub object is usually passed by the SDK or client.',\n properties: {\n acceptance_type: {\n type: 'string',\n description: 'This is used to indicate if the mandate was accepted online or offline',\n enum: [ 'online',\n 'offline'\n ]\n },\n accepted_at: {\n type: 'string',\n description: 'Specifying when the customer acceptance was provided',\n format: 'date-time'\n },\n online: {\n type: 'object',\n description: 'Details of online mandate',\n properties: {\n ip_address: {\n type: 'string',\n description: 'Ip address of the customer machine from which the mandate was created'\n },\n user_agent: {\n type: 'string',\n description: 'The user-agent of the customer\\'s browser'\n }\n },\n required: [ 'ip_address',\n 'user_agent'\n ]\n }\n },\n required: [ 'acceptance_type'\n ]\n }\n }\n}\n```", inputSchema: { type: 'object', properties: { mandate_id: { type: 'string', }, + jq_filter: { + type: 'string', + title: 'jq Filter', + description: + 'A jq filter to apply to the response to include certain fields. Consult the output schema in the tool description to see the fields that are available.\n\nFor example: to include only the `name` field in every object of a results array, you can provide ".results[].name".\n\nFor more information, see the [jq documentation](https://jqlang.org/manual/).', + }, }, }, }; export const handler = async (client: Hyperswitch, args: Record | undefined) => { const { mandate_id, ...body } = args as any; - return asTextContentResult(await client.mandates.retrieve(mandate_id)); + return asTextContentResult(await maybeFilter(args, await client.mandates.retrieve(mandate_id))); }; export default { metadata, tool, handler }; diff --git a/packages/mcp-server/src/tools/mandates/revoke-mandates.ts b/packages/mcp-server/src/tools/mandates/revoke-mandates.ts index d0f355c..7d772ce 100644 --- a/packages/mcp-server/src/tools/mandates/revoke-mandates.ts +++ b/packages/mcp-server/src/tools/mandates/revoke-mandates.ts @@ -1,5 +1,6 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. +import { maybeFilter } from 'hyperswitch-mcp/filtering'; import { asTextContentResult } from 'hyperswitch-mcp/tools/types'; import { Tool } from '@modelcontextprotocol/sdk/types.js'; @@ -17,20 +18,27 @@ export const metadata: Metadata = { export const tool: Tool = { name: 'revoke_mandates', - description: 'Revokes a mandate created using the Payments/Create API', + description: + "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\nRevokes a mandate created using the Payments/Create API\n\n# Response Schema\n```json\n{\n type: 'object',\n properties: {\n mandate_id: {\n type: 'string',\n description: 'The identifier for mandate'\n },\n status: {\n $ref: '#/$defs/mandate_status'\n },\n error_code: {\n type: 'string',\n description: 'If there was an error while calling the connectors the code is received here'\n },\n error_message: {\n type: 'string',\n description: 'If there was an error while calling the connector the error message is received here'\n }\n },\n required: [ 'mandate_id',\n 'status'\n ],\n $defs: {\n mandate_status: {\n type: 'string',\n description: 'The status of the mandate, which indicates whether it can be used to initiate a payment.',\n enum: [ 'active',\n 'inactive',\n 'pending',\n 'revoked'\n ]\n }\n }\n}\n```", inputSchema: { type: 'object', properties: { mandate_id: { type: 'string', }, + jq_filter: { + type: 'string', + title: 'jq Filter', + description: + 'A jq filter to apply to the response to include certain fields. Consult the output schema in the tool description to see the fields that are available.\n\nFor example: to include only the `name` field in every object of a results array, you can provide ".results[].name".\n\nFor more information, see the [jq documentation](https://jqlang.org/manual/).', + }, }, }, }; export const handler = async (client: Hyperswitch, args: Record | undefined) => { const { mandate_id, ...body } = args as any; - return asTextContentResult(await client.mandates.revoke(mandate_id)); + return asTextContentResult(await maybeFilter(args, await client.mandates.revoke(mandate_id))); }; export default { metadata, tool, handler }; diff --git a/packages/mcp-server/src/tools/organization/create-organization.ts b/packages/mcp-server/src/tools/organization/create-organization.ts index bb15b92..f30acac 100644 --- a/packages/mcp-server/src/tools/organization/create-organization.ts +++ b/packages/mcp-server/src/tools/organization/create-organization.ts @@ -1,5 +1,6 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. +import { maybeFilter } from 'hyperswitch-mcp/filtering'; import { asTextContentResult } from 'hyperswitch-mcp/tools/types'; import { Tool } from '@modelcontextprotocol/sdk/types.js'; @@ -17,7 +18,8 @@ export const metadata: Metadata = { export const tool: Tool = { name: 'create_organization', - description: 'Create a new organization', + description: + "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\nCreate a new organization\n\n# Response Schema\n```json\n{\n $ref: '#/$defs/organization_response',\n $defs: {\n organization_response: {\n type: 'object',\n properties: {\n created_at: {\n type: 'string',\n format: 'date-time'\n },\n modified_at: {\n type: 'string',\n format: 'date-time'\n },\n organization_id: {\n type: 'string',\n description: 'The unique identifier for the Organization'\n },\n metadata: {\n type: 'object',\n description: 'Metadata is useful for storing additional, unstructured information on an object.'\n },\n organization_details: {\n type: 'object',\n description: 'Details about the organization'\n },\n organization_name: {\n type: 'string',\n description: 'Name of the Organization'\n }\n },\n required: [ 'created_at',\n 'modified_at',\n 'organization_id'\n ]\n }\n }\n}\n```", inputSchema: { type: 'object', properties: { @@ -33,13 +35,19 @@ export const tool: Tool = { type: 'object', description: 'Details about the organization', }, + jq_filter: { + type: 'string', + title: 'jq Filter', + description: + 'A jq filter to apply to the response to include certain fields. Consult the output schema in the tool description to see the fields that are available.\n\nFor example: to include only the `name` field in every object of a results array, you can provide ".results[].name".\n\nFor more information, see the [jq documentation](https://jqlang.org/manual/).', + }, }, }, }; export const handler = async (client: Hyperswitch, args: Record | undefined) => { const body = args as any; - return asTextContentResult(await client.organization.create(body)); + return asTextContentResult(await maybeFilter(args, await client.organization.create(body))); }; export default { metadata, tool, handler }; diff --git a/packages/mcp-server/src/tools/organization/retrieve-organization.ts b/packages/mcp-server/src/tools/organization/retrieve-organization.ts index 45faea2..79b5d0a 100644 --- a/packages/mcp-server/src/tools/organization/retrieve-organization.ts +++ b/packages/mcp-server/src/tools/organization/retrieve-organization.ts @@ -1,5 +1,6 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. +import { maybeFilter } from 'hyperswitch-mcp/filtering'; import { asTextContentResult } from 'hyperswitch-mcp/tools/types'; import { Tool } from '@modelcontextprotocol/sdk/types.js'; @@ -17,20 +18,27 @@ export const metadata: Metadata = { export const tool: Tool = { name: 'retrieve_organization', - description: 'Retrieve an existing organization', + description: + "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\nRetrieve an existing organization\n\n# Response Schema\n```json\n{\n $ref: '#/$defs/organization_response',\n $defs: {\n organization_response: {\n type: 'object',\n properties: {\n created_at: {\n type: 'string',\n format: 'date-time'\n },\n modified_at: {\n type: 'string',\n format: 'date-time'\n },\n organization_id: {\n type: 'string',\n description: 'The unique identifier for the Organization'\n },\n metadata: {\n type: 'object',\n description: 'Metadata is useful for storing additional, unstructured information on an object.'\n },\n organization_details: {\n type: 'object',\n description: 'Details about the organization'\n },\n organization_name: {\n type: 'string',\n description: 'Name of the Organization'\n }\n },\n required: [ 'created_at',\n 'modified_at',\n 'organization_id'\n ]\n }\n }\n}\n```", inputSchema: { type: 'object', properties: { id: { type: 'string', }, + jq_filter: { + type: 'string', + title: 'jq Filter', + description: + 'A jq filter to apply to the response to include certain fields. Consult the output schema in the tool description to see the fields that are available.\n\nFor example: to include only the `name` field in every object of a results array, you can provide ".results[].name".\n\nFor more information, see the [jq documentation](https://jqlang.org/manual/).', + }, }, }, }; export const handler = async (client: Hyperswitch, args: Record | undefined) => { const { id, ...body } = args as any; - return asTextContentResult(await client.organization.retrieve(id)); + return asTextContentResult(await maybeFilter(args, await client.organization.retrieve(id))); }; export default { metadata, tool, handler }; diff --git a/packages/mcp-server/src/tools/organization/update-organization.ts b/packages/mcp-server/src/tools/organization/update-organization.ts index 28b985c..686053b 100644 --- a/packages/mcp-server/src/tools/organization/update-organization.ts +++ b/packages/mcp-server/src/tools/organization/update-organization.ts @@ -1,5 +1,6 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. +import { maybeFilter } from 'hyperswitch-mcp/filtering'; import { asTextContentResult } from 'hyperswitch-mcp/tools/types'; import { Tool } from '@modelcontextprotocol/sdk/types.js'; @@ -17,7 +18,8 @@ export const metadata: Metadata = { export const tool: Tool = { name: 'update_organization', - description: 'Create a new organization for .', + description: + "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\nCreate a new organization for .\n\n# Response Schema\n```json\n{\n $ref: '#/$defs/organization_response',\n $defs: {\n organization_response: {\n type: 'object',\n properties: {\n created_at: {\n type: 'string',\n format: 'date-time'\n },\n modified_at: {\n type: 'string',\n format: 'date-time'\n },\n organization_id: {\n type: 'string',\n description: 'The unique identifier for the Organization'\n },\n metadata: {\n type: 'object',\n description: 'Metadata is useful for storing additional, unstructured information on an object.'\n },\n organization_details: {\n type: 'object',\n description: 'Details about the organization'\n },\n organization_name: {\n type: 'string',\n description: 'Name of the Organization'\n }\n },\n required: [ 'created_at',\n 'modified_at',\n 'organization_id'\n ]\n }\n }\n}\n```", inputSchema: { type: 'object', properties: { @@ -40,13 +42,19 @@ export const tool: Tool = { type: 'string', description: 'Name of the organization', }, + jq_filter: { + type: 'string', + title: 'jq Filter', + description: + 'A jq filter to apply to the response to include certain fields. Consult the output schema in the tool description to see the fields that are available.\n\nFor example: to include only the `name` field in every object of a results array, you can provide ".results[].name".\n\nFor more information, see the [jq documentation](https://jqlang.org/manual/).', + }, }, }, }; export const handler = async (client: Hyperswitch, args: Record | undefined) => { const { id, ...body } = args as any; - return asTextContentResult(await client.organization.update(id, body)); + return asTextContentResult(await maybeFilter(args, await client.organization.update(id, body))); }; export default { metadata, tool, handler }; diff --git a/packages/mcp-server/src/tools/payment-link/retrieve-payment-link.ts b/packages/mcp-server/src/tools/payment-link/retrieve-payment-link.ts index e25fc3c..a753a1b 100644 --- a/packages/mcp-server/src/tools/payment-link/retrieve-payment-link.ts +++ b/packages/mcp-server/src/tools/payment-link/retrieve-payment-link.ts @@ -1,5 +1,6 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. +import { maybeFilter } from 'hyperswitch-mcp/filtering'; import { asTextContentResult } from 'hyperswitch-mcp/tools/types'; import { Tool } from '@modelcontextprotocol/sdk/types.js'; @@ -18,7 +19,7 @@ export const metadata: Metadata = { export const tool: Tool = { name: 'retrieve_payment_link', description: - 'To retrieve the properties of a Payment Link. This may be used to get the status of a previously initiated payment or next action for an ongoing payment', + "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\nTo retrieve the properties of a Payment Link. This may be used to get the status of a previously initiated payment or next action for an ongoing payment\n\n# Response Schema\n```json\n{\n type: 'object',\n properties: {\n amount: {\n type: 'integer',\n description: 'The payment amount. Amount for the payment in the lowest denomination of the currency'\n },\n created_at: {\n type: 'string',\n description: 'Date and time of Payment Link creation',\n format: 'date-time'\n },\n link_to_pay: {\n type: 'string',\n description: 'Open payment link (without any security checks and listing SPMs)'\n },\n merchant_id: {\n type: 'string',\n description: 'Identifier for Merchant'\n },\n payment_link_id: {\n type: 'string',\n description: 'Identifier for Payment Link'\n },\n status: {\n type: 'string',\n description: 'Status Of the Payment Link',\n enum: [ 'active',\n 'expired'\n ]\n },\n currency: {\n $ref: '#/$defs/currency'\n },\n description: {\n type: 'string',\n description: 'Description for Payment Link'\n },\n expiry: {\n type: 'string',\n description: 'Date and time of Expiration for Payment Link',\n format: 'date-time'\n },\n secure_link: {\n type: 'string',\n description: 'Secure payment link (with security checks and listing saved payment methods)'\n }\n },\n required: [ 'amount',\n 'created_at',\n 'link_to_pay',\n 'merchant_id',\n 'payment_link_id',\n 'status'\n ],\n $defs: {\n currency: {\n type: 'string',\n description: 'The three-letter ISO 4217 currency code (e.g., \"USD\", \"EUR\") for the payment amount. This field is mandatory for creating a payment.',\n enum: [ 'AED',\n 'AFN',\n 'ALL',\n 'AMD',\n 'ANG',\n 'AOA',\n 'ARS',\n 'AUD',\n 'AWG',\n 'AZN',\n 'BAM',\n 'BBD',\n 'BDT',\n 'BGN',\n 'BHD',\n 'BIF',\n 'BMD',\n 'BND',\n 'BOB',\n 'BRL',\n 'BSD',\n 'BTN',\n 'BWP',\n 'BYN',\n 'BZD',\n 'CAD',\n 'CDF',\n 'CHF',\n 'CLF',\n 'CLP',\n 'CNY',\n 'COP',\n 'CRC',\n 'CUC',\n 'CUP',\n 'CVE',\n 'CZK',\n 'DJF',\n 'DKK',\n 'DOP',\n 'DZD',\n 'EGP',\n 'ERN',\n 'ETB',\n 'EUR',\n 'FJD',\n 'FKP',\n 'GBP',\n 'GEL',\n 'GHS',\n 'GIP',\n 'GMD',\n 'GNF',\n 'GTQ',\n 'GYD',\n 'HKD',\n 'HNL',\n 'HRK',\n 'HTG',\n 'HUF',\n 'IDR',\n 'ILS',\n 'INR',\n 'IQD',\n 'IRR',\n 'ISK',\n 'JMD',\n 'JOD',\n 'JPY',\n 'KES',\n 'KGS',\n 'KHR',\n 'KMF',\n 'KPW',\n 'KRW',\n 'KWD',\n 'KYD',\n 'KZT',\n 'LAK',\n 'LBP',\n 'LKR',\n 'LRD',\n 'LSL',\n 'LYD',\n 'MAD',\n 'MDL',\n 'MGA',\n 'MKD',\n 'MMK',\n 'MNT',\n 'MOP',\n 'MRU',\n 'MUR',\n 'MVR',\n 'MWK',\n 'MXN',\n 'MYR',\n 'MZN',\n 'NAD',\n 'NGN',\n 'NIO',\n 'NOK',\n 'NPR',\n 'NZD',\n 'OMR',\n 'PAB',\n 'PEN',\n 'PGK',\n 'PHP',\n 'PKR',\n 'PLN',\n 'PYG',\n 'QAR',\n 'RON',\n 'RSD',\n 'RUB',\n 'RWF',\n 'SAR',\n 'SBD',\n 'SCR',\n 'SDG',\n 'SEK',\n 'SGD',\n 'SHP',\n 'SLE',\n 'SLL',\n 'SOS',\n 'SRD',\n 'SSP',\n 'STD',\n 'STN',\n 'SVC',\n 'SYP',\n 'SZL',\n 'THB',\n 'TJS',\n 'TMT',\n 'TND',\n 'TOP',\n 'TRY',\n 'TTD',\n 'TWD',\n 'TZS',\n 'UAH',\n 'UGX',\n 'USD',\n 'UYU',\n 'UZS',\n 'VES',\n 'VND',\n 'VUV',\n 'WST',\n 'XAF',\n 'XCD',\n 'XOF',\n 'XPF',\n 'YER',\n 'ZAR',\n 'ZMW',\n 'ZWL'\n ]\n }\n }\n}\n```", inputSchema: { type: 'object', properties: { @@ -30,13 +31,21 @@ export const tool: Tool = { description: 'This is a token which expires after 15 minutes, used from the client to authenticate and create sessions from the SDK', }, + jq_filter: { + type: 'string', + title: 'jq Filter', + description: + 'A jq filter to apply to the response to include certain fields. Consult the output schema in the tool description to see the fields that are available.\n\nFor example: to include only the `name` field in every object of a results array, you can provide ".results[].name".\n\nFor more information, see the [jq documentation](https://jqlang.org/manual/).', + }, }, }, }; export const handler = async (client: Hyperswitch, args: Record | undefined) => { const { payment_link_id, ...body } = args as any; - return asTextContentResult(await client.paymentLink.retrieve(payment_link_id, body)); + return asTextContentResult( + await maybeFilter(args, await client.paymentLink.retrieve(payment_link_id, body)), + ); }; export default { metadata, tool, handler }; diff --git a/packages/mcp-server/src/tools/payment-methods/create-payment-methods.ts b/packages/mcp-server/src/tools/payment-methods/create-payment-methods.ts index ea75a5d..003a90f 100644 --- a/packages/mcp-server/src/tools/payment-methods/create-payment-methods.ts +++ b/packages/mcp-server/src/tools/payment-methods/create-payment-methods.ts @@ -18,7 +18,7 @@ export const metadata: Metadata = { export const tool: Tool = { name: 'create_payment_methods', description: - 'Creates and stores a payment method against a customer.\nIn case of cards, this API should be used only by PCI compliant merchants.', + "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\nCreates and stores a payment method against a customer.\nIn case of cards, this API should be used only by PCI compliant merchants.", inputSchema: { type: 'object', properties: { diff --git a/packages/mcp-server/src/tools/payment-methods/delete-payment-methods.ts b/packages/mcp-server/src/tools/payment-methods/delete-payment-methods.ts index 5d44377..da0a613 100644 --- a/packages/mcp-server/src/tools/payment-methods/delete-payment-methods.ts +++ b/packages/mcp-server/src/tools/payment-methods/delete-payment-methods.ts @@ -1,5 +1,6 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. +import { maybeFilter } from 'hyperswitch-mcp/filtering'; import { asTextContentResult } from 'hyperswitch-mcp/tools/types'; import { Tool } from '@modelcontextprotocol/sdk/types.js'; @@ -17,20 +18,27 @@ export const metadata: Metadata = { export const tool: Tool = { name: 'delete_payment_methods', - description: 'Deletes a payment method of a customer.', + description: + "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\nDeletes a payment method of a customer.\n\n# Response Schema\n```json\n{\n type: 'object',\n properties: {\n deleted: {\n type: 'boolean',\n description: 'Whether payment method was deleted or not'\n },\n payment_method_id: {\n type: 'string',\n description: 'The unique identifier of the Payment method'\n }\n },\n required: [ 'deleted',\n 'payment_method_id'\n ]\n}\n```", inputSchema: { type: 'object', properties: { method_id: { type: 'string', }, + jq_filter: { + type: 'string', + title: 'jq Filter', + description: + 'A jq filter to apply to the response to include certain fields. Consult the output schema in the tool description to see the fields that are available.\n\nFor example: to include only the `name` field in every object of a results array, you can provide ".results[].name".\n\nFor more information, see the [jq documentation](https://jqlang.org/manual/).', + }, }, }, }; export const handler = async (client: Hyperswitch, args: Record | undefined) => { const { method_id, ...body } = args as any; - return asTextContentResult(await client.paymentMethods.delete(method_id)); + return asTextContentResult(await maybeFilter(args, await client.paymentMethods.delete(method_id))); }; export default { metadata, tool, handler }; diff --git a/packages/mcp-server/src/tools/payment-methods/retrieve-payment-methods.ts b/packages/mcp-server/src/tools/payment-methods/retrieve-payment-methods.ts index 433160f..2ec2f8d 100644 --- a/packages/mcp-server/src/tools/payment-methods/retrieve-payment-methods.ts +++ b/packages/mcp-server/src/tools/payment-methods/retrieve-payment-methods.ts @@ -17,7 +17,8 @@ export const metadata: Metadata = { export const tool: Tool = { name: 'retrieve_payment_methods', - description: 'Retrieves a payment method of a customer.', + description: + "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\nRetrieves a payment method of a customer.", inputSchema: { type: 'object', properties: { diff --git a/packages/mcp-server/src/tools/payment-methods/set-default-payment-methods.ts b/packages/mcp-server/src/tools/payment-methods/set-default-payment-methods.ts index 17187a0..39e816b 100644 --- a/packages/mcp-server/src/tools/payment-methods/set-default-payment-methods.ts +++ b/packages/mcp-server/src/tools/payment-methods/set-default-payment-methods.ts @@ -1,5 +1,6 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. +import { maybeFilter } from 'hyperswitch-mcp/filtering'; import { asTextContentResult } from 'hyperswitch-mcp/tools/types'; import { Tool } from '@modelcontextprotocol/sdk/types.js'; @@ -17,7 +18,8 @@ export const metadata: Metadata = { export const tool: Tool = { name: 'set_default_payment_methods', - description: 'Set the Payment Method as Default for the Customer.', + description: + "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\nSet the Payment Method as Default for the Customer.\n\n# Response Schema\n```json\n{\n type: 'object',\n properties: {\n customer_id: {\n type: 'string',\n description: 'The unique identifier of the customer.'\n },\n payment_method: {\n type: 'string',\n description: 'Indicates the type of payment method. Eg: \\'card\\', \\'wallet\\', etc.',\n enum: [ 'card',\n 'card_redirect',\n 'pay_later',\n 'wallet',\n 'bank_redirect',\n 'bank_transfer',\n 'crypto',\n 'bank_debit',\n 'reward',\n 'real_time_payment',\n 'upi',\n 'voucher',\n 'gift_card',\n 'open_banking',\n 'mobile_payment'\n ]\n },\n default_payment_method_id: {\n type: 'string',\n description: 'The unique identifier of the Payment method'\n },\n payment_method_type: {\n $ref: '#/$defs/payment_method_type'\n }\n },\n required: [ 'customer_id',\n 'payment_method'\n ],\n $defs: {\n payment_method_type: {\n type: 'string',\n description: 'Indicates the sub type of payment method. Eg: \\'google_pay\\' & \\'apple_pay\\' for wallets.',\n enum: [ 'ach',\n 'affirm',\n 'afterpay_clearpay',\n 'alfamart',\n 'ali_pay',\n 'ali_pay_hk',\n 'alma',\n 'amazon_pay',\n 'apple_pay',\n 'atome',\n 'bacs',\n 'bancontact_card',\n 'becs',\n 'benefit',\n 'bizum',\n 'blik',\n 'boleto',\n 'bca_bank_transfer',\n 'bni_va',\n 'bri_va',\n 'card_redirect',\n 'cimb_va',\n 'classic',\n 'credit',\n 'crypto_currency',\n 'cashapp',\n 'dana',\n 'danamon_va',\n 'debit',\n 'duit_now',\n 'efecty',\n 'eft',\n 'eps',\n 'fps',\n 'evoucher',\n 'giropay',\n 'givex',\n 'google_pay',\n 'go_pay',\n 'gcash',\n 'ideal',\n 'interac',\n 'indomaret',\n 'klarna',\n 'kakao_pay',\n 'local_bank_redirect',\n 'mandiri_va',\n 'knet',\n 'mb_way',\n 'mobile_pay',\n 'momo',\n 'momo_atm',\n 'multibanco',\n 'online_banking_thailand',\n 'online_banking_czech_republic',\n 'online_banking_finland',\n 'online_banking_fpx',\n 'online_banking_poland',\n 'online_banking_slovakia',\n 'oxxo',\n 'pago_efectivo',\n 'permata_bank_transfer',\n 'open_banking_uk',\n 'pay_bright',\n 'paypal',\n 'paze',\n 'pix',\n 'pay_safe_card',\n 'przelewy24',\n 'prompt_pay',\n 'pse',\n 'red_compra',\n 'red_pagos',\n 'samsung_pay',\n 'sepa',\n 'sepa_bank_transfer',\n 'sofort',\n 'swish',\n 'touch_n_go',\n 'trustly',\n 'twint',\n 'upi_collect',\n 'upi_intent',\n 'vipps',\n 'viet_qr',\n 'venmo',\n 'walley',\n 'we_chat_pay',\n 'seven_eleven',\n 'lawson',\n 'mini_stop',\n 'family_mart',\n 'seicomart',\n 'pay_easy',\n 'local_bank_transfer',\n 'mifinity',\n 'open_banking_pis',\n 'direct_carrier_billing',\n 'instant_bank_transfer',\n 'instant_bank_transfer_finland',\n 'instant_bank_transfer_poland',\n 'revolut_pay'\n ]\n }\n }\n}\n```", inputSchema: { type: 'object', properties: { @@ -27,13 +29,21 @@ export const tool: Tool = { payment_method_id: { type: 'string', }, + jq_filter: { + type: 'string', + title: 'jq Filter', + description: + 'A jq filter to apply to the response to include certain fields. Consult the output schema in the tool description to see the fields that are available.\n\nFor example: to include only the `name` field in every object of a results array, you can provide ".results[].name".\n\nFor more information, see the [jq documentation](https://jqlang.org/manual/).', + }, }, }, }; export const handler = async (client: Hyperswitch, args: Record | undefined) => { const { payment_method_id, ...body } = args as any; - return asTextContentResult(await client.paymentMethods.setDefault(payment_method_id, body)); + return asTextContentResult( + await maybeFilter(args, await client.paymentMethods.setDefault(payment_method_id, body)), + ); }; export default { metadata, tool, handler }; diff --git a/packages/mcp-server/src/tools/payment-methods/update-payment-methods.ts b/packages/mcp-server/src/tools/payment-methods/update-payment-methods.ts index e9ab347..44cd0ec 100644 --- a/packages/mcp-server/src/tools/payment-methods/update-payment-methods.ts +++ b/packages/mcp-server/src/tools/payment-methods/update-payment-methods.ts @@ -18,7 +18,7 @@ export const metadata: Metadata = { export const tool: Tool = { name: 'update_payment_methods', description: - 'Update an existing payment method of a customer.\nThis API is useful for use cases such as updating the card number for expired cards to prevent discontinuity in recurring payments.', + "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\nUpdate an existing payment method of a customer.\nThis API is useful for use cases such as updating the card number for expired cards to prevent discontinuity in recurring payments.", inputSchema: { type: 'object', properties: { diff --git a/packages/mcp-server/src/tools/payments/cancel-payments.ts b/packages/mcp-server/src/tools/payments/cancel-payments.ts index 82a57d0..a2e92be 100644 --- a/packages/mcp-server/src/tools/payments/cancel-payments.ts +++ b/packages/mcp-server/src/tools/payments/cancel-payments.ts @@ -18,7 +18,7 @@ export const metadata: Metadata = { export const tool: Tool = { name: 'cancel_payments', description: - 'A Payment could can be cancelled when it is in one of these statuses: `requires_payment_method`, `requires_capture`, `requires_confirmation`, `requires_customer_action`.', + "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\nA Payment could can be cancelled when it is in one of these statuses: `requires_payment_method`, `requires_capture`, `requires_confirmation`, `requires_customer_action`.\n\n# Response Schema\n```json\n{\n type: 'object',\n properties: {}\n}\n```", inputSchema: { type: 'object', properties: { @@ -32,6 +32,12 @@ export const tool: Tool = { merchant_connector_details: { $ref: '#/$defs/merchant_connector_details_wrap', }, + jq_filter: { + type: 'string', + title: 'jq Filter', + description: + 'A jq filter to apply to the response to include certain fields. Consult the output schema in the tool description to see the fields that are available.\n\nFor example: to include only the `name` field in every object of a results array, you can provide ".results[].name".\n\nFor more information, see the [jq documentation](https://jqlang.org/manual/).', + }, }, $defs: { merchant_connector_details_wrap: { diff --git a/packages/mcp-server/src/tools/payments/capture-payments.ts b/packages/mcp-server/src/tools/payments/capture-payments.ts index 15b509e..7c75f65 100644 --- a/packages/mcp-server/src/tools/payments/capture-payments.ts +++ b/packages/mcp-server/src/tools/payments/capture-payments.ts @@ -18,7 +18,7 @@ export const metadata: Metadata = { export const tool: Tool = { name: 'capture_payments', description: - "Captures the funds for a previously authorized payment intent where `capture_method` was set to `manual` and the payment is in a `requires_capture` state.\n\nUpon successful capture, the payment status usually transitions to `succeeded`.\nThe `amount_to_capture` can be specified in the request body; it must be less than or equal to the payment's `amount_capturable`. If omitted, the full capturable amount is captured.\n\nA payment must be in a capturable state (e.g., `requires_capture`). Attempting to capture an already `succeeded` (and fully captured) payment or one in an invalid state will lead to an error.\n", + "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\nCaptures the funds for a previously authorized payment intent where `capture_method` was set to `manual` and the payment is in a `requires_capture` state.\n\nUpon successful capture, the payment status usually transitions to `succeeded`.\nThe `amount_to_capture` can be specified in the request body; it must be less than or equal to the payment's `amount_capturable`. If omitted, the full capturable amount is captured.\n\nA payment must be in a capturable state (e.g., `requires_capture`). Attempting to capture an already `succeeded` (and fully captured) payment or one in an invalid state will lead to an error.\n", inputSchema: { type: 'object', properties: { diff --git a/packages/mcp-server/src/tools/payments/complete-authorize-payments.ts b/packages/mcp-server/src/tools/payments/complete-authorize-payments.ts index 296cc0c..7aef82e 100644 --- a/packages/mcp-server/src/tools/payments/complete-authorize-payments.ts +++ b/packages/mcp-server/src/tools/payments/complete-authorize-payments.ts @@ -17,7 +17,8 @@ export const metadata: Metadata = { export const tool: Tool = { name: 'complete_authorize_payments', - description: 'Payments - Complete Authorize', + description: + "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\nPayments - Complete Authorize", inputSchema: { type: 'object', properties: { diff --git a/packages/mcp-server/src/tools/payments/confirm-payments.ts b/packages/mcp-server/src/tools/payments/confirm-payments.ts index 0a38280..5f7252f 100644 --- a/packages/mcp-server/src/tools/payments/confirm-payments.ts +++ b/packages/mcp-server/src/tools/payments/confirm-payments.ts @@ -18,7 +18,7 @@ export const metadata: Metadata = { export const tool: Tool = { name: 'confirm_payments', description: - 'Confirms a payment intent that was previously created with `confirm: false`. This action attempts to authorize the payment with the payment processor.\n\nExpected status transitions after confirmation:\n- `succeeded`: If authorization is successful and `capture_method` is `automatic`.\n- `requires_capture`: If authorization is successful and `capture_method` is `manual`.\n- `failed`: If authorization fails.', + "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\nConfirms a payment intent that was previously created with `confirm: false`. This action attempts to authorize the payment with the payment processor.\n\nExpected status transitions after confirmation:\n- `succeeded`: If authorization is successful and `capture_method` is `automatic`.\n- `requires_capture`: If authorization is successful and `capture_method` is `manual`.\n- `failed`: If authorization fails.", inputSchema: { type: 'object', properties: { diff --git a/packages/mcp-server/src/tools/payments/create-payments.ts b/packages/mcp-server/src/tools/payments/create-payments.ts index debdadf..38a0c2f 100644 --- a/packages/mcp-server/src/tools/payments/create-payments.ts +++ b/packages/mcp-server/src/tools/payments/create-payments.ts @@ -18,7 +18,7 @@ export const metadata: Metadata = { export const tool: Tool = { name: 'create_payments', description: - "Creates a payment resource, which represents a customer's intent to pay.\nThis endpoint is the starting point for various payment flows:\n", + "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\nCreates a payment resource, which represents a customer's intent to pay.\nThis endpoint is the starting point for various payment flows:\n", inputSchema: { type: 'object', properties: { diff --git a/packages/mcp-server/src/tools/payments/create-session-token-payments.ts b/packages/mcp-server/src/tools/payments/create-session-token-payments.ts index aeeed37..9f315b1 100644 --- a/packages/mcp-server/src/tools/payments/create-session-token-payments.ts +++ b/packages/mcp-server/src/tools/payments/create-session-token-payments.ts @@ -18,7 +18,7 @@ export const metadata: Metadata = { export const tool: Tool = { name: 'create_session_token_payments', description: - "Creates a session object or a session token for wallets like Apple Pay, Google Pay, etc. These tokens are used by Hyperswitch's SDK to initiate these wallets' SDK.", + "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\nCreates a session object or a session token for wallets like Apple Pay, Google Pay, etc. These tokens are used by Hyperswitch's SDK to initiate these wallets' SDK.", inputSchema: { type: 'object', properties: { diff --git a/packages/mcp-server/src/tools/payments/incremental-authorization-payments.ts b/packages/mcp-server/src/tools/payments/incremental-authorization-payments.ts index 1e5980f..19ce37d 100644 --- a/packages/mcp-server/src/tools/payments/incremental-authorization-payments.ts +++ b/packages/mcp-server/src/tools/payments/incremental-authorization-payments.ts @@ -17,7 +17,8 @@ export const metadata: Metadata = { export const tool: Tool = { name: 'incremental_authorization_payments', - description: 'Authorized amount for a payment can be incremented if it is in status: requires_capture', + description: + "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\nAuthorized amount for a payment can be incremented if it is in status: requires_capture", inputSchema: { type: 'object', properties: { diff --git a/packages/mcp-server/src/tools/payments/list-payments.ts b/packages/mcp-server/src/tools/payments/list-payments.ts index 20f929f..5875ad9 100644 --- a/packages/mcp-server/src/tools/payments/list-payments.ts +++ b/packages/mcp-server/src/tools/payments/list-payments.ts @@ -17,7 +17,8 @@ export const metadata: Metadata = { export const tool: Tool = { name: 'list_payments', - description: 'To list the *payments*', + description: + "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\nTo list the *payments*", inputSchema: { type: 'object', properties: { diff --git a/packages/mcp-server/src/tools/payments/number-3ds/authenticate-payments-number-3ds.ts b/packages/mcp-server/src/tools/payments/number-3ds/authenticate-payments-number-3ds.ts index f87ba65..b8ff255 100644 --- a/packages/mcp-server/src/tools/payments/number-3ds/authenticate-payments-number-3ds.ts +++ b/packages/mcp-server/src/tools/payments/number-3ds/authenticate-payments-number-3ds.ts @@ -1,5 +1,6 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. +import { maybeFilter } from 'hyperswitch-mcp/filtering'; import { asTextContentResult } from 'hyperswitch-mcp/tools/types'; import { Tool } from '@modelcontextprotocol/sdk/types.js'; @@ -17,7 +18,8 @@ export const metadata: Metadata = { export const tool: Tool = { name: 'authenticate_payments_number_3ds', - description: 'External 3DS Authentication is performed and returns the AuthenticationResponse', + description: + "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\nExternal 3DS Authentication is performed and returns the AuthenticationResponse\n\n# Response Schema\n```json\n{\n type: 'object',\n properties: {\n three_ds_requestor_url: {\n type: 'string',\n description: 'Three DS Requestor URL'\n },\n trans_status: {\n type: 'string',\n description: 'Indicates the transaction status',\n enum: [ 'Y',\n 'N',\n 'U',\n 'A',\n 'R',\n 'C',\n 'D',\n 'I'\n ]\n },\n acs_reference_number: {\n type: 'string',\n description: 'Unique identifier assigned by the EMVCo(Europay, Mastercard and Visa)'\n },\n acs_signed_content: {\n type: 'string',\n description: 'Contains the JWS object created by the ACS for the ARes(Authentication Response) message'\n },\n acs_trans_id: {\n type: 'string',\n description: 'Unique identifier assigned by the ACS to identify a single transaction'\n },\n acs_url: {\n type: 'string',\n description: 'Access Server URL to be used for challenge submission'\n },\n challenge_request: {\n type: 'string',\n description: 'Challenge request which should be sent to acs_url'\n },\n three_ds_requestor_app_url: {\n type: 'string',\n description: 'Merchant app declaring their URL within the CReq message so that the Authentication app can call the Merchant app after OOB authentication has occurred'\n },\n three_dsserver_trans_id: {\n type: 'string',\n description: 'Unique identifier assigned by the 3DS Server to identify a single transaction'\n }\n },\n required: [ 'three_ds_requestor_url',\n 'trans_status'\n ]\n}\n```", inputSchema: { type: 'object', properties: { @@ -80,6 +82,12 @@ export const tool: Tool = { 'sdk_trans_id', ], }, + jq_filter: { + type: 'string', + title: 'jq Filter', + description: + 'A jq filter to apply to the response to include certain fields. Consult the output schema in the tool description to see the fields that are available.\n\nFor example: to include only the `name` field in every object of a results array, you can provide ".results[].name".\n\nFor more information, see the [jq documentation](https://jqlang.org/manual/).', + }, }, $defs: { three_ds_completion_indicator: { @@ -93,7 +101,9 @@ export const tool: Tool = { export const handler = async (client: Hyperswitch, args: Record | undefined) => { const { payment_id, ...body } = args as any; - return asTextContentResult(await client.payments.number3DS.authenticate(payment_id, body)); + return asTextContentResult( + await maybeFilter(args, await client.payments.number3DS.authenticate(payment_id, body)), + ); }; export default { metadata, tool, handler }; diff --git a/packages/mcp-server/src/tools/payments/post-session-tokens-payments.ts b/packages/mcp-server/src/tools/payments/post-session-tokens-payments.ts index b8bbf16..60e54c6 100644 --- a/packages/mcp-server/src/tools/payments/post-session-tokens-payments.ts +++ b/packages/mcp-server/src/tools/payments/post-session-tokens-payments.ts @@ -17,7 +17,8 @@ export const metadata: Metadata = { export const tool: Tool = { name: 'post_session_tokens_payments', - description: 'Payments - Post Session Tokens', + description: + "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\nPayments - Post Session Tokens", inputSchema: { type: 'object', properties: { diff --git a/packages/mcp-server/src/tools/payments/retrieve-payments.ts b/packages/mcp-server/src/tools/payments/retrieve-payments.ts index 147f7b6..70d012b 100644 --- a/packages/mcp-server/src/tools/payments/retrieve-payments.ts +++ b/packages/mcp-server/src/tools/payments/retrieve-payments.ts @@ -18,7 +18,7 @@ export const metadata: Metadata = { export const tool: Tool = { name: 'retrieve_payments', description: - 'Retrieves a Payment. This API can also be used to get the status of a previously initiated payment or next action for an ongoing payment', + "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\nRetrieves a Payment. This API can also be used to get the status of a previously initiated payment or next action for an ongoing payment", inputSchema: { type: 'object', properties: { diff --git a/packages/mcp-server/src/tools/payments/update-metadata-payments.ts b/packages/mcp-server/src/tools/payments/update-metadata-payments.ts index e56c7a1..ff82bf5 100644 --- a/packages/mcp-server/src/tools/payments/update-metadata-payments.ts +++ b/packages/mcp-server/src/tools/payments/update-metadata-payments.ts @@ -1,5 +1,6 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. +import { maybeFilter } from 'hyperswitch-mcp/filtering'; import { asTextContentResult } from 'hyperswitch-mcp/tools/types'; import { Tool } from '@modelcontextprotocol/sdk/types.js'; @@ -17,7 +18,8 @@ export const metadata: Metadata = { export const tool: Tool = { name: 'update_metadata_payments', - description: 'Payments - Update Metadata', + description: + "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\nPayments - Update Metadata\n\n# Response Schema\n```json\n{\n type: 'object',\n properties: {\n payment_id: {\n type: 'string',\n description: 'The identifier for the payment'\n },\n metadata: {\n type: 'object',\n description: 'Metadata is useful for storing additional, unstructured information on an object.'\n }\n },\n required: [ 'payment_id'\n ]\n}\n```", inputSchema: { type: 'object', properties: { @@ -28,13 +30,19 @@ export const tool: Tool = { type: 'object', description: 'Metadata is useful for storing additional, unstructured information on an object.', }, + jq_filter: { + type: 'string', + title: 'jq Filter', + description: + 'A jq filter to apply to the response to include certain fields. Consult the output schema in the tool description to see the fields that are available.\n\nFor example: to include only the `name` field in every object of a results array, you can provide ".results[].name".\n\nFor more information, see the [jq documentation](https://jqlang.org/manual/).', + }, }, }, }; export const handler = async (client: Hyperswitch, args: Record | undefined) => { const { payment_id, ...body } = args as any; - return asTextContentResult(await client.payments.updateMetadata(payment_id, body)); + return asTextContentResult(await maybeFilter(args, await client.payments.updateMetadata(payment_id, body))); }; export default { metadata, tool, handler }; diff --git a/packages/mcp-server/src/tools/payments/update-payments.ts b/packages/mcp-server/src/tools/payments/update-payments.ts index 69e9e30..80ae109 100644 --- a/packages/mcp-server/src/tools/payments/update-payments.ts +++ b/packages/mcp-server/src/tools/payments/update-payments.ts @@ -18,7 +18,7 @@ export const metadata: Metadata = { export const tool: Tool = { name: 'update_payments', description: - 'To update the properties of a *PaymentIntent* object. This may include attaching a payment method, or attaching customer object or metadata fields after the Payment is created', + "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\nTo update the properties of a *PaymentIntent* object. This may include attaching a payment method, or attaching customer object or metadata fields after the Payment is created", inputSchema: { type: 'object', properties: { diff --git a/packages/mcp-server/src/tools/payouts/cancel-payouts.ts b/packages/mcp-server/src/tools/payouts/cancel-payouts.ts index 69dde37..9d7246e 100644 --- a/packages/mcp-server/src/tools/payouts/cancel-payouts.ts +++ b/packages/mcp-server/src/tools/payouts/cancel-payouts.ts @@ -17,7 +17,8 @@ export const metadata: Metadata = { export const tool: Tool = { name: 'cancel_payouts', - description: 'Payouts - Cancel', + description: + "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\nPayouts - Cancel", inputSchema: { type: 'object', properties: { diff --git a/packages/mcp-server/src/tools/payouts/confirm-payouts.ts b/packages/mcp-server/src/tools/payouts/confirm-payouts.ts index 3bd9f46..a7147d1 100644 --- a/packages/mcp-server/src/tools/payouts/confirm-payouts.ts +++ b/packages/mcp-server/src/tools/payouts/confirm-payouts.ts @@ -17,7 +17,8 @@ export const metadata: Metadata = { export const tool: Tool = { name: 'confirm_payouts', - description: 'Payouts - Confirm', + description: + "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\nPayouts - Confirm", inputSchema: { type: 'object', properties: { diff --git a/packages/mcp-server/src/tools/payouts/create-payouts.ts b/packages/mcp-server/src/tools/payouts/create-payouts.ts index c33f7ec..e067ec1 100644 --- a/packages/mcp-server/src/tools/payouts/create-payouts.ts +++ b/packages/mcp-server/src/tools/payouts/create-payouts.ts @@ -17,7 +17,8 @@ export const metadata: Metadata = { export const tool: Tool = { name: 'create_payouts', - description: 'Payouts - Create', + description: + "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\nPayouts - Create", inputSchema: { type: 'object', properties: { diff --git a/packages/mcp-server/src/tools/payouts/fulfill-payouts.ts b/packages/mcp-server/src/tools/payouts/fulfill-payouts.ts index 7e61468..6b80c29 100644 --- a/packages/mcp-server/src/tools/payouts/fulfill-payouts.ts +++ b/packages/mcp-server/src/tools/payouts/fulfill-payouts.ts @@ -17,7 +17,8 @@ export const metadata: Metadata = { export const tool: Tool = { name: 'fulfill_payouts', - description: 'Payouts - Fulfill', + description: + "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\nPayouts - Fulfill", inputSchema: { type: 'object', properties: { diff --git a/packages/mcp-server/src/tools/payouts/list-filters-payouts.ts b/packages/mcp-server/src/tools/payouts/list-filters-payouts.ts index aee9789..086a7e4 100644 --- a/packages/mcp-server/src/tools/payouts/list-filters-payouts.ts +++ b/packages/mcp-server/src/tools/payouts/list-filters-payouts.ts @@ -1,5 +1,6 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. +import { maybeFilter } from 'hyperswitch-mcp/filtering'; import { asTextContentResult } from 'hyperswitch-mcp/tools/types'; import { Tool } from '@modelcontextprotocol/sdk/types.js'; @@ -17,7 +18,8 @@ export const metadata: Metadata = { export const tool: Tool = { name: 'list_filters_payouts', - description: 'Payouts - List available filters', + description: + "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\nPayouts - List available filters\n\n# Response Schema\n```json\n{\n type: 'object',\n properties: {\n connector: {\n type: 'array',\n description: 'The list of available connector filters',\n items: {\n $ref: '#/$defs/payout_connectors'\n }\n },\n currency: {\n type: 'array',\n description: 'The list of available currency filters',\n items: {\n $ref: '#/$defs/currency'\n }\n },\n payout_method: {\n type: 'array',\n description: 'The list of available payout method filters',\n items: {\n $ref: '#/$defs/payout_type'\n }\n },\n status: {\n type: 'array',\n description: 'The list of available payout status filters',\n items: {\n $ref: '#/$defs/status'\n }\n }\n },\n required: [ 'connector',\n 'currency',\n 'payout_method',\n 'status'\n ],\n $defs: {\n payout_connectors: {\n type: 'string',\n enum: [ 'adyen',\n 'adyenplatform',\n 'cybersource',\n 'ebanx',\n 'nomupay',\n 'payone',\n 'paypal',\n 'stripe',\n 'wise'\n ]\n },\n currency: {\n type: 'string',\n description: 'The three-letter ISO 4217 currency code (e.g., \"USD\", \"EUR\") for the payment amount. This field is mandatory for creating a payment.',\n enum: [ 'AED',\n 'AFN',\n 'ALL',\n 'AMD',\n 'ANG',\n 'AOA',\n 'ARS',\n 'AUD',\n 'AWG',\n 'AZN',\n 'BAM',\n 'BBD',\n 'BDT',\n 'BGN',\n 'BHD',\n 'BIF',\n 'BMD',\n 'BND',\n 'BOB',\n 'BRL',\n 'BSD',\n 'BTN',\n 'BWP',\n 'BYN',\n 'BZD',\n 'CAD',\n 'CDF',\n 'CHF',\n 'CLF',\n 'CLP',\n 'CNY',\n 'COP',\n 'CRC',\n 'CUC',\n 'CUP',\n 'CVE',\n 'CZK',\n 'DJF',\n 'DKK',\n 'DOP',\n 'DZD',\n 'EGP',\n 'ERN',\n 'ETB',\n 'EUR',\n 'FJD',\n 'FKP',\n 'GBP',\n 'GEL',\n 'GHS',\n 'GIP',\n 'GMD',\n 'GNF',\n 'GTQ',\n 'GYD',\n 'HKD',\n 'HNL',\n 'HRK',\n 'HTG',\n 'HUF',\n 'IDR',\n 'ILS',\n 'INR',\n 'IQD',\n 'IRR',\n 'ISK',\n 'JMD',\n 'JOD',\n 'JPY',\n 'KES',\n 'KGS',\n 'KHR',\n 'KMF',\n 'KPW',\n 'KRW',\n 'KWD',\n 'KYD',\n 'KZT',\n 'LAK',\n 'LBP',\n 'LKR',\n 'LRD',\n 'LSL',\n 'LYD',\n 'MAD',\n 'MDL',\n 'MGA',\n 'MKD',\n 'MMK',\n 'MNT',\n 'MOP',\n 'MRU',\n 'MUR',\n 'MVR',\n 'MWK',\n 'MXN',\n 'MYR',\n 'MZN',\n 'NAD',\n 'NGN',\n 'NIO',\n 'NOK',\n 'NPR',\n 'NZD',\n 'OMR',\n 'PAB',\n 'PEN',\n 'PGK',\n 'PHP',\n 'PKR',\n 'PLN',\n 'PYG',\n 'QAR',\n 'RON',\n 'RSD',\n 'RUB',\n 'RWF',\n 'SAR',\n 'SBD',\n 'SCR',\n 'SDG',\n 'SEK',\n 'SGD',\n 'SHP',\n 'SLE',\n 'SLL',\n 'SOS',\n 'SRD',\n 'SSP',\n 'STD',\n 'STN',\n 'SVC',\n 'SYP',\n 'SZL',\n 'THB',\n 'TJS',\n 'TMT',\n 'TND',\n 'TOP',\n 'TRY',\n 'TTD',\n 'TWD',\n 'TZS',\n 'UAH',\n 'UGX',\n 'USD',\n 'UYU',\n 'UZS',\n 'VES',\n 'VND',\n 'VUV',\n 'WST',\n 'XAF',\n 'XCD',\n 'XOF',\n 'XPF',\n 'YER',\n 'ZAR',\n 'ZMW',\n 'ZWL'\n ]\n },\n payout_type: {\n type: 'string',\n description: 'The payout_type of the payout request is a mandatory field for confirming the payouts. It should be specified in the Create request. If not provided, it must be updated in the Payout Update request before it can be confirmed.',\n enum: [ 'card',\n 'bank',\n 'wallet'\n ]\n },\n status: {\n type: 'string',\n enum: [ 'success',\n 'failed',\n 'cancelled',\n 'initiated',\n 'expired',\n 'reversed',\n 'pending',\n 'ineligible',\n 'requires_creation',\n 'requires_confirmation',\n 'requires_payout_method_data',\n 'requires_fulfillment',\n 'requires_vendor_account_creation'\n ]\n }\n }\n}\n```", inputSchema: { type: 'object', properties: { @@ -33,13 +35,19 @@ export const tool: Tool = { 'The end time to filter payments list or to get list of filters. If not passed the default time is now', format: 'date-time', }, + jq_filter: { + type: 'string', + title: 'jq Filter', + description: + 'A jq filter to apply to the response to include certain fields. Consult the output schema in the tool description to see the fields that are available.\n\nFor example: to include only the `name` field in every object of a results array, you can provide ".results[].name".\n\nFor more information, see the [jq documentation](https://jqlang.org/manual/).', + }, }, }, }; export const handler = async (client: Hyperswitch, args: Record | undefined) => { const body = args as any; - return asTextContentResult(await client.payouts.listFilters(body)); + return asTextContentResult(await maybeFilter(args, await client.payouts.listFilters(body))); }; export default { metadata, tool, handler }; diff --git a/packages/mcp-server/src/tools/payouts/list/retrieve-payouts-list.ts b/packages/mcp-server/src/tools/payouts/list/retrieve-payouts-list.ts index 35f184c..f2de6c5 100644 --- a/packages/mcp-server/src/tools/payouts/list/retrieve-payouts-list.ts +++ b/packages/mcp-server/src/tools/payouts/list/retrieve-payouts-list.ts @@ -17,7 +17,8 @@ export const metadata: Metadata = { export const tool: Tool = { name: 'retrieve_payouts_list', - description: 'Payouts - List', + description: + "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\nPayouts - List", inputSchema: { type: 'object', properties: { diff --git a/packages/mcp-server/src/tools/payouts/list/with-filters-payouts-list.ts b/packages/mcp-server/src/tools/payouts/list/with-filters-payouts-list.ts index c3df71d..c3c6237 100644 --- a/packages/mcp-server/src/tools/payouts/list/with-filters-payouts-list.ts +++ b/packages/mcp-server/src/tools/payouts/list/with-filters-payouts-list.ts @@ -17,7 +17,8 @@ export const metadata: Metadata = { export const tool: Tool = { name: 'with_filters_payouts_list', - description: 'Payouts - List using filters', + description: + "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\nPayouts - List using filters", inputSchema: { type: 'object', properties: { diff --git a/packages/mcp-server/src/tools/payouts/retrieve-payouts.ts b/packages/mcp-server/src/tools/payouts/retrieve-payouts.ts index dab483a..3c3747d 100644 --- a/packages/mcp-server/src/tools/payouts/retrieve-payouts.ts +++ b/packages/mcp-server/src/tools/payouts/retrieve-payouts.ts @@ -17,7 +17,8 @@ export const metadata: Metadata = { export const tool: Tool = { name: 'retrieve_payouts', - description: 'Payouts - Retrieve', + description: + "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\nPayouts - Retrieve", inputSchema: { type: 'object', properties: { diff --git a/packages/mcp-server/src/tools/payouts/update-payouts.ts b/packages/mcp-server/src/tools/payouts/update-payouts.ts index 736c7f9..e56720b 100644 --- a/packages/mcp-server/src/tools/payouts/update-payouts.ts +++ b/packages/mcp-server/src/tools/payouts/update-payouts.ts @@ -17,7 +17,8 @@ export const metadata: Metadata = { export const tool: Tool = { name: 'update_payouts', - description: 'Payouts - Update', + description: + "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\nPayouts - Update", inputSchema: { type: 'object', properties: { diff --git a/packages/mcp-server/src/tools/poll/retrieve-status-poll.ts b/packages/mcp-server/src/tools/poll/retrieve-status-poll.ts index 655c1a5..e779185 100644 --- a/packages/mcp-server/src/tools/poll/retrieve-status-poll.ts +++ b/packages/mcp-server/src/tools/poll/retrieve-status-poll.ts @@ -1,5 +1,6 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. +import { maybeFilter } from 'hyperswitch-mcp/filtering'; import { asTextContentResult } from 'hyperswitch-mcp/tools/types'; import { Tool } from '@modelcontextprotocol/sdk/types.js'; @@ -17,20 +18,27 @@ export const metadata: Metadata = { export const tool: Tool = { name: 'retrieve_status_poll', - description: 'Poll - Retrieve Poll Status', + description: + "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\nPoll - Retrieve Poll Status\n\n# Response Schema\n```json\n{\n type: 'object',\n properties: {\n poll_id: {\n type: 'string',\n description: 'The poll id'\n },\n status: {\n type: 'string',\n enum: [ 'pending',\n 'completed',\n 'not_found'\n ]\n }\n },\n required: [ 'poll_id',\n 'status'\n ]\n}\n```", inputSchema: { type: 'object', properties: { poll_id: { type: 'string', }, + jq_filter: { + type: 'string', + title: 'jq Filter', + description: + 'A jq filter to apply to the response to include certain fields. Consult the output schema in the tool description to see the fields that are available.\n\nFor example: to include only the `name` field in every object of a results array, you can provide ".results[].name".\n\nFor more information, see the [jq documentation](https://jqlang.org/manual/).', + }, }, }, }; export const handler = async (client: Hyperswitch, args: Record | undefined) => { const { poll_id, ...body } = args as any; - return asTextContentResult(await client.poll.retrieveStatus(poll_id)); + return asTextContentResult(await maybeFilter(args, await client.poll.retrieveStatus(poll_id))); }; export default { metadata, tool, handler }; diff --git a/packages/mcp-server/src/tools/profile-acquirers/create-profile-acquirers.ts b/packages/mcp-server/src/tools/profile-acquirers/create-profile-acquirers.ts index 01cbf01..d18c979 100644 --- a/packages/mcp-server/src/tools/profile-acquirers/create-profile-acquirers.ts +++ b/packages/mcp-server/src/tools/profile-acquirers/create-profile-acquirers.ts @@ -1,5 +1,6 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. +import { maybeFilter } from 'hyperswitch-mcp/filtering'; import { asTextContentResult } from 'hyperswitch-mcp/tools/types'; import { Tool } from '@modelcontextprotocol/sdk/types.js'; @@ -17,7 +18,8 @@ export const metadata: Metadata = { export const tool: Tool = { name: 'create_profile_acquirers', - description: 'Create a new Profile Acquirer for accessing our APIs from your servers.', + description: + "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\nCreate a new Profile Acquirer for accessing our APIs from your servers.\n\n# Response Schema\n```json\n{\n $ref: '#/$defs/profile_acquirer',\n $defs: {\n profile_acquirer: {\n type: 'object',\n properties: {\n acquirer_assigned_merchant_id: {\n type: 'string',\n description: 'The merchant id assigned by the acquirer'\n },\n acquirer_bin: {\n type: 'string',\n description: 'Acquirer bin'\n },\n acquirer_fraud_rate: {\n type: 'number',\n description: 'Fraud rate for the particular acquirer configuration'\n },\n merchant_country_code: {\n type: 'string',\n description: 'Merchant country code assigned by acquirer'\n },\n merchant_name: {\n type: 'string',\n description: 'Merchant name'\n },\n network: {\n type: 'string',\n description: 'Network provider'\n },\n profile_acquirer_id: {\n type: 'string',\n description: 'The unique identifier of the profile acquirer'\n },\n profile_id: {\n type: 'string',\n description: 'Parent profile id to link the acquirer account with'\n },\n acquirer_ica: {\n type: 'string',\n description: 'Acquirer ica provided by acquirer'\n }\n },\n required: [ 'acquirer_assigned_merchant_id',\n 'acquirer_bin',\n 'acquirer_fraud_rate',\n 'merchant_country_code',\n 'merchant_name',\n 'network',\n 'profile_acquirer_id',\n 'profile_id'\n ]\n }\n }\n}\n```", inputSchema: { type: 'object', properties: { @@ -53,13 +55,19 @@ export const tool: Tool = { type: 'string', description: 'Acquirer ica provided by acquirer', }, + jq_filter: { + type: 'string', + title: 'jq Filter', + description: + 'A jq filter to apply to the response to include certain fields. Consult the output schema in the tool description to see the fields that are available.\n\nFor example: to include only the `name` field in every object of a results array, you can provide ".results[].name".\n\nFor more information, see the [jq documentation](https://jqlang.org/manual/).', + }, }, }, }; export const handler = async (client: Hyperswitch, args: Record | undefined) => { const body = args as any; - return asTextContentResult(await client.profileAcquirers.create(body)); + return asTextContentResult(await maybeFilter(args, await client.profileAcquirers.create(body))); }; export default { metadata, tool, handler }; diff --git a/packages/mcp-server/src/tools/profile-acquirers/update-profile-acquirers.ts b/packages/mcp-server/src/tools/profile-acquirers/update-profile-acquirers.ts index 0905239..b6e1521 100644 --- a/packages/mcp-server/src/tools/profile-acquirers/update-profile-acquirers.ts +++ b/packages/mcp-server/src/tools/profile-acquirers/update-profile-acquirers.ts @@ -1,5 +1,6 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. +import { maybeFilter } from 'hyperswitch-mcp/filtering'; import { asTextContentResult } from 'hyperswitch-mcp/tools/types'; import { Tool } from '@modelcontextprotocol/sdk/types.js'; @@ -17,7 +18,8 @@ export const metadata: Metadata = { export const tool: Tool = { name: 'update_profile_acquirers', - description: 'Update a Profile Acquirer for accessing our APIs from your servers.', + description: + "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\nUpdate a Profile Acquirer for accessing our APIs from your servers.\n\n# Response Schema\n```json\n{\n $ref: '#/$defs/profile_acquirer',\n $defs: {\n profile_acquirer: {\n type: 'object',\n properties: {\n acquirer_assigned_merchant_id: {\n type: 'string',\n description: 'The merchant id assigned by the acquirer'\n },\n acquirer_bin: {\n type: 'string',\n description: 'Acquirer bin'\n },\n acquirer_fraud_rate: {\n type: 'number',\n description: 'Fraud rate for the particular acquirer configuration'\n },\n merchant_country_code: {\n type: 'string',\n description: 'Merchant country code assigned by acquirer'\n },\n merchant_name: {\n type: 'string',\n description: 'Merchant name'\n },\n network: {\n type: 'string',\n description: 'Network provider'\n },\n profile_acquirer_id: {\n type: 'string',\n description: 'The unique identifier of the profile acquirer'\n },\n profile_id: {\n type: 'string',\n description: 'Parent profile id to link the acquirer account with'\n },\n acquirer_ica: {\n type: 'string',\n description: 'Acquirer ica provided by acquirer'\n }\n },\n required: [ 'acquirer_assigned_merchant_id',\n 'acquirer_bin',\n 'acquirer_fraud_rate',\n 'merchant_country_code',\n 'merchant_name',\n 'network',\n 'profile_acquirer_id',\n 'profile_id'\n ]\n }\n }\n}\n```", inputSchema: { type: 'object', properties: { @@ -48,13 +50,21 @@ export const tool: Tool = { network: { type: 'string', }, + jq_filter: { + type: 'string', + title: 'jq Filter', + description: + 'A jq filter to apply to the response to include certain fields. Consult the output schema in the tool description to see the fields that are available.\n\nFor example: to include only the `name` field in every object of a results array, you can provide ".results[].name".\n\nFor more information, see the [jq documentation](https://jqlang.org/manual/).', + }, }, }, }; export const handler = async (client: Hyperswitch, args: Record | undefined) => { const { profile_acquirer_id, ...body } = args as any; - return asTextContentResult(await client.profileAcquirers.update(profile_acquirer_id, body)); + return asTextContentResult( + await maybeFilter(args, await client.profileAcquirers.update(profile_acquirer_id, body)), + ); }; export default { metadata, tool, handler }; diff --git a/packages/mcp-server/src/tools/refunds/create-refunds.ts b/packages/mcp-server/src/tools/refunds/create-refunds.ts index 6552fa5..030e969 100644 --- a/packages/mcp-server/src/tools/refunds/create-refunds.ts +++ b/packages/mcp-server/src/tools/refunds/create-refunds.ts @@ -18,7 +18,7 @@ export const metadata: Metadata = { export const tool: Tool = { name: 'create_refunds', description: - 'Creates a refund against an already processed payment. In case of some processors, you can even opt to refund only a partial amount multiple times until the original charge amount has been refunded', + "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\nCreates a refund against an already processed payment. In case of some processors, you can even opt to refund only a partial amount multiple times until the original charge amount has been refunded", inputSchema: { type: 'object', properties: { diff --git a/packages/mcp-server/src/tools/refunds/list-refunds.ts b/packages/mcp-server/src/tools/refunds/list-refunds.ts index 0b41fa3..eae2ddd 100644 --- a/packages/mcp-server/src/tools/refunds/list-refunds.ts +++ b/packages/mcp-server/src/tools/refunds/list-refunds.ts @@ -18,7 +18,7 @@ export const metadata: Metadata = { export const tool: Tool = { name: 'list_refunds', description: - 'Lists all the refunds associated with the merchant, or for a specific payment if payment_id is provided', + "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\nLists all the refunds associated with the merchant, or for a specific payment if payment_id is provided", inputSchema: { type: 'object', properties: { diff --git a/packages/mcp-server/src/tools/refunds/retrieve-refunds.ts b/packages/mcp-server/src/tools/refunds/retrieve-refunds.ts index e5992b5..862766b 100644 --- a/packages/mcp-server/src/tools/refunds/retrieve-refunds.ts +++ b/packages/mcp-server/src/tools/refunds/retrieve-refunds.ts @@ -1,5 +1,6 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. +import { maybeFilter } from 'hyperswitch-mcp/filtering'; import { asTextContentResult } from 'hyperswitch-mcp/tools/types'; import { Tool } from '@modelcontextprotocol/sdk/types.js'; @@ -17,20 +18,27 @@ export const metadata: Metadata = { export const tool: Tool = { name: 'retrieve_refunds', - description: 'Retrieves a Refund. This may be used to get the status of a previously initiated refund', + description: + "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\nRetrieves a Refund. This may be used to get the status of a previously initiated refund\n\n# Response Schema\n```json\n{\n $ref: '#/$defs/refund_response',\n $defs: {\n refund_response: {\n type: 'object',\n properties: {\n amount: {\n type: 'integer',\n description: 'The refund amount, which should be less than or equal to the total payment amount. Amount for the payment in lowest denomination of the currency. (i.e) in cents for USD denomination, in paisa for INR denomination etc'\n },\n connector: {\n type: 'string',\n description: 'The connector used for the refund and the corresponding payment'\n },\n currency: {\n type: 'string',\n description: 'The three-letter ISO currency code'\n },\n payment_id: {\n type: 'string',\n description: 'The payment id against which refund is initiated'\n },\n refund_id: {\n type: 'string',\n description: 'Unique Identifier for the refund'\n },\n status: {\n $ref: '#/$defs/refund_status'\n },\n created_at: {\n type: 'string',\n description: 'The timestamp at which refund is created',\n format: 'date-time'\n },\n error_code: {\n type: 'string',\n description: 'The code for the error'\n },\n error_message: {\n type: 'string',\n description: 'The error message'\n },\n issuer_error_code: {\n type: 'string',\n description: 'Error code received from the issuer in case of failed refunds'\n },\n issuer_error_message: {\n type: 'string',\n description: 'Error message received from the issuer in case of failed refunds'\n },\n merchant_connector_id: {\n type: 'string',\n description: 'The merchant_connector_id of the processor through which this payment went through'\n },\n metadata: {\n type: 'object',\n description: 'You can specify up to 50 keys, with key names up to 40 characters long and values up to 500 characters long. Metadata is useful for storing additional, structured information on an object'\n },\n profile_id: {\n type: 'string',\n description: 'The id of business profile for this refund'\n },\n reason: {\n type: 'string',\n description: 'An arbitrary string attached to the object. Often useful for displaying to users and your customer support executive'\n },\n split_refunds: {\n $ref: '#/$defs/split_refund'\n },\n unified_code: {\n type: 'string',\n description: 'Error code unified across the connectors is received here if there was an error while calling connector'\n },\n unified_message: {\n type: 'string',\n description: 'Error message unified across the connectors is received here if there was an error while calling connector'\n },\n updated_at: {\n type: 'string',\n description: 'The timestamp at which refund is updated',\n format: 'date-time'\n }\n },\n required: [ 'amount',\n 'connector',\n 'currency',\n 'payment_id',\n 'refund_id',\n 'status'\n ]\n },\n refund_status: {\n type: 'string',\n description: 'The status for refunds',\n enum: [ 'succeeded',\n 'failed',\n 'pending',\n 'review'\n ]\n },\n split_refund: {\n anyOf: [ {\n type: 'object',\n properties: {\n stripe_split_refund: {\n type: 'object',\n description: 'Charge specific fields for controlling the revert of funds from either platform or connected account for Stripe. Check sub-fields for more details.',\n properties: {\n revert_platform_fee: {\n type: 'boolean',\n description: 'Toggle for reverting the application fee that was collected for the payment.\\nIf set to false, the funds are pulled from the destination account.'\n },\n revert_transfer: {\n type: 'boolean',\n description: 'Toggle for reverting the transfer that was made during the charge.\\nIf set to false, the funds are pulled from the main platform\\'s account.'\n }\n },\n required: []\n }\n },\n required: [ 'stripe_split_refund'\n ]\n },\n {\n type: 'object',\n properties: {\n adyen_split_refund: {\n $ref: '#/$defs/adyen_split_data'\n }\n },\n required: [ 'adyen_split_refund'\n ]\n },\n {\n type: 'object',\n properties: {\n xendit_split_refund: {\n $ref: '#/$defs/xendit_split_sub_merchant_data'\n }\n },\n required: [ 'xendit_split_refund'\n ]\n }\n ],\n description: 'Charge specific fields for controlling the revert of funds from either platform or connected account. Check sub-fields for more details.'\n },\n adyen_split_data: {\n type: 'object',\n description: 'Fee information for Split Payments to be charged on the payment being collected for Adyen',\n properties: {\n split_items: {\n type: 'array',\n description: 'Data for the split items',\n items: {\n type: 'object',\n description: 'Data for the split items',\n properties: {\n amount: {\n type: 'integer',\n description: 'The amount of the split item'\n },\n reference: {\n type: 'string',\n description: 'Unique Identifier for the split item'\n },\n split_type: {\n type: 'string',\n enum: [ 'BalanceAccount',\n 'AcquiringFees',\n 'PaymentFee',\n 'AdyenFees',\n 'AdyenCommission',\n 'AdyenMarkup',\n 'Interchange',\n 'SchemeFee',\n 'Commission',\n 'TopUp',\n 'Vat'\n ]\n },\n account: {\n type: 'string',\n description: 'The unique identifier of the account to which the split amount is allocated.'\n },\n description: {\n type: 'string',\n description: 'Description for the part of the payment that will be allocated to the specified account.'\n }\n },\n required: [ 'amount',\n 'reference',\n 'split_type'\n ]\n }\n },\n store: {\n type: 'string',\n description: 'The store identifier'\n }\n },\n required: [ 'split_items'\n ]\n },\n xendit_split_sub_merchant_data: {\n type: 'object',\n description: 'Fee information to be charged on the payment being collected for sub-merchant via xendit',\n properties: {\n for_user_id: {\n type: 'string',\n description: 'The sub-account user-id that you want to make this transaction for.'\n }\n },\n required: [ 'for_user_id'\n ]\n }\n }\n}\n```", inputSchema: { type: 'object', properties: { refund_id: { type: 'string', }, + jq_filter: { + type: 'string', + title: 'jq Filter', + description: + 'A jq filter to apply to the response to include certain fields. Consult the output schema in the tool description to see the fields that are available.\n\nFor example: to include only the `name` field in every object of a results array, you can provide ".results[].name".\n\nFor more information, see the [jq documentation](https://jqlang.org/manual/).', + }, }, }, }; export const handler = async (client: Hyperswitch, args: Record | undefined) => { const { refund_id, ...body } = args as any; - return asTextContentResult(await client.refunds.retrieve(refund_id)); + return asTextContentResult(await maybeFilter(args, await client.refunds.retrieve(refund_id))); }; export default { metadata, tool, handler }; diff --git a/packages/mcp-server/src/tools/refunds/update-refunds.ts b/packages/mcp-server/src/tools/refunds/update-refunds.ts index 0dad0c6..ae12d80 100644 --- a/packages/mcp-server/src/tools/refunds/update-refunds.ts +++ b/packages/mcp-server/src/tools/refunds/update-refunds.ts @@ -1,5 +1,6 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. +import { maybeFilter } from 'hyperswitch-mcp/filtering'; import { asTextContentResult } from 'hyperswitch-mcp/tools/types'; import { Tool } from '@modelcontextprotocol/sdk/types.js'; @@ -18,7 +19,7 @@ export const metadata: Metadata = { export const tool: Tool = { name: 'update_refunds', description: - 'Updates the properties of a Refund object. This API can be used to attach a reason for the refund or metadata fields', + "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\nUpdates the properties of a Refund object. This API can be used to attach a reason for the refund or metadata fields\n\n# Response Schema\n```json\n{\n $ref: '#/$defs/refund_response',\n $defs: {\n refund_response: {\n type: 'object',\n properties: {\n amount: {\n type: 'integer',\n description: 'The refund amount, which should be less than or equal to the total payment amount. Amount for the payment in lowest denomination of the currency. (i.e) in cents for USD denomination, in paisa for INR denomination etc'\n },\n connector: {\n type: 'string',\n description: 'The connector used for the refund and the corresponding payment'\n },\n currency: {\n type: 'string',\n description: 'The three-letter ISO currency code'\n },\n payment_id: {\n type: 'string',\n description: 'The payment id against which refund is initiated'\n },\n refund_id: {\n type: 'string',\n description: 'Unique Identifier for the refund'\n },\n status: {\n $ref: '#/$defs/refund_status'\n },\n created_at: {\n type: 'string',\n description: 'The timestamp at which refund is created',\n format: 'date-time'\n },\n error_code: {\n type: 'string',\n description: 'The code for the error'\n },\n error_message: {\n type: 'string',\n description: 'The error message'\n },\n issuer_error_code: {\n type: 'string',\n description: 'Error code received from the issuer in case of failed refunds'\n },\n issuer_error_message: {\n type: 'string',\n description: 'Error message received from the issuer in case of failed refunds'\n },\n merchant_connector_id: {\n type: 'string',\n description: 'The merchant_connector_id of the processor through which this payment went through'\n },\n metadata: {\n type: 'object',\n description: 'You can specify up to 50 keys, with key names up to 40 characters long and values up to 500 characters long. Metadata is useful for storing additional, structured information on an object'\n },\n profile_id: {\n type: 'string',\n description: 'The id of business profile for this refund'\n },\n reason: {\n type: 'string',\n description: 'An arbitrary string attached to the object. Often useful for displaying to users and your customer support executive'\n },\n split_refunds: {\n $ref: '#/$defs/split_refund'\n },\n unified_code: {\n type: 'string',\n description: 'Error code unified across the connectors is received here if there was an error while calling connector'\n },\n unified_message: {\n type: 'string',\n description: 'Error message unified across the connectors is received here if there was an error while calling connector'\n },\n updated_at: {\n type: 'string',\n description: 'The timestamp at which refund is updated',\n format: 'date-time'\n }\n },\n required: [ 'amount',\n 'connector',\n 'currency',\n 'payment_id',\n 'refund_id',\n 'status'\n ]\n },\n refund_status: {\n type: 'string',\n description: 'The status for refunds',\n enum: [ 'succeeded',\n 'failed',\n 'pending',\n 'review'\n ]\n },\n split_refund: {\n anyOf: [ {\n type: 'object',\n properties: {\n stripe_split_refund: {\n type: 'object',\n description: 'Charge specific fields for controlling the revert of funds from either platform or connected account for Stripe. Check sub-fields for more details.',\n properties: {\n revert_platform_fee: {\n type: 'boolean',\n description: 'Toggle for reverting the application fee that was collected for the payment.\\nIf set to false, the funds are pulled from the destination account.'\n },\n revert_transfer: {\n type: 'boolean',\n description: 'Toggle for reverting the transfer that was made during the charge.\\nIf set to false, the funds are pulled from the main platform\\'s account.'\n }\n },\n required: []\n }\n },\n required: [ 'stripe_split_refund'\n ]\n },\n {\n type: 'object',\n properties: {\n adyen_split_refund: {\n $ref: '#/$defs/adyen_split_data'\n }\n },\n required: [ 'adyen_split_refund'\n ]\n },\n {\n type: 'object',\n properties: {\n xendit_split_refund: {\n $ref: '#/$defs/xendit_split_sub_merchant_data'\n }\n },\n required: [ 'xendit_split_refund'\n ]\n }\n ],\n description: 'Charge specific fields for controlling the revert of funds from either platform or connected account. Check sub-fields for more details.'\n },\n adyen_split_data: {\n type: 'object',\n description: 'Fee information for Split Payments to be charged on the payment being collected for Adyen',\n properties: {\n split_items: {\n type: 'array',\n description: 'Data for the split items',\n items: {\n type: 'object',\n description: 'Data for the split items',\n properties: {\n amount: {\n type: 'integer',\n description: 'The amount of the split item'\n },\n reference: {\n type: 'string',\n description: 'Unique Identifier for the split item'\n },\n split_type: {\n type: 'string',\n enum: [ 'BalanceAccount',\n 'AcquiringFees',\n 'PaymentFee',\n 'AdyenFees',\n 'AdyenCommission',\n 'AdyenMarkup',\n 'Interchange',\n 'SchemeFee',\n 'Commission',\n 'TopUp',\n 'Vat'\n ]\n },\n account: {\n type: 'string',\n description: 'The unique identifier of the account to which the split amount is allocated.'\n },\n description: {\n type: 'string',\n description: 'Description for the part of the payment that will be allocated to the specified account.'\n }\n },\n required: [ 'amount',\n 'reference',\n 'split_type'\n ]\n }\n },\n store: {\n type: 'string',\n description: 'The store identifier'\n }\n },\n required: [ 'split_items'\n ]\n },\n xendit_split_sub_merchant_data: {\n type: 'object',\n description: 'Fee information to be charged on the payment being collected for sub-merchant via xendit',\n properties: {\n for_user_id: {\n type: 'string',\n description: 'The sub-account user-id that you want to make this transaction for.'\n }\n },\n required: [ 'for_user_id'\n ]\n }\n }\n}\n```", inputSchema: { type: 'object', properties: { @@ -35,13 +36,19 @@ export const tool: Tool = { description: 'An arbitrary string attached to the object. Often useful for displaying to users and your customer support executive', }, + jq_filter: { + type: 'string', + title: 'jq Filter', + description: + 'A jq filter to apply to the response to include certain fields. Consult the output schema in the tool description to see the fields that are available.\n\nFor example: to include only the `name` field in every object of a results array, you can provide ".results[].name".\n\nFor more information, see the [jq documentation](https://jqlang.org/manual/).', + }, }, }, }; export const handler = async (client: Hyperswitch, args: Record | undefined) => { const { refund_id, ...body } = args as any; - return asTextContentResult(await client.refunds.update(refund_id, body)); + return asTextContentResult(await maybeFilter(args, await client.refunds.update(refund_id, body))); }; export default { metadata, tool, handler }; diff --git a/packages/mcp-server/src/tools/relay/create-relay.ts b/packages/mcp-server/src/tools/relay/create-relay.ts index 4ac47ed..71bc1ed 100644 --- a/packages/mcp-server/src/tools/relay/create-relay.ts +++ b/packages/mcp-server/src/tools/relay/create-relay.ts @@ -1,5 +1,6 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. +import { maybeFilter } from 'hyperswitch-mcp/filtering'; import { asTextContentResult } from 'hyperswitch-mcp/tools/types'; import { Tool } from '@modelcontextprotocol/sdk/types.js'; @@ -17,7 +18,8 @@ export const metadata: Metadata = { export const tool: Tool = { name: 'create_relay', - description: 'Creates a relay request.', + description: + "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\nCreates a relay request.\n\n# Response Schema\n```json\n{\n $ref: '#/$defs/relay_response',\n $defs: {\n relay_response: {\n type: 'object',\n properties: {\n id: {\n type: 'string',\n description: 'The unique identifier for the Relay'\n },\n connector_id: {\n type: 'string',\n description: 'Identifier of the connector ( merchant connector account ) which was chosen to make the payment'\n },\n connector_resource_id: {\n type: 'string',\n description: 'The identifier that is associated to a resource at the connector reference to which the relay request is being made'\n },\n profile_id: {\n type: 'string',\n description: 'The business profile that is associated with this relay request.'\n },\n status: {\n type: 'string',\n enum: [ 'created',\n 'pending',\n 'success',\n 'failure'\n ]\n },\n type: {\n $ref: '#/$defs/relay_type'\n },\n connector_reference_id: {\n type: 'string',\n description: 'The identifier that is associated to a resource at the connector to which the relay request is being made'\n },\n data: {\n $ref: '#/$defs/relay_data'\n },\n error: {\n type: 'object',\n properties: {\n code: {\n type: 'string',\n description: 'The error code'\n },\n message: {\n type: 'string',\n description: 'The error message'\n }\n },\n required: [ 'code',\n 'message'\n ]\n }\n },\n required: [ 'id',\n 'connector_id',\n 'connector_resource_id',\n 'profile_id',\n 'status',\n 'type'\n ]\n },\n relay_type: {\n type: 'string',\n enum: [ 'refund'\n ]\n },\n relay_data: {\n type: 'object',\n properties: {\n refund: {\n type: 'object',\n properties: {\n amount: {\n type: 'integer',\n description: 'The amount that is being refunded'\n },\n currency: {\n $ref: '#/$defs/currency'\n },\n reason: {\n type: 'string',\n description: 'The reason for the refund'\n }\n },\n required: [ 'amount',\n 'currency'\n ]\n }\n },\n required: [ 'refund'\n ]\n },\n currency: {\n type: 'string',\n description: 'The three-letter ISO 4217 currency code (e.g., \"USD\", \"EUR\") for the payment amount. This field is mandatory for creating a payment.',\n enum: [ 'AED',\n 'AFN',\n 'ALL',\n 'AMD',\n 'ANG',\n 'AOA',\n 'ARS',\n 'AUD',\n 'AWG',\n 'AZN',\n 'BAM',\n 'BBD',\n 'BDT',\n 'BGN',\n 'BHD',\n 'BIF',\n 'BMD',\n 'BND',\n 'BOB',\n 'BRL',\n 'BSD',\n 'BTN',\n 'BWP',\n 'BYN',\n 'BZD',\n 'CAD',\n 'CDF',\n 'CHF',\n 'CLF',\n 'CLP',\n 'CNY',\n 'COP',\n 'CRC',\n 'CUC',\n 'CUP',\n 'CVE',\n 'CZK',\n 'DJF',\n 'DKK',\n 'DOP',\n 'DZD',\n 'EGP',\n 'ERN',\n 'ETB',\n 'EUR',\n 'FJD',\n 'FKP',\n 'GBP',\n 'GEL',\n 'GHS',\n 'GIP',\n 'GMD',\n 'GNF',\n 'GTQ',\n 'GYD',\n 'HKD',\n 'HNL',\n 'HRK',\n 'HTG',\n 'HUF',\n 'IDR',\n 'ILS',\n 'INR',\n 'IQD',\n 'IRR',\n 'ISK',\n 'JMD',\n 'JOD',\n 'JPY',\n 'KES',\n 'KGS',\n 'KHR',\n 'KMF',\n 'KPW',\n 'KRW',\n 'KWD',\n 'KYD',\n 'KZT',\n 'LAK',\n 'LBP',\n 'LKR',\n 'LRD',\n 'LSL',\n 'LYD',\n 'MAD',\n 'MDL',\n 'MGA',\n 'MKD',\n 'MMK',\n 'MNT',\n 'MOP',\n 'MRU',\n 'MUR',\n 'MVR',\n 'MWK',\n 'MXN',\n 'MYR',\n 'MZN',\n 'NAD',\n 'NGN',\n 'NIO',\n 'NOK',\n 'NPR',\n 'NZD',\n 'OMR',\n 'PAB',\n 'PEN',\n 'PGK',\n 'PHP',\n 'PKR',\n 'PLN',\n 'PYG',\n 'QAR',\n 'RON',\n 'RSD',\n 'RUB',\n 'RWF',\n 'SAR',\n 'SBD',\n 'SCR',\n 'SDG',\n 'SEK',\n 'SGD',\n 'SHP',\n 'SLE',\n 'SLL',\n 'SOS',\n 'SRD',\n 'SSP',\n 'STD',\n 'STN',\n 'SVC',\n 'SYP',\n 'SZL',\n 'THB',\n 'TJS',\n 'TMT',\n 'TND',\n 'TOP',\n 'TRY',\n 'TTD',\n 'TWD',\n 'TZS',\n 'UAH',\n 'UGX',\n 'USD',\n 'UYU',\n 'UZS',\n 'VES',\n 'VND',\n 'VUV',\n 'WST',\n 'XAF',\n 'XCD',\n 'XOF',\n 'XPF',\n 'YER',\n 'ZAR',\n 'ZMW',\n 'ZWL'\n ]\n }\n }\n}\n```", inputSchema: { type: 'object', properties: { @@ -43,6 +45,12 @@ export const tool: Tool = { data: { $ref: '#/$defs/relay_data', }, + jq_filter: { + type: 'string', + title: 'jq Filter', + description: + 'A jq filter to apply to the response to include certain fields. Consult the output schema in the tool description to see the fields that are available.\n\nFor example: to include only the `name` field in every object of a results array, you can provide ".results[].name".\n\nFor more information, see the [jq documentation](https://jqlang.org/manual/).', + }, }, $defs: { relay_type: { @@ -245,7 +253,7 @@ export const tool: Tool = { export const handler = async (client: Hyperswitch, args: Record | undefined) => { const body = args as any; - return asTextContentResult(await client.relay.create(body)); + return asTextContentResult(await maybeFilter(args, await client.relay.create(body))); }; export default { metadata, tool, handler }; diff --git a/packages/mcp-server/src/tools/relay/retrieve-relay.ts b/packages/mcp-server/src/tools/relay/retrieve-relay.ts index 3a4fca4..bffcea2 100644 --- a/packages/mcp-server/src/tools/relay/retrieve-relay.ts +++ b/packages/mcp-server/src/tools/relay/retrieve-relay.ts @@ -1,5 +1,6 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. +import { maybeFilter } from 'hyperswitch-mcp/filtering'; import { asTextContentResult } from 'hyperswitch-mcp/tools/types'; import { Tool } from '@modelcontextprotocol/sdk/types.js'; @@ -17,7 +18,8 @@ export const metadata: Metadata = { export const tool: Tool = { name: 'retrieve_relay', - description: 'Retrieves a relay details.', + description: + "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\nRetrieves a relay details.\n\n# Response Schema\n```json\n{\n $ref: '#/$defs/relay_response',\n $defs: {\n relay_response: {\n type: 'object',\n properties: {\n id: {\n type: 'string',\n description: 'The unique identifier for the Relay'\n },\n connector_id: {\n type: 'string',\n description: 'Identifier of the connector ( merchant connector account ) which was chosen to make the payment'\n },\n connector_resource_id: {\n type: 'string',\n description: 'The identifier that is associated to a resource at the connector reference to which the relay request is being made'\n },\n profile_id: {\n type: 'string',\n description: 'The business profile that is associated with this relay request.'\n },\n status: {\n type: 'string',\n enum: [ 'created',\n 'pending',\n 'success',\n 'failure'\n ]\n },\n type: {\n $ref: '#/$defs/relay_type'\n },\n connector_reference_id: {\n type: 'string',\n description: 'The identifier that is associated to a resource at the connector to which the relay request is being made'\n },\n data: {\n $ref: '#/$defs/relay_data'\n },\n error: {\n type: 'object',\n properties: {\n code: {\n type: 'string',\n description: 'The error code'\n },\n message: {\n type: 'string',\n description: 'The error message'\n }\n },\n required: [ 'code',\n 'message'\n ]\n }\n },\n required: [ 'id',\n 'connector_id',\n 'connector_resource_id',\n 'profile_id',\n 'status',\n 'type'\n ]\n },\n relay_type: {\n type: 'string',\n enum: [ 'refund'\n ]\n },\n relay_data: {\n type: 'object',\n properties: {\n refund: {\n type: 'object',\n properties: {\n amount: {\n type: 'integer',\n description: 'The amount that is being refunded'\n },\n currency: {\n $ref: '#/$defs/currency'\n },\n reason: {\n type: 'string',\n description: 'The reason for the refund'\n }\n },\n required: [ 'amount',\n 'currency'\n ]\n }\n },\n required: [ 'refund'\n ]\n },\n currency: {\n type: 'string',\n description: 'The three-letter ISO 4217 currency code (e.g., \"USD\", \"EUR\") for the payment amount. This field is mandatory for creating a payment.',\n enum: [ 'AED',\n 'AFN',\n 'ALL',\n 'AMD',\n 'ANG',\n 'AOA',\n 'ARS',\n 'AUD',\n 'AWG',\n 'AZN',\n 'BAM',\n 'BBD',\n 'BDT',\n 'BGN',\n 'BHD',\n 'BIF',\n 'BMD',\n 'BND',\n 'BOB',\n 'BRL',\n 'BSD',\n 'BTN',\n 'BWP',\n 'BYN',\n 'BZD',\n 'CAD',\n 'CDF',\n 'CHF',\n 'CLF',\n 'CLP',\n 'CNY',\n 'COP',\n 'CRC',\n 'CUC',\n 'CUP',\n 'CVE',\n 'CZK',\n 'DJF',\n 'DKK',\n 'DOP',\n 'DZD',\n 'EGP',\n 'ERN',\n 'ETB',\n 'EUR',\n 'FJD',\n 'FKP',\n 'GBP',\n 'GEL',\n 'GHS',\n 'GIP',\n 'GMD',\n 'GNF',\n 'GTQ',\n 'GYD',\n 'HKD',\n 'HNL',\n 'HRK',\n 'HTG',\n 'HUF',\n 'IDR',\n 'ILS',\n 'INR',\n 'IQD',\n 'IRR',\n 'ISK',\n 'JMD',\n 'JOD',\n 'JPY',\n 'KES',\n 'KGS',\n 'KHR',\n 'KMF',\n 'KPW',\n 'KRW',\n 'KWD',\n 'KYD',\n 'KZT',\n 'LAK',\n 'LBP',\n 'LKR',\n 'LRD',\n 'LSL',\n 'LYD',\n 'MAD',\n 'MDL',\n 'MGA',\n 'MKD',\n 'MMK',\n 'MNT',\n 'MOP',\n 'MRU',\n 'MUR',\n 'MVR',\n 'MWK',\n 'MXN',\n 'MYR',\n 'MZN',\n 'NAD',\n 'NGN',\n 'NIO',\n 'NOK',\n 'NPR',\n 'NZD',\n 'OMR',\n 'PAB',\n 'PEN',\n 'PGK',\n 'PHP',\n 'PKR',\n 'PLN',\n 'PYG',\n 'QAR',\n 'RON',\n 'RSD',\n 'RUB',\n 'RWF',\n 'SAR',\n 'SBD',\n 'SCR',\n 'SDG',\n 'SEK',\n 'SGD',\n 'SHP',\n 'SLE',\n 'SLL',\n 'SOS',\n 'SRD',\n 'SSP',\n 'STD',\n 'STN',\n 'SVC',\n 'SYP',\n 'SZL',\n 'THB',\n 'TJS',\n 'TMT',\n 'TND',\n 'TOP',\n 'TRY',\n 'TTD',\n 'TWD',\n 'TZS',\n 'UAH',\n 'UGX',\n 'USD',\n 'UYU',\n 'UZS',\n 'VES',\n 'VND',\n 'VUV',\n 'WST',\n 'XAF',\n 'XCD',\n 'XOF',\n 'XPF',\n 'YER',\n 'ZAR',\n 'ZMW',\n 'ZWL'\n ]\n }\n }\n}\n```", inputSchema: { type: 'object', properties: { @@ -27,13 +29,19 @@ export const tool: Tool = { 'X-Profile-Id': { type: 'string', }, + jq_filter: { + type: 'string', + title: 'jq Filter', + description: + 'A jq filter to apply to the response to include certain fields. Consult the output schema in the tool description to see the fields that are available.\n\nFor example: to include only the `name` field in every object of a results array, you can provide ".results[].name".\n\nFor more information, see the [jq documentation](https://jqlang.org/manual/).', + }, }, }, }; export const handler = async (client: Hyperswitch, args: Record | undefined) => { const { relay_id, ...body } = args as any; - return asTextContentResult(await client.relay.retrieve(relay_id, body)); + return asTextContentResult(await maybeFilter(args, await client.relay.retrieve(relay_id, body))); }; export default { metadata, tool, handler }; diff --git a/packages/mcp-server/src/tools/routing/activate-routing.ts b/packages/mcp-server/src/tools/routing/activate-routing.ts index 1a9e8a1..10d68c0 100644 --- a/packages/mcp-server/src/tools/routing/activate-routing.ts +++ b/packages/mcp-server/src/tools/routing/activate-routing.ts @@ -1,5 +1,6 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. +import { maybeFilter } from 'hyperswitch-mcp/filtering'; import { asTextContentResult } from 'hyperswitch-mcp/tools/types'; import { Tool } from '@modelcontextprotocol/sdk/types.js'; @@ -17,20 +18,27 @@ export const metadata: Metadata = { export const tool: Tool = { name: 'activate_routing', - description: 'Activate a routing config', + description: + "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\nActivate a routing config\n\n# Response Schema\n```json\n{\n $ref: '#/$defs/routing_dictionary_record',\n $defs: {\n routing_dictionary_record: {\n type: 'object',\n properties: {\n id: {\n type: 'string'\n },\n created_at: {\n type: 'integer'\n },\n description: {\n type: 'string'\n },\n kind: {\n type: 'string',\n enum: [ 'single',\n 'priority',\n 'volume_split',\n 'advanced',\n 'dynamic',\n 'three_ds_decision_rule'\n ]\n },\n modified_at: {\n type: 'integer'\n },\n name: {\n type: 'string'\n },\n profile_id: {\n type: 'string'\n },\n algorithm_for: {\n $ref: '#/$defs/transaction_type'\n },\n decision_engine_routing_id: {\n type: 'string'\n }\n },\n required: [ 'id',\n 'created_at',\n 'description',\n 'kind',\n 'modified_at',\n 'name',\n 'profile_id'\n ]\n },\n transaction_type: {\n type: 'string',\n enum: [ 'payment',\n 'payout',\n 'three_ds_authentication'\n ]\n }\n }\n}\n```", inputSchema: { type: 'object', properties: { routing_algorithm_id: { type: 'string', }, + jq_filter: { + type: 'string', + title: 'jq Filter', + description: + 'A jq filter to apply to the response to include certain fields. Consult the output schema in the tool description to see the fields that are available.\n\nFor example: to include only the `name` field in every object of a results array, you can provide ".results[].name".\n\nFor more information, see the [jq documentation](https://jqlang.org/manual/).', + }, }, }, }; export const handler = async (client: Hyperswitch, args: Record | undefined) => { const { routing_algorithm_id, ...body } = args as any; - return asTextContentResult(await client.routing.activate(routing_algorithm_id)); + return asTextContentResult(await maybeFilter(args, await client.routing.activate(routing_algorithm_id))); }; export default { metadata, tool, handler }; diff --git a/packages/mcp-server/src/tools/routing/create-routing.ts b/packages/mcp-server/src/tools/routing/create-routing.ts index 715f644..d7e4ef1 100644 --- a/packages/mcp-server/src/tools/routing/create-routing.ts +++ b/packages/mcp-server/src/tools/routing/create-routing.ts @@ -17,7 +17,8 @@ export const metadata: Metadata = { export const tool: Tool = { name: 'create_routing', - description: 'Create a routing config', + description: + "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\nCreate a routing config", inputSchema: { type: 'object', properties: { diff --git a/packages/mcp-server/src/tools/routing/deactivate-routing.ts b/packages/mcp-server/src/tools/routing/deactivate-routing.ts index 6680154..842464b 100644 --- a/packages/mcp-server/src/tools/routing/deactivate-routing.ts +++ b/packages/mcp-server/src/tools/routing/deactivate-routing.ts @@ -17,7 +17,8 @@ export const metadata: Metadata = { export const tool: Tool = { name: 'deactivate_routing', - description: 'Deactivates a routing config', + description: + "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\nDeactivates a routing config", inputSchema: { type: 'object', properties: { diff --git a/packages/mcp-server/src/tools/routing/default/profile/retrieve-default-routing-profile.ts b/packages/mcp-server/src/tools/routing/default/profile/retrieve-default-routing-profile.ts index bfdbbdd..64fe43e 100644 --- a/packages/mcp-server/src/tools/routing/default/profile/retrieve-default-routing-profile.ts +++ b/packages/mcp-server/src/tools/routing/default/profile/retrieve-default-routing-profile.ts @@ -1,5 +1,6 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. +import { maybeFilter } from 'hyperswitch-mcp/filtering'; import { asTextContentResult } from 'hyperswitch-mcp/tools/types'; import { Tool } from '@modelcontextprotocol/sdk/types.js'; @@ -17,15 +18,23 @@ export const metadata: Metadata = { export const tool: Tool = { name: 'retrieve_default_routing_profile', - description: 'Retrieve default config for profiles', + description: + "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\nRetrieve default config for profiles\n\n# Response Schema\n```json\n{\n $ref: '#/$defs/default_routing_config',\n $defs: {\n default_routing_config: {\n type: 'object',\n properties: {\n connectors: {\n type: 'array',\n items: {\n $ref: '#/$defs/routable_connector_choice'\n }\n },\n profile_id: {\n type: 'string'\n }\n },\n required: [ 'connectors',\n 'profile_id'\n ]\n },\n routable_connector_choice: {\n type: 'object',\n description: 'Routable Connector chosen for a payment',\n properties: {\n connector: {\n type: 'string',\n description: 'RoutableConnectors are the subset of Connectors that are eligible for payments routing',\n enum: [ 'adyenplatform',\n 'stripe_billing_test',\n 'phonypay',\n 'fauxpay',\n 'pretendpay',\n 'stripe_test',\n 'adyen_test',\n 'checkout_test',\n 'paypal_test',\n 'aci',\n 'adyen',\n 'airwallex',\n 'archipel',\n 'authorizedotnet',\n 'bankofamerica',\n 'barclaycard',\n 'billwerk',\n 'bitpay',\n 'bambora',\n 'bamboraapac',\n 'bluesnap',\n 'boku',\n 'braintree',\n 'cashtocode',\n 'chargebee',\n 'checkout',\n 'coinbase',\n 'coingate',\n 'cryptopay',\n 'cybersource',\n 'datatrans',\n 'deutschebank',\n 'digitalvirgo',\n 'dlocal',\n 'ebanx',\n 'elavon',\n 'facilitapay',\n 'fiserv',\n 'fiservemea',\n 'fiuu',\n 'forte',\n 'getnet',\n 'globalpay',\n 'globepay',\n 'gocardless',\n 'hipay',\n 'helcim',\n 'iatapay',\n 'inespay',\n 'itaubank',\n 'jpmorgan',\n 'klarna',\n 'mifinity',\n 'mollie',\n 'moneris',\n 'multisafepay',\n 'nexinets',\n 'nexixpay',\n 'nmi',\n 'nomupay',\n 'noon',\n 'novalnet',\n 'nuvei',\n 'opennode',\n 'paybox',\n 'payme',\n 'payone',\n 'paypal',\n 'paystack',\n 'payu',\n 'placetopay',\n 'powertranz',\n 'prophetpay',\n 'rapyd',\n 'razorpay',\n 'recurly',\n 'redsys',\n 'riskified',\n 'shift4',\n 'signifyd',\n 'square',\n 'stax',\n 'stripe',\n 'stripebilling',\n 'trustpay',\n 'tokenio',\n 'tsys',\n 'volt',\n 'wellsfargo',\n 'wise',\n 'worldline',\n 'worldpay',\n 'worldpayvantiv',\n 'worldpayxml',\n 'xendit',\n 'zen',\n 'plaid',\n 'zsl'\n ]\n },\n merchant_connector_id: {\n type: 'string'\n }\n },\n required: [ 'connector'\n ]\n }\n }\n}\n```", inputSchema: { type: 'object', - properties: {}, + properties: { + jq_filter: { + type: 'string', + title: 'jq Filter', + description: + 'A jq filter to apply to the response to include certain fields. Consult the output schema in the tool description to see the fields that are available.\n\nFor example: to include only the `name` field in every object of a results array, you can provide ".results[].name".\n\nFor more information, see the [jq documentation](https://jqlang.org/manual/).', + }, + }, }, }; export const handler = async (client: Hyperswitch, args: Record | undefined) => { - return asTextContentResult(await client.routing.default.profile.retrieve()); + return asTextContentResult(await maybeFilter(args, await client.routing.default.profile.retrieve())); }; export default { metadata, tool, handler }; diff --git a/packages/mcp-server/src/tools/routing/default/profile/update-default-routing-profile.ts b/packages/mcp-server/src/tools/routing/default/profile/update-default-routing-profile.ts index 602c1c1..a43ba05 100644 --- a/packages/mcp-server/src/tools/routing/default/profile/update-default-routing-profile.ts +++ b/packages/mcp-server/src/tools/routing/default/profile/update-default-routing-profile.ts @@ -1,5 +1,6 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. +import { maybeFilter } from 'hyperswitch-mcp/filtering'; import { asTextContentResult } from 'hyperswitch-mcp/tools/types'; import { Tool } from '@modelcontextprotocol/sdk/types.js'; @@ -17,7 +18,8 @@ export const metadata: Metadata = { export const tool: Tool = { name: 'update_default_routing_profile', - description: 'Update default config for profiles', + description: + "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\nUpdate default config for profiles\n\n# Response Schema\n```json\n{\n $ref: '#/$defs/default_routing_config',\n $defs: {\n default_routing_config: {\n type: 'object',\n properties: {\n connectors: {\n type: 'array',\n items: {\n $ref: '#/$defs/routable_connector_choice'\n }\n },\n profile_id: {\n type: 'string'\n }\n },\n required: [ 'connectors',\n 'profile_id'\n ]\n },\n routable_connector_choice: {\n type: 'object',\n description: 'Routable Connector chosen for a payment',\n properties: {\n connector: {\n type: 'string',\n description: 'RoutableConnectors are the subset of Connectors that are eligible for payments routing',\n enum: [ 'adyenplatform',\n 'stripe_billing_test',\n 'phonypay',\n 'fauxpay',\n 'pretendpay',\n 'stripe_test',\n 'adyen_test',\n 'checkout_test',\n 'paypal_test',\n 'aci',\n 'adyen',\n 'airwallex',\n 'archipel',\n 'authorizedotnet',\n 'bankofamerica',\n 'barclaycard',\n 'billwerk',\n 'bitpay',\n 'bambora',\n 'bamboraapac',\n 'bluesnap',\n 'boku',\n 'braintree',\n 'cashtocode',\n 'chargebee',\n 'checkout',\n 'coinbase',\n 'coingate',\n 'cryptopay',\n 'cybersource',\n 'datatrans',\n 'deutschebank',\n 'digitalvirgo',\n 'dlocal',\n 'ebanx',\n 'elavon',\n 'facilitapay',\n 'fiserv',\n 'fiservemea',\n 'fiuu',\n 'forte',\n 'getnet',\n 'globalpay',\n 'globepay',\n 'gocardless',\n 'hipay',\n 'helcim',\n 'iatapay',\n 'inespay',\n 'itaubank',\n 'jpmorgan',\n 'klarna',\n 'mifinity',\n 'mollie',\n 'moneris',\n 'multisafepay',\n 'nexinets',\n 'nexixpay',\n 'nmi',\n 'nomupay',\n 'noon',\n 'novalnet',\n 'nuvei',\n 'opennode',\n 'paybox',\n 'payme',\n 'payone',\n 'paypal',\n 'paystack',\n 'payu',\n 'placetopay',\n 'powertranz',\n 'prophetpay',\n 'rapyd',\n 'razorpay',\n 'recurly',\n 'redsys',\n 'riskified',\n 'shift4',\n 'signifyd',\n 'square',\n 'stax',\n 'stripe',\n 'stripebilling',\n 'trustpay',\n 'tokenio',\n 'tsys',\n 'volt',\n 'wellsfargo',\n 'wise',\n 'worldline',\n 'worldpay',\n 'worldpayvantiv',\n 'worldpayxml',\n 'xendit',\n 'zen',\n 'plaid',\n 'zsl'\n ]\n },\n merchant_connector_id: {\n type: 'string'\n }\n },\n required: [ 'connector'\n ]\n }\n }\n}\n```", inputSchema: { type: 'object', properties: { @@ -30,6 +32,12 @@ export const tool: Tool = { $ref: '#/$defs/routable_connector_choice', }, }, + jq_filter: { + type: 'string', + title: 'jq Filter', + description: + 'A jq filter to apply to the response to include certain fields. Consult the output schema in the tool description to see the fields that are available.\n\nFor example: to include only the `name` field in every object of a results array, you can provide ".results[].name".\n\nFor more information, see the [jq documentation](https://jqlang.org/manual/).', + }, }, $defs: { routable_connector_choice: { @@ -153,7 +161,9 @@ export const tool: Tool = { export const handler = async (client: Hyperswitch, args: Record | undefined) => { const { profile_id, ...body } = args as any; - return asTextContentResult(await client.routing.default.profile.update(profile_id, body)); + return asTextContentResult( + await maybeFilter(args, await client.routing.default.profile.update(profile_id, body)), + ); }; export default { metadata, tool, handler }; diff --git a/packages/mcp-server/src/tools/routing/default/retrieve-routing-default.ts b/packages/mcp-server/src/tools/routing/default/retrieve-routing-default.ts index 3b944ff..682ca24 100644 --- a/packages/mcp-server/src/tools/routing/default/retrieve-routing-default.ts +++ b/packages/mcp-server/src/tools/routing/default/retrieve-routing-default.ts @@ -1,5 +1,6 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. +import { maybeFilter } from 'hyperswitch-mcp/filtering'; import { asTextContentResult } from 'hyperswitch-mcp/tools/types'; import { Tool } from '@modelcontextprotocol/sdk/types.js'; @@ -17,15 +18,23 @@ export const metadata: Metadata = { export const tool: Tool = { name: 'retrieve_routing_default', - description: 'Retrieve default fallback config', + description: + "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\nRetrieve default fallback config\n\n# Response Schema\n```json\n{\n type: 'array',\n items: {\n $ref: '#/$defs/routable_connector_choice'\n },\n $defs: {\n routable_connector_choice: {\n type: 'object',\n description: 'Routable Connector chosen for a payment',\n properties: {\n connector: {\n type: 'string',\n description: 'RoutableConnectors are the subset of Connectors that are eligible for payments routing',\n enum: [ 'adyenplatform',\n 'stripe_billing_test',\n 'phonypay',\n 'fauxpay',\n 'pretendpay',\n 'stripe_test',\n 'adyen_test',\n 'checkout_test',\n 'paypal_test',\n 'aci',\n 'adyen',\n 'airwallex',\n 'archipel',\n 'authorizedotnet',\n 'bankofamerica',\n 'barclaycard',\n 'billwerk',\n 'bitpay',\n 'bambora',\n 'bamboraapac',\n 'bluesnap',\n 'boku',\n 'braintree',\n 'cashtocode',\n 'chargebee',\n 'checkout',\n 'coinbase',\n 'coingate',\n 'cryptopay',\n 'cybersource',\n 'datatrans',\n 'deutschebank',\n 'digitalvirgo',\n 'dlocal',\n 'ebanx',\n 'elavon',\n 'facilitapay',\n 'fiserv',\n 'fiservemea',\n 'fiuu',\n 'forte',\n 'getnet',\n 'globalpay',\n 'globepay',\n 'gocardless',\n 'hipay',\n 'helcim',\n 'iatapay',\n 'inespay',\n 'itaubank',\n 'jpmorgan',\n 'klarna',\n 'mifinity',\n 'mollie',\n 'moneris',\n 'multisafepay',\n 'nexinets',\n 'nexixpay',\n 'nmi',\n 'nomupay',\n 'noon',\n 'novalnet',\n 'nuvei',\n 'opennode',\n 'paybox',\n 'payme',\n 'payone',\n 'paypal',\n 'paystack',\n 'payu',\n 'placetopay',\n 'powertranz',\n 'prophetpay',\n 'rapyd',\n 'razorpay',\n 'recurly',\n 'redsys',\n 'riskified',\n 'shift4',\n 'signifyd',\n 'square',\n 'stax',\n 'stripe',\n 'stripebilling',\n 'trustpay',\n 'tokenio',\n 'tsys',\n 'volt',\n 'wellsfargo',\n 'wise',\n 'worldline',\n 'worldpay',\n 'worldpayvantiv',\n 'worldpayxml',\n 'xendit',\n 'zen',\n 'plaid',\n 'zsl'\n ]\n },\n merchant_connector_id: {\n type: 'string'\n }\n },\n required: [ 'connector'\n ]\n }\n }\n}\n```", inputSchema: { type: 'object', - properties: {}, + properties: { + jq_filter: { + type: 'string', + title: 'jq Filter', + description: + 'A jq filter to apply to the response to include certain fields. Consult the output schema in the tool description to see the fields that are available.\n\nFor example: to include only the `name` field in every object of a results array, you can provide ".results[].name".\n\nFor more information, see the [jq documentation](https://jqlang.org/manual/).', + }, + }, }, }; export const handler = async (client: Hyperswitch, args: Record | undefined) => { - return asTextContentResult(await client.routing.default.retrieve()); + return asTextContentResult(await maybeFilter(args, await client.routing.default.retrieve())); }; export default { metadata, tool, handler }; diff --git a/packages/mcp-server/src/tools/routing/default/update-routing-default.ts b/packages/mcp-server/src/tools/routing/default/update-routing-default.ts index 1cb364e..191f6cd 100644 --- a/packages/mcp-server/src/tools/routing/default/update-routing-default.ts +++ b/packages/mcp-server/src/tools/routing/default/update-routing-default.ts @@ -1,5 +1,6 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. +import { maybeFilter } from 'hyperswitch-mcp/filtering'; import { asTextContentResult } from 'hyperswitch-mcp/tools/types'; import { Tool } from '@modelcontextprotocol/sdk/types.js'; @@ -17,7 +18,8 @@ export const metadata: Metadata = { export const tool: Tool = { name: 'update_routing_default', - description: 'Update default fallback config', + description: + "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\nUpdate default fallback config\n\n# Response Schema\n```json\n{\n type: 'array',\n items: {\n $ref: '#/$defs/routable_connector_choice'\n },\n $defs: {\n routable_connector_choice: {\n type: 'object',\n description: 'Routable Connector chosen for a payment',\n properties: {\n connector: {\n type: 'string',\n description: 'RoutableConnectors are the subset of Connectors that are eligible for payments routing',\n enum: [ 'adyenplatform',\n 'stripe_billing_test',\n 'phonypay',\n 'fauxpay',\n 'pretendpay',\n 'stripe_test',\n 'adyen_test',\n 'checkout_test',\n 'paypal_test',\n 'aci',\n 'adyen',\n 'airwallex',\n 'archipel',\n 'authorizedotnet',\n 'bankofamerica',\n 'barclaycard',\n 'billwerk',\n 'bitpay',\n 'bambora',\n 'bamboraapac',\n 'bluesnap',\n 'boku',\n 'braintree',\n 'cashtocode',\n 'chargebee',\n 'checkout',\n 'coinbase',\n 'coingate',\n 'cryptopay',\n 'cybersource',\n 'datatrans',\n 'deutschebank',\n 'digitalvirgo',\n 'dlocal',\n 'ebanx',\n 'elavon',\n 'facilitapay',\n 'fiserv',\n 'fiservemea',\n 'fiuu',\n 'forte',\n 'getnet',\n 'globalpay',\n 'globepay',\n 'gocardless',\n 'hipay',\n 'helcim',\n 'iatapay',\n 'inespay',\n 'itaubank',\n 'jpmorgan',\n 'klarna',\n 'mifinity',\n 'mollie',\n 'moneris',\n 'multisafepay',\n 'nexinets',\n 'nexixpay',\n 'nmi',\n 'nomupay',\n 'noon',\n 'novalnet',\n 'nuvei',\n 'opennode',\n 'paybox',\n 'payme',\n 'payone',\n 'paypal',\n 'paystack',\n 'payu',\n 'placetopay',\n 'powertranz',\n 'prophetpay',\n 'rapyd',\n 'razorpay',\n 'recurly',\n 'redsys',\n 'riskified',\n 'shift4',\n 'signifyd',\n 'square',\n 'stax',\n 'stripe',\n 'stripebilling',\n 'trustpay',\n 'tokenio',\n 'tsys',\n 'volt',\n 'wellsfargo',\n 'wise',\n 'worldline',\n 'worldpay',\n 'worldpayvantiv',\n 'worldpayxml',\n 'xendit',\n 'zen',\n 'plaid',\n 'zsl'\n ]\n },\n merchant_connector_id: {\n type: 'string'\n }\n },\n required: [ 'connector'\n ]\n }\n }\n}\n```", inputSchema: { type: 'object', properties: { @@ -27,6 +29,12 @@ export const tool: Tool = { $ref: '#/$defs/routable_connector_choice', }, }, + jq_filter: { + type: 'string', + title: 'jq Filter', + description: + 'A jq filter to apply to the response to include certain fields. Consult the output schema in the tool description to see the fields that are available.\n\nFor example: to include only the `name` field in every object of a results array, you can provide ".results[].name".\n\nFor more information, see the [jq documentation](https://jqlang.org/manual/).', + }, }, $defs: { routable_connector_choice: { @@ -150,7 +158,7 @@ export const tool: Tool = { export const handler = async (client: Hyperswitch, args: Record | undefined) => { const body = args as any; - return asTextContentResult(await client.routing.default.update(body)); + return asTextContentResult(await maybeFilter(args, await client.routing.default.update(body))); }; export default { metadata, tool, handler }; diff --git a/packages/mcp-server/src/tools/routing/list-routing.ts b/packages/mcp-server/src/tools/routing/list-routing.ts index 5b1448f..cd8d856 100644 --- a/packages/mcp-server/src/tools/routing/list-routing.ts +++ b/packages/mcp-server/src/tools/routing/list-routing.ts @@ -1,5 +1,6 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. +import { maybeFilter } from 'hyperswitch-mcp/filtering'; import { asTextContentResult } from 'hyperswitch-mcp/tools/types'; import { Tool } from '@modelcontextprotocol/sdk/types.js'; @@ -17,7 +18,8 @@ export const metadata: Metadata = { export const tool: Tool = { name: 'list_routing', - description: 'List all routing configs', + description: + "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 all routing configs\n\n# Response Schema\n```json\n{\n anyOf: [ {\n type: 'object',\n properties: {\n merchant_id: {\n type: 'string'\n },\n records: {\n type: 'array',\n items: {\n $ref: '#/$defs/routing_dictionary_record'\n }\n },\n active_id: {\n type: 'string'\n }\n },\n required: [ 'merchant_id',\n 'records'\n ]\n },\n {\n type: 'array',\n items: {\n $ref: '#/$defs/routing_dictionary_record'\n }\n }\n ],\n $defs: {\n routing_dictionary_record: {\n type: 'object',\n properties: {\n id: {\n type: 'string'\n },\n created_at: {\n type: 'integer'\n },\n description: {\n type: 'string'\n },\n kind: {\n type: 'string',\n enum: [ 'single',\n 'priority',\n 'volume_split',\n 'advanced',\n 'dynamic',\n 'three_ds_decision_rule'\n ]\n },\n modified_at: {\n type: 'integer'\n },\n name: {\n type: 'string'\n },\n profile_id: {\n type: 'string'\n },\n algorithm_for: {\n $ref: '#/$defs/transaction_type'\n },\n decision_engine_routing_id: {\n type: 'string'\n }\n },\n required: [ 'id',\n 'created_at',\n 'description',\n 'kind',\n 'modified_at',\n 'name',\n 'profile_id'\n ]\n },\n transaction_type: {\n type: 'string',\n enum: [ 'payment',\n 'payout',\n 'three_ds_authentication'\n ]\n }\n }\n}\n```", inputSchema: { type: 'object', properties: { @@ -33,13 +35,19 @@ export const tool: Tool = { type: 'string', description: 'The unique identifier for a merchant profile', }, + jq_filter: { + type: 'string', + title: 'jq Filter', + description: + 'A jq filter to apply to the response to include certain fields. Consult the output schema in the tool description to see the fields that are available.\n\nFor example: to include only the `name` field in every object of a results array, you can provide ".results[].name".\n\nFor more information, see the [jq documentation](https://jqlang.org/manual/).', + }, }, }, }; export const handler = async (client: Hyperswitch, args: Record | undefined) => { const body = args as any; - return asTextContentResult(await client.routing.list(body)); + return asTextContentResult(await maybeFilter(args, await client.routing.list(body))); }; export default { metadata, tool, handler }; diff --git a/packages/mcp-server/src/tools/routing/retrieve-active-routing.ts b/packages/mcp-server/src/tools/routing/retrieve-active-routing.ts index 6ed61c4..6002d0d 100644 --- a/packages/mcp-server/src/tools/routing/retrieve-active-routing.ts +++ b/packages/mcp-server/src/tools/routing/retrieve-active-routing.ts @@ -17,7 +17,8 @@ export const metadata: Metadata = { export const tool: Tool = { name: 'retrieve_active_routing', - description: 'Retrieve active config', + description: + "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\nRetrieve active config", inputSchema: { type: 'object', properties: { diff --git a/packages/mcp-server/src/tools/routing/retrieve-routing.ts b/packages/mcp-server/src/tools/routing/retrieve-routing.ts index b6b2432..0f1bd28 100644 --- a/packages/mcp-server/src/tools/routing/retrieve-routing.ts +++ b/packages/mcp-server/src/tools/routing/retrieve-routing.ts @@ -17,7 +17,8 @@ export const metadata: Metadata = { export const tool: Tool = { name: 'retrieve_routing', - description: 'Retrieve a routing algorithm', + description: + "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\nRetrieve a routing algorithm", inputSchema: { type: 'object', properties: { diff --git a/packages/mcp-server/src/tools/three-ds-decision/execute-three-ds-decision.ts b/packages/mcp-server/src/tools/three-ds-decision/execute-three-ds-decision.ts index 48e066e..b92317c 100644 --- a/packages/mcp-server/src/tools/three-ds-decision/execute-three-ds-decision.ts +++ b/packages/mcp-server/src/tools/three-ds-decision/execute-three-ds-decision.ts @@ -17,7 +17,8 @@ export const metadata: Metadata = { export const tool: Tool = { name: 'execute_three_ds_decision', - description: '3DS Decision - Execute', + description: + "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\n3DS Decision - Execute", inputSchema: { type: 'object', properties: { diff --git a/packages/mcp-server/src/tools/types.ts b/packages/mcp-server/src/tools/types.ts index fbf5c90..50c4085 100644 --- a/packages/mcp-server/src/tools/types.ts +++ b/packages/mcp-server/src/tools/types.ts @@ -47,7 +47,7 @@ export type HandlerFunction = ( args: Record | undefined, ) => Promise; -export function asTextContentResult(result: Object): ToolCallResult { +export function asTextContentResult(result: unknown): ToolCallResult { return { content: [ { From 67f1a1d670e8e6345a78f14eb4e358a9af00050b Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 15 Jul 2025 02:12:29 +0000 Subject: [PATCH 04/44] feat: clean up environment call outs --- README.md | 6 ------ 1 file changed, 6 deletions(-) diff --git a/README.md b/README.md index d823d56..0dd9b84 100644 --- a/README.md +++ b/README.md @@ -27,9 +27,6 @@ import Hyperswitch from 'hyperswitch'; const client = new Hyperswitch({ apiKey: process.env['HYPERSWITCH_API_KEY'], // This is the default and can be omitted - ephemeralKey: process.env['HYPERSWITCH_EPHEMERAL_KEY'], // This is the default and can be omitted - jwtKey: process.env['HYPERSWITCH_JWT_KEY'], // This is the default and can be omitted - publishableKey: process.env['HYPERSWITCH_PUBLISHABLE_KEY'], // This is the default and can be omitted }); const paymentsCreateResponseOpenAPI = await client.payments.create({ amount: 6540, currency: 'USD' }); @@ -47,9 +44,6 @@ import Hyperswitch from 'hyperswitch'; const client = new Hyperswitch({ apiKey: process.env['HYPERSWITCH_API_KEY'], // This is the default and can be omitted - ephemeralKey: process.env['HYPERSWITCH_EPHEMERAL_KEY'], // This is the default and can be omitted - jwtKey: process.env['HYPERSWITCH_JWT_KEY'], // This is the default and can be omitted - publishableKey: process.env['HYPERSWITCH_PUBLISHABLE_KEY'], // This is the default and can be omitted }); const params: Hyperswitch.PaymentCreateParams = { amount: 6540, currency: 'USD' }; From c564d5bc3893c126fa175fe6cfe14cbb4d3048e2 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 16 Jul 2025 03:29:27 +0000 Subject: [PATCH 05/44] fix(mcp): support jq filtering on cloudflare workers --- packages/mcp-server/package.json | 2 +- packages/mcp-server/src/filtering.ts | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/packages/mcp-server/package.json b/packages/mcp-server/package.json index 167c841..1720816 100644 --- a/packages/mcp-server/package.json +++ b/packages/mcp-server/package.json @@ -29,7 +29,7 @@ "dependencies": { "hyperswitch": "file:../../dist/", "@modelcontextprotocol/sdk": "^1.11.5", - "jq-web": "^0.6.2", + "jq-web": "https://github.com/stainless-api/jq-web/releases/download/v0.8.2/jq-web.tar.gz", "yargs": "^17.7.2", "@cloudflare/cabidela": "^0.2.4", "zod": "^3.25.20", diff --git a/packages/mcp-server/src/filtering.ts b/packages/mcp-server/src/filtering.ts index e560736..87eab2d 100644 --- a/packages/mcp-server/src/filtering.ts +++ b/packages/mcp-server/src/filtering.ts @@ -1,3 +1,6 @@ +// @ts-nocheck +import initJq from 'jq-web'; + export async function maybeFilter(args: Record | undefined, response: any): Promise { const jqFilter = args?.['jq_filter']; if (jqFilter && typeof jqFilter === 'string') { @@ -7,7 +10,6 @@ export async function maybeFilter(args: Record | undefined, res } } -var jqWeb = require('jq-web'); async function jq(json: any, jqFilter: string) { - return (await jqWeb).json(json, jqFilter); + return (await initJq).json(json, jqFilter); } From 39f8847d28feb43481d28cd454f3d6d470fbfbc6 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 16 Jul 2025 03:54:33 +0000 Subject: [PATCH 06/44] chore(mcp): rework imports in tools --- .../business-profile/create-accounts-business-profile.ts | 3 +-- .../business-profile/delete-accounts-business-profile.ts | 3 +-- ...ggle-dynamic-routing-business-profile-accounts-contracts.ts | 3 +-- ...nfig-dynamic-routing-business-profile-accounts-contracts.ts | 3 +-- ...le-dynamic-routing-business-profile-accounts-elimination.ts | 3 +-- ...-dynamic-routing-business-profile-accounts-success-based.ts | 3 +-- ...-dynamic-routing-business-profile-accounts-success-based.ts | 3 +-- .../business-profile/list-accounts-business-profile.ts | 3 +-- .../business-profile/retrieve-accounts-business-profile.ts | 3 +-- .../business-profile/update-accounts-business-profile.ts | 3 +-- .../tools/accounts/connectors/create-accounts-connectors.ts | 3 +-- .../tools/accounts/connectors/delete-accounts-connectors.ts | 3 +-- .../src/tools/accounts/connectors/list-accounts-connectors.ts | 3 +-- .../tools/accounts/connectors/retrieve-accounts-connectors.ts | 3 +-- .../tools/accounts/connectors/update-accounts-connectors.ts | 3 +-- packages/mcp-server/src/tools/accounts/create-accounts.ts | 3 +-- packages/mcp-server/src/tools/accounts/delete-accounts.ts | 3 +-- packages/mcp-server/src/tools/accounts/kv-accounts.ts | 3 +-- .../src/tools/accounts/list-payment-methods-accounts.ts | 3 +-- packages/mcp-server/src/tools/accounts/retrieve-accounts.ts | 3 +-- packages/mcp-server/src/tools/accounts/update-accounts.ts | 3 +-- packages/mcp-server/src/tools/api-keys/create-api-keys.ts | 3 +-- packages/mcp-server/src/tools/api-keys/list-api-keys.ts | 3 +-- packages/mcp-server/src/tools/api-keys/retrieve-api-keys.ts | 3 +-- packages/mcp-server/src/tools/api-keys/revoke-api-keys.ts | 3 +-- packages/mcp-server/src/tools/api-keys/update-api-keys.ts | 3 +-- .../src/tools/authentication/create-authentication.ts | 3 +-- packages/mcp-server/src/tools/blocklist/create-blocklist.ts | 3 +-- packages/mcp-server/src/tools/blocklist/delete-blocklist.ts | 3 +-- packages/mcp-server/src/tools/blocklist/retrieve-blocklist.ts | 3 +-- packages/mcp-server/src/tools/blocklist/toggle-blocklist.ts | 3 +-- packages/mcp-server/src/tools/customers/create-customers.ts | 3 +-- packages/mcp-server/src/tools/customers/delete-customers.ts | 3 +-- packages/mcp-server/src/tools/customers/list-customers.ts | 3 +-- .../mcp-server/src/tools/customers/list-mandates-customers.ts | 3 +-- .../payment-methods/list-customers-payment-methods.ts | 3 +-- .../payment-methods/list-saved-customers-payment-methods.ts | 3 +-- packages/mcp-server/src/tools/customers/retrieve-customers.ts | 3 +-- packages/mcp-server/src/tools/customers/update-customers.ts | 3 +-- packages/mcp-server/src/tools/disputes/list-disputes.ts | 3 +-- packages/mcp-server/src/tools/disputes/retrieve-disputes.ts | 3 +-- .../mcp-server/src/tools/events/delivery-attempts-events.ts | 3 +-- packages/mcp-server/src/tools/events/list-events.ts | 3 +-- .../mcp-server/src/tools/events/profile/list-events-profile.ts | 3 +-- packages/mcp-server/src/tools/events/retry-events.ts | 3 +-- packages/mcp-server/src/tools/gsm/create-gsm.ts | 3 +-- packages/mcp-server/src/tools/gsm/delete-gsm.ts | 3 +-- packages/mcp-server/src/tools/gsm/retrieve-gsm.ts | 3 +-- packages/mcp-server/src/tools/gsm/update-gsm.ts | 3 +-- packages/mcp-server/src/tools/mandates/retrieve-mandates.ts | 3 +-- packages/mcp-server/src/tools/mandates/revoke-mandates.ts | 3 +-- .../mcp-server/src/tools/organization/create-organization.ts | 3 +-- .../mcp-server/src/tools/organization/retrieve-organization.ts | 3 +-- .../mcp-server/src/tools/organization/update-organization.ts | 3 +-- .../mcp-server/src/tools/payment-link/retrieve-payment-link.ts | 3 +-- .../src/tools/payment-methods/create-payment-methods.ts | 3 +-- .../src/tools/payment-methods/delete-payment-methods.ts | 3 +-- .../src/tools/payment-methods/retrieve-payment-methods.ts | 3 +-- .../src/tools/payment-methods/set-default-payment-methods.ts | 3 +-- .../src/tools/payment-methods/update-payment-methods.ts | 3 +-- packages/mcp-server/src/tools/payments/cancel-payments.ts | 3 +-- packages/mcp-server/src/tools/payments/capture-payments.ts | 3 +-- .../src/tools/payments/complete-authorize-payments.ts | 3 +-- packages/mcp-server/src/tools/payments/confirm-payments.ts | 3 +-- packages/mcp-server/src/tools/payments/create-payments.ts | 3 +-- .../src/tools/payments/create-session-token-payments.ts | 3 +-- .../src/tools/payments/incremental-authorization-payments.ts | 3 +-- packages/mcp-server/src/tools/payments/list-payments.ts | 3 +-- .../payments/number-3ds/authenticate-payments-number-3ds.ts | 3 +-- .../src/tools/payments/post-session-tokens-payments.ts | 3 +-- packages/mcp-server/src/tools/payments/retrieve-payments.ts | 3 +-- .../mcp-server/src/tools/payments/update-metadata-payments.ts | 3 +-- packages/mcp-server/src/tools/payments/update-payments.ts | 3 +-- packages/mcp-server/src/tools/payouts/cancel-payouts.ts | 3 +-- packages/mcp-server/src/tools/payouts/confirm-payouts.ts | 3 +-- packages/mcp-server/src/tools/payouts/create-payouts.ts | 3 +-- packages/mcp-server/src/tools/payouts/fulfill-payouts.ts | 3 +-- packages/mcp-server/src/tools/payouts/list-filters-payouts.ts | 3 +-- .../mcp-server/src/tools/payouts/list/retrieve-payouts-list.ts | 3 +-- .../src/tools/payouts/list/with-filters-payouts-list.ts | 3 +-- packages/mcp-server/src/tools/payouts/retrieve-payouts.ts | 3 +-- packages/mcp-server/src/tools/payouts/update-payouts.ts | 3 +-- packages/mcp-server/src/tools/poll/retrieve-status-poll.ts | 3 +-- .../src/tools/profile-acquirers/create-profile-acquirers.ts | 3 +-- .../src/tools/profile-acquirers/update-profile-acquirers.ts | 3 +-- packages/mcp-server/src/tools/refunds/create-refunds.ts | 3 +-- packages/mcp-server/src/tools/refunds/list-refunds.ts | 3 +-- packages/mcp-server/src/tools/refunds/retrieve-refunds.ts | 3 +-- packages/mcp-server/src/tools/refunds/update-refunds.ts | 3 +-- packages/mcp-server/src/tools/relay/create-relay.ts | 3 +-- packages/mcp-server/src/tools/relay/retrieve-relay.ts | 3 +-- packages/mcp-server/src/tools/routing/activate-routing.ts | 3 +-- packages/mcp-server/src/tools/routing/create-routing.ts | 3 +-- packages/mcp-server/src/tools/routing/deactivate-routing.ts | 3 +-- .../default/profile/retrieve-default-routing-profile.ts | 3 +-- .../routing/default/profile/update-default-routing-profile.ts | 3 +-- .../src/tools/routing/default/retrieve-routing-default.ts | 3 +-- .../src/tools/routing/default/update-routing-default.ts | 3 +-- packages/mcp-server/src/tools/routing/list-routing.ts | 3 +-- .../mcp-server/src/tools/routing/retrieve-active-routing.ts | 3 +-- packages/mcp-server/src/tools/routing/retrieve-routing.ts | 3 +-- .../src/tools/three-ds-decision/execute-three-ds-decision.ts | 3 +-- 102 files changed, 102 insertions(+), 204 deletions(-) diff --git a/packages/mcp-server/src/tools/accounts/business-profile/create-accounts-business-profile.ts b/packages/mcp-server/src/tools/accounts/business-profile/create-accounts-business-profile.ts index 908b82f..05ec61e 100644 --- a/packages/mcp-server/src/tools/accounts/business-profile/create-accounts-business-profile.ts +++ b/packages/mcp-server/src/tools/accounts/business-profile/create-accounts-business-profile.ts @@ -1,9 +1,8 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import { asTextContentResult } from 'hyperswitch-mcp/tools/types'; +import { Metadata, asTextContentResult } from 'hyperswitch-mcp/tools/types'; import { Tool } from '@modelcontextprotocol/sdk/types.js'; -import type { Metadata } from '../../'; import Hyperswitch from 'hyperswitch'; export const metadata: Metadata = { diff --git a/packages/mcp-server/src/tools/accounts/business-profile/delete-accounts-business-profile.ts b/packages/mcp-server/src/tools/accounts/business-profile/delete-accounts-business-profile.ts index f2e9f8f..19a6d11 100644 --- a/packages/mcp-server/src/tools/accounts/business-profile/delete-accounts-business-profile.ts +++ b/packages/mcp-server/src/tools/accounts/business-profile/delete-accounts-business-profile.ts @@ -1,10 +1,9 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. import { maybeFilter } from 'hyperswitch-mcp/filtering'; -import { asTextContentResult } from 'hyperswitch-mcp/tools/types'; +import { Metadata, asTextContentResult } from 'hyperswitch-mcp/tools/types'; import { Tool } from '@modelcontextprotocol/sdk/types.js'; -import type { Metadata } from '../../'; import Hyperswitch from 'hyperswitch'; export const metadata: Metadata = { diff --git a/packages/mcp-server/src/tools/accounts/business-profile/dynamic-routing/contracts/toggle-dynamic-routing-business-profile-accounts-contracts.ts b/packages/mcp-server/src/tools/accounts/business-profile/dynamic-routing/contracts/toggle-dynamic-routing-business-profile-accounts-contracts.ts index 8be3193..d91da27 100644 --- a/packages/mcp-server/src/tools/accounts/business-profile/dynamic-routing/contracts/toggle-dynamic-routing-business-profile-accounts-contracts.ts +++ b/packages/mcp-server/src/tools/accounts/business-profile/dynamic-routing/contracts/toggle-dynamic-routing-business-profile-accounts-contracts.ts @@ -1,10 +1,9 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. import { maybeFilter } from 'hyperswitch-mcp/filtering'; -import { asTextContentResult } from 'hyperswitch-mcp/tools/types'; +import { Metadata, asTextContentResult } from 'hyperswitch-mcp/tools/types'; import { Tool } from '@modelcontextprotocol/sdk/types.js'; -import type { Metadata } from '../../../../'; import Hyperswitch from 'hyperswitch'; export const metadata: Metadata = { diff --git a/packages/mcp-server/src/tools/accounts/business-profile/dynamic-routing/contracts/update-config-dynamic-routing-business-profile-accounts-contracts.ts b/packages/mcp-server/src/tools/accounts/business-profile/dynamic-routing/contracts/update-config-dynamic-routing-business-profile-accounts-contracts.ts index 375cc9f..1dd8f38 100644 --- a/packages/mcp-server/src/tools/accounts/business-profile/dynamic-routing/contracts/update-config-dynamic-routing-business-profile-accounts-contracts.ts +++ b/packages/mcp-server/src/tools/accounts/business-profile/dynamic-routing/contracts/update-config-dynamic-routing-business-profile-accounts-contracts.ts @@ -1,10 +1,9 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. import { maybeFilter } from 'hyperswitch-mcp/filtering'; -import { asTextContentResult } from 'hyperswitch-mcp/tools/types'; +import { Metadata, asTextContentResult } from 'hyperswitch-mcp/tools/types'; import { Tool } from '@modelcontextprotocol/sdk/types.js'; -import type { Metadata } from '../../../../'; import Hyperswitch from 'hyperswitch'; export const metadata: Metadata = { diff --git a/packages/mcp-server/src/tools/accounts/business-profile/dynamic-routing/elimination/toggle-dynamic-routing-business-profile-accounts-elimination.ts b/packages/mcp-server/src/tools/accounts/business-profile/dynamic-routing/elimination/toggle-dynamic-routing-business-profile-accounts-elimination.ts index 6bd4f44..9ff3da5 100644 --- a/packages/mcp-server/src/tools/accounts/business-profile/dynamic-routing/elimination/toggle-dynamic-routing-business-profile-accounts-elimination.ts +++ b/packages/mcp-server/src/tools/accounts/business-profile/dynamic-routing/elimination/toggle-dynamic-routing-business-profile-accounts-elimination.ts @@ -1,10 +1,9 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. import { maybeFilter } from 'hyperswitch-mcp/filtering'; -import { asTextContentResult } from 'hyperswitch-mcp/tools/types'; +import { Metadata, asTextContentResult } from 'hyperswitch-mcp/tools/types'; import { Tool } from '@modelcontextprotocol/sdk/types.js'; -import type { Metadata } from '../../../../'; import Hyperswitch from 'hyperswitch'; export const metadata: Metadata = { diff --git a/packages/mcp-server/src/tools/accounts/business-profile/dynamic-routing/success-based/toggle-dynamic-routing-business-profile-accounts-success-based.ts b/packages/mcp-server/src/tools/accounts/business-profile/dynamic-routing/success-based/toggle-dynamic-routing-business-profile-accounts-success-based.ts index 2d0b26e..05f81de 100644 --- a/packages/mcp-server/src/tools/accounts/business-profile/dynamic-routing/success-based/toggle-dynamic-routing-business-profile-accounts-success-based.ts +++ b/packages/mcp-server/src/tools/accounts/business-profile/dynamic-routing/success-based/toggle-dynamic-routing-business-profile-accounts-success-based.ts @@ -1,10 +1,9 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. import { maybeFilter } from 'hyperswitch-mcp/filtering'; -import { asTextContentResult } from 'hyperswitch-mcp/tools/types'; +import { Metadata, asTextContentResult } from 'hyperswitch-mcp/tools/types'; import { Tool } from '@modelcontextprotocol/sdk/types.js'; -import type { Metadata } from '../../../../'; import Hyperswitch from 'hyperswitch'; export const metadata: Metadata = { diff --git a/packages/mcp-server/src/tools/accounts/business-profile/dynamic-routing/success-based/update-config-dynamic-routing-business-profile-accounts-success-based.ts b/packages/mcp-server/src/tools/accounts/business-profile/dynamic-routing/success-based/update-config-dynamic-routing-business-profile-accounts-success-based.ts index 2193196..aefcf62 100644 --- a/packages/mcp-server/src/tools/accounts/business-profile/dynamic-routing/success-based/update-config-dynamic-routing-business-profile-accounts-success-based.ts +++ b/packages/mcp-server/src/tools/accounts/business-profile/dynamic-routing/success-based/update-config-dynamic-routing-business-profile-accounts-success-based.ts @@ -1,10 +1,9 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. import { maybeFilter } from 'hyperswitch-mcp/filtering'; -import { asTextContentResult } from 'hyperswitch-mcp/tools/types'; +import { Metadata, asTextContentResult } from 'hyperswitch-mcp/tools/types'; import { Tool } from '@modelcontextprotocol/sdk/types.js'; -import type { Metadata } from '../../../../'; import Hyperswitch from 'hyperswitch'; export const metadata: Metadata = { diff --git a/packages/mcp-server/src/tools/accounts/business-profile/list-accounts-business-profile.ts b/packages/mcp-server/src/tools/accounts/business-profile/list-accounts-business-profile.ts index 0fe4761..076703a 100644 --- a/packages/mcp-server/src/tools/accounts/business-profile/list-accounts-business-profile.ts +++ b/packages/mcp-server/src/tools/accounts/business-profile/list-accounts-business-profile.ts @@ -1,9 +1,8 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import { asTextContentResult } from 'hyperswitch-mcp/tools/types'; +import { Metadata, asTextContentResult } from 'hyperswitch-mcp/tools/types'; import { Tool } from '@modelcontextprotocol/sdk/types.js'; -import type { Metadata } from '../../'; import Hyperswitch from 'hyperswitch'; export const metadata: Metadata = { diff --git a/packages/mcp-server/src/tools/accounts/business-profile/retrieve-accounts-business-profile.ts b/packages/mcp-server/src/tools/accounts/business-profile/retrieve-accounts-business-profile.ts index 29174da..7809ab3 100644 --- a/packages/mcp-server/src/tools/accounts/business-profile/retrieve-accounts-business-profile.ts +++ b/packages/mcp-server/src/tools/accounts/business-profile/retrieve-accounts-business-profile.ts @@ -1,9 +1,8 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import { asTextContentResult } from 'hyperswitch-mcp/tools/types'; +import { Metadata, asTextContentResult } from 'hyperswitch-mcp/tools/types'; import { Tool } from '@modelcontextprotocol/sdk/types.js'; -import type { Metadata } from '../../'; import Hyperswitch from 'hyperswitch'; export const metadata: Metadata = { diff --git a/packages/mcp-server/src/tools/accounts/business-profile/update-accounts-business-profile.ts b/packages/mcp-server/src/tools/accounts/business-profile/update-accounts-business-profile.ts index c590b54..1536ceb 100644 --- a/packages/mcp-server/src/tools/accounts/business-profile/update-accounts-business-profile.ts +++ b/packages/mcp-server/src/tools/accounts/business-profile/update-accounts-business-profile.ts @@ -1,9 +1,8 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import { asTextContentResult } from 'hyperswitch-mcp/tools/types'; +import { Metadata, asTextContentResult } from 'hyperswitch-mcp/tools/types'; import { Tool } from '@modelcontextprotocol/sdk/types.js'; -import type { Metadata } from '../../'; import Hyperswitch from 'hyperswitch'; export const metadata: Metadata = { diff --git a/packages/mcp-server/src/tools/accounts/connectors/create-accounts-connectors.ts b/packages/mcp-server/src/tools/accounts/connectors/create-accounts-connectors.ts index 564f75d..09bd032 100644 --- a/packages/mcp-server/src/tools/accounts/connectors/create-accounts-connectors.ts +++ b/packages/mcp-server/src/tools/accounts/connectors/create-accounts-connectors.ts @@ -1,9 +1,8 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import { asTextContentResult } from 'hyperswitch-mcp/tools/types'; +import { Metadata, asTextContentResult } from 'hyperswitch-mcp/tools/types'; import { Tool } from '@modelcontextprotocol/sdk/types.js'; -import type { Metadata } from '../../'; import Hyperswitch from 'hyperswitch'; export const metadata: Metadata = { diff --git a/packages/mcp-server/src/tools/accounts/connectors/delete-accounts-connectors.ts b/packages/mcp-server/src/tools/accounts/connectors/delete-accounts-connectors.ts index 96d0e55..5265871 100644 --- a/packages/mcp-server/src/tools/accounts/connectors/delete-accounts-connectors.ts +++ b/packages/mcp-server/src/tools/accounts/connectors/delete-accounts-connectors.ts @@ -1,10 +1,9 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. import { maybeFilter } from 'hyperswitch-mcp/filtering'; -import { asTextContentResult } from 'hyperswitch-mcp/tools/types'; +import { Metadata, asTextContentResult } from 'hyperswitch-mcp/tools/types'; import { Tool } from '@modelcontextprotocol/sdk/types.js'; -import type { Metadata } from '../../'; import Hyperswitch from 'hyperswitch'; export const metadata: Metadata = { diff --git a/packages/mcp-server/src/tools/accounts/connectors/list-accounts-connectors.ts b/packages/mcp-server/src/tools/accounts/connectors/list-accounts-connectors.ts index 24399e0..5f469ee 100644 --- a/packages/mcp-server/src/tools/accounts/connectors/list-accounts-connectors.ts +++ b/packages/mcp-server/src/tools/accounts/connectors/list-accounts-connectors.ts @@ -1,9 +1,8 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import { asTextContentResult } from 'hyperswitch-mcp/tools/types'; +import { Metadata, asTextContentResult } from 'hyperswitch-mcp/tools/types'; import { Tool } from '@modelcontextprotocol/sdk/types.js'; -import type { Metadata } from '../../'; import Hyperswitch from 'hyperswitch'; export const metadata: Metadata = { diff --git a/packages/mcp-server/src/tools/accounts/connectors/retrieve-accounts-connectors.ts b/packages/mcp-server/src/tools/accounts/connectors/retrieve-accounts-connectors.ts index df8e197..2c7895c 100644 --- a/packages/mcp-server/src/tools/accounts/connectors/retrieve-accounts-connectors.ts +++ b/packages/mcp-server/src/tools/accounts/connectors/retrieve-accounts-connectors.ts @@ -1,9 +1,8 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import { asTextContentResult } from 'hyperswitch-mcp/tools/types'; +import { Metadata, asTextContentResult } from 'hyperswitch-mcp/tools/types'; import { Tool } from '@modelcontextprotocol/sdk/types.js'; -import type { Metadata } from '../../'; import Hyperswitch from 'hyperswitch'; export const metadata: Metadata = { diff --git a/packages/mcp-server/src/tools/accounts/connectors/update-accounts-connectors.ts b/packages/mcp-server/src/tools/accounts/connectors/update-accounts-connectors.ts index 1c1b63a..89d5063 100644 --- a/packages/mcp-server/src/tools/accounts/connectors/update-accounts-connectors.ts +++ b/packages/mcp-server/src/tools/accounts/connectors/update-accounts-connectors.ts @@ -1,9 +1,8 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import { asTextContentResult } from 'hyperswitch-mcp/tools/types'; +import { Metadata, asTextContentResult } from 'hyperswitch-mcp/tools/types'; import { Tool } from '@modelcontextprotocol/sdk/types.js'; -import type { Metadata } from '../../'; import Hyperswitch from 'hyperswitch'; export const metadata: Metadata = { diff --git a/packages/mcp-server/src/tools/accounts/create-accounts.ts b/packages/mcp-server/src/tools/accounts/create-accounts.ts index 8f3a981..4571cca 100644 --- a/packages/mcp-server/src/tools/accounts/create-accounts.ts +++ b/packages/mcp-server/src/tools/accounts/create-accounts.ts @@ -1,9 +1,8 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import { asTextContentResult } from 'hyperswitch-mcp/tools/types'; +import { Metadata, asTextContentResult } from 'hyperswitch-mcp/tools/types'; import { Tool } from '@modelcontextprotocol/sdk/types.js'; -import type { Metadata } from '../'; import Hyperswitch from 'hyperswitch'; export const metadata: Metadata = { diff --git a/packages/mcp-server/src/tools/accounts/delete-accounts.ts b/packages/mcp-server/src/tools/accounts/delete-accounts.ts index f998fa4..61c4004 100644 --- a/packages/mcp-server/src/tools/accounts/delete-accounts.ts +++ b/packages/mcp-server/src/tools/accounts/delete-accounts.ts @@ -1,10 +1,9 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. import { maybeFilter } from 'hyperswitch-mcp/filtering'; -import { asTextContentResult } from 'hyperswitch-mcp/tools/types'; +import { Metadata, asTextContentResult } from 'hyperswitch-mcp/tools/types'; import { Tool } from '@modelcontextprotocol/sdk/types.js'; -import type { Metadata } from '../'; import Hyperswitch from 'hyperswitch'; export const metadata: Metadata = { diff --git a/packages/mcp-server/src/tools/accounts/kv-accounts.ts b/packages/mcp-server/src/tools/accounts/kv-accounts.ts index 541d016..6985962 100644 --- a/packages/mcp-server/src/tools/accounts/kv-accounts.ts +++ b/packages/mcp-server/src/tools/accounts/kv-accounts.ts @@ -1,10 +1,9 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. import { maybeFilter } from 'hyperswitch-mcp/filtering'; -import { asTextContentResult } from 'hyperswitch-mcp/tools/types'; +import { Metadata, asTextContentResult } from 'hyperswitch-mcp/tools/types'; import { Tool } from '@modelcontextprotocol/sdk/types.js'; -import type { Metadata } from '../'; import Hyperswitch from 'hyperswitch'; export const metadata: Metadata = { diff --git a/packages/mcp-server/src/tools/accounts/list-payment-methods-accounts.ts b/packages/mcp-server/src/tools/accounts/list-payment-methods-accounts.ts index 77f6b13..5e20bb5 100644 --- a/packages/mcp-server/src/tools/accounts/list-payment-methods-accounts.ts +++ b/packages/mcp-server/src/tools/accounts/list-payment-methods-accounts.ts @@ -1,9 +1,8 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import { asTextContentResult } from 'hyperswitch-mcp/tools/types'; +import { Metadata, asTextContentResult } from 'hyperswitch-mcp/tools/types'; import { Tool } from '@modelcontextprotocol/sdk/types.js'; -import type { Metadata } from '../'; import Hyperswitch from 'hyperswitch'; export const metadata: Metadata = { diff --git a/packages/mcp-server/src/tools/accounts/retrieve-accounts.ts b/packages/mcp-server/src/tools/accounts/retrieve-accounts.ts index 02af03b..aaee373 100644 --- a/packages/mcp-server/src/tools/accounts/retrieve-accounts.ts +++ b/packages/mcp-server/src/tools/accounts/retrieve-accounts.ts @@ -1,9 +1,8 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import { asTextContentResult } from 'hyperswitch-mcp/tools/types'; +import { Metadata, asTextContentResult } from 'hyperswitch-mcp/tools/types'; import { Tool } from '@modelcontextprotocol/sdk/types.js'; -import type { Metadata } from '../'; import Hyperswitch from 'hyperswitch'; export const metadata: Metadata = { diff --git a/packages/mcp-server/src/tools/accounts/update-accounts.ts b/packages/mcp-server/src/tools/accounts/update-accounts.ts index 7f475f8..dd88f21 100644 --- a/packages/mcp-server/src/tools/accounts/update-accounts.ts +++ b/packages/mcp-server/src/tools/accounts/update-accounts.ts @@ -1,9 +1,8 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import { asTextContentResult } from 'hyperswitch-mcp/tools/types'; +import { Metadata, asTextContentResult } from 'hyperswitch-mcp/tools/types'; import { Tool } from '@modelcontextprotocol/sdk/types.js'; -import type { Metadata } from '../'; import Hyperswitch from 'hyperswitch'; export const metadata: Metadata = { diff --git a/packages/mcp-server/src/tools/api-keys/create-api-keys.ts b/packages/mcp-server/src/tools/api-keys/create-api-keys.ts index 9555430..948acca 100644 --- a/packages/mcp-server/src/tools/api-keys/create-api-keys.ts +++ b/packages/mcp-server/src/tools/api-keys/create-api-keys.ts @@ -1,10 +1,9 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. import { maybeFilter } from 'hyperswitch-mcp/filtering'; -import { asTextContentResult } from 'hyperswitch-mcp/tools/types'; +import { Metadata, asTextContentResult } from 'hyperswitch-mcp/tools/types'; import { Tool } from '@modelcontextprotocol/sdk/types.js'; -import type { Metadata } from '../'; import Hyperswitch from 'hyperswitch'; export const metadata: Metadata = { diff --git a/packages/mcp-server/src/tools/api-keys/list-api-keys.ts b/packages/mcp-server/src/tools/api-keys/list-api-keys.ts index 29052ed..9f44371 100644 --- a/packages/mcp-server/src/tools/api-keys/list-api-keys.ts +++ b/packages/mcp-server/src/tools/api-keys/list-api-keys.ts @@ -1,10 +1,9 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. import { maybeFilter } from 'hyperswitch-mcp/filtering'; -import { asTextContentResult } from 'hyperswitch-mcp/tools/types'; +import { Metadata, asTextContentResult } from 'hyperswitch-mcp/tools/types'; import { Tool } from '@modelcontextprotocol/sdk/types.js'; -import type { Metadata } from '../'; import Hyperswitch from 'hyperswitch'; export const metadata: Metadata = { diff --git a/packages/mcp-server/src/tools/api-keys/retrieve-api-keys.ts b/packages/mcp-server/src/tools/api-keys/retrieve-api-keys.ts index 3350b84..3c35b74 100644 --- a/packages/mcp-server/src/tools/api-keys/retrieve-api-keys.ts +++ b/packages/mcp-server/src/tools/api-keys/retrieve-api-keys.ts @@ -1,10 +1,9 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. import { maybeFilter } from 'hyperswitch-mcp/filtering'; -import { asTextContentResult } from 'hyperswitch-mcp/tools/types'; +import { Metadata, asTextContentResult } from 'hyperswitch-mcp/tools/types'; import { Tool } from '@modelcontextprotocol/sdk/types.js'; -import type { Metadata } from '../'; import Hyperswitch from 'hyperswitch'; export const metadata: Metadata = { diff --git a/packages/mcp-server/src/tools/api-keys/revoke-api-keys.ts b/packages/mcp-server/src/tools/api-keys/revoke-api-keys.ts index e495483..744dee4 100644 --- a/packages/mcp-server/src/tools/api-keys/revoke-api-keys.ts +++ b/packages/mcp-server/src/tools/api-keys/revoke-api-keys.ts @@ -1,10 +1,9 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. import { maybeFilter } from 'hyperswitch-mcp/filtering'; -import { asTextContentResult } from 'hyperswitch-mcp/tools/types'; +import { Metadata, asTextContentResult } from 'hyperswitch-mcp/tools/types'; import { Tool } from '@modelcontextprotocol/sdk/types.js'; -import type { Metadata } from '../'; import Hyperswitch from 'hyperswitch'; export const metadata: Metadata = { diff --git a/packages/mcp-server/src/tools/api-keys/update-api-keys.ts b/packages/mcp-server/src/tools/api-keys/update-api-keys.ts index 6229446..da4b53e 100644 --- a/packages/mcp-server/src/tools/api-keys/update-api-keys.ts +++ b/packages/mcp-server/src/tools/api-keys/update-api-keys.ts @@ -1,10 +1,9 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. import { maybeFilter } from 'hyperswitch-mcp/filtering'; -import { asTextContentResult } from 'hyperswitch-mcp/tools/types'; +import { Metadata, asTextContentResult } from 'hyperswitch-mcp/tools/types'; import { Tool } from '@modelcontextprotocol/sdk/types.js'; -import type { Metadata } from '../'; import Hyperswitch from 'hyperswitch'; export const metadata: Metadata = { diff --git a/packages/mcp-server/src/tools/authentication/create-authentication.ts b/packages/mcp-server/src/tools/authentication/create-authentication.ts index 1f2815e..0894194 100644 --- a/packages/mcp-server/src/tools/authentication/create-authentication.ts +++ b/packages/mcp-server/src/tools/authentication/create-authentication.ts @@ -1,9 +1,8 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import { asTextContentResult } from 'hyperswitch-mcp/tools/types'; +import { Metadata, asTextContentResult } from 'hyperswitch-mcp/tools/types'; import { Tool } from '@modelcontextprotocol/sdk/types.js'; -import type { Metadata } from '../'; import Hyperswitch from 'hyperswitch'; export const metadata: Metadata = { diff --git a/packages/mcp-server/src/tools/blocklist/create-blocklist.ts b/packages/mcp-server/src/tools/blocklist/create-blocklist.ts index a7f73bc..71f7b82 100644 --- a/packages/mcp-server/src/tools/blocklist/create-blocklist.ts +++ b/packages/mcp-server/src/tools/blocklist/create-blocklist.ts @@ -1,10 +1,9 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. import { maybeFilter } from 'hyperswitch-mcp/filtering'; -import { asTextContentResult } from 'hyperswitch-mcp/tools/types'; +import { Metadata, asTextContentResult } from 'hyperswitch-mcp/tools/types'; import { Tool } from '@modelcontextprotocol/sdk/types.js'; -import type { Metadata } from '../'; import Hyperswitch from 'hyperswitch'; export const metadata: Metadata = { diff --git a/packages/mcp-server/src/tools/blocklist/delete-blocklist.ts b/packages/mcp-server/src/tools/blocklist/delete-blocklist.ts index 99b92f1..d7c7693 100644 --- a/packages/mcp-server/src/tools/blocklist/delete-blocklist.ts +++ b/packages/mcp-server/src/tools/blocklist/delete-blocklist.ts @@ -1,10 +1,9 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. import { maybeFilter } from 'hyperswitch-mcp/filtering'; -import { asTextContentResult } from 'hyperswitch-mcp/tools/types'; +import { Metadata, asTextContentResult } from 'hyperswitch-mcp/tools/types'; import { Tool } from '@modelcontextprotocol/sdk/types.js'; -import type { Metadata } from '../'; import Hyperswitch from 'hyperswitch'; export const metadata: Metadata = { diff --git a/packages/mcp-server/src/tools/blocklist/retrieve-blocklist.ts b/packages/mcp-server/src/tools/blocklist/retrieve-blocklist.ts index 51d807b..be920af 100644 --- a/packages/mcp-server/src/tools/blocklist/retrieve-blocklist.ts +++ b/packages/mcp-server/src/tools/blocklist/retrieve-blocklist.ts @@ -1,10 +1,9 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. import { maybeFilter } from 'hyperswitch-mcp/filtering'; -import { asTextContentResult } from 'hyperswitch-mcp/tools/types'; +import { Metadata, asTextContentResult } from 'hyperswitch-mcp/tools/types'; import { Tool } from '@modelcontextprotocol/sdk/types.js'; -import type { Metadata } from '../'; import Hyperswitch from 'hyperswitch'; export const metadata: Metadata = { diff --git a/packages/mcp-server/src/tools/blocklist/toggle-blocklist.ts b/packages/mcp-server/src/tools/blocklist/toggle-blocklist.ts index 74664ce..0ec5e7a 100644 --- a/packages/mcp-server/src/tools/blocklist/toggle-blocklist.ts +++ b/packages/mcp-server/src/tools/blocklist/toggle-blocklist.ts @@ -1,10 +1,9 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. import { maybeFilter } from 'hyperswitch-mcp/filtering'; -import { asTextContentResult } from 'hyperswitch-mcp/tools/types'; +import { Metadata, asTextContentResult } from 'hyperswitch-mcp/tools/types'; import { Tool } from '@modelcontextprotocol/sdk/types.js'; -import type { Metadata } from '../'; import Hyperswitch from 'hyperswitch'; export const metadata: Metadata = { diff --git a/packages/mcp-server/src/tools/customers/create-customers.ts b/packages/mcp-server/src/tools/customers/create-customers.ts index eb98e2a..7c3a956 100644 --- a/packages/mcp-server/src/tools/customers/create-customers.ts +++ b/packages/mcp-server/src/tools/customers/create-customers.ts @@ -1,9 +1,8 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import { asTextContentResult } from 'hyperswitch-mcp/tools/types'; +import { Metadata, asTextContentResult } from 'hyperswitch-mcp/tools/types'; import { Tool } from '@modelcontextprotocol/sdk/types.js'; -import type { Metadata } from '../'; import Hyperswitch from 'hyperswitch'; export const metadata: Metadata = { diff --git a/packages/mcp-server/src/tools/customers/delete-customers.ts b/packages/mcp-server/src/tools/customers/delete-customers.ts index c555785..d55bff2 100644 --- a/packages/mcp-server/src/tools/customers/delete-customers.ts +++ b/packages/mcp-server/src/tools/customers/delete-customers.ts @@ -1,10 +1,9 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. import { maybeFilter } from 'hyperswitch-mcp/filtering'; -import { asTextContentResult } from 'hyperswitch-mcp/tools/types'; +import { Metadata, asTextContentResult } from 'hyperswitch-mcp/tools/types'; import { Tool } from '@modelcontextprotocol/sdk/types.js'; -import type { Metadata } from '../'; import Hyperswitch from 'hyperswitch'; export const metadata: Metadata = { diff --git a/packages/mcp-server/src/tools/customers/list-customers.ts b/packages/mcp-server/src/tools/customers/list-customers.ts index 81734a8..ed037ef 100644 --- a/packages/mcp-server/src/tools/customers/list-customers.ts +++ b/packages/mcp-server/src/tools/customers/list-customers.ts @@ -1,10 +1,9 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. import { maybeFilter } from 'hyperswitch-mcp/filtering'; -import { asTextContentResult } from 'hyperswitch-mcp/tools/types'; +import { Metadata, asTextContentResult } from 'hyperswitch-mcp/tools/types'; import { Tool } from '@modelcontextprotocol/sdk/types.js'; -import type { Metadata } from '../'; import Hyperswitch from 'hyperswitch'; export const metadata: Metadata = { diff --git a/packages/mcp-server/src/tools/customers/list-mandates-customers.ts b/packages/mcp-server/src/tools/customers/list-mandates-customers.ts index 7413e85..a54c0bd 100644 --- a/packages/mcp-server/src/tools/customers/list-mandates-customers.ts +++ b/packages/mcp-server/src/tools/customers/list-mandates-customers.ts @@ -1,10 +1,9 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. import { maybeFilter } from 'hyperswitch-mcp/filtering'; -import { asTextContentResult } from 'hyperswitch-mcp/tools/types'; +import { Metadata, asTextContentResult } from 'hyperswitch-mcp/tools/types'; import { Tool } from '@modelcontextprotocol/sdk/types.js'; -import type { Metadata } from '../'; import Hyperswitch from 'hyperswitch'; export const metadata: Metadata = { diff --git a/packages/mcp-server/src/tools/customers/payment-methods/list-customers-payment-methods.ts b/packages/mcp-server/src/tools/customers/payment-methods/list-customers-payment-methods.ts index 2bd58ba..35a337a 100644 --- a/packages/mcp-server/src/tools/customers/payment-methods/list-customers-payment-methods.ts +++ b/packages/mcp-server/src/tools/customers/payment-methods/list-customers-payment-methods.ts @@ -1,9 +1,8 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import { asTextContentResult } from 'hyperswitch-mcp/tools/types'; +import { Metadata, asTextContentResult } from 'hyperswitch-mcp/tools/types'; import { Tool } from '@modelcontextprotocol/sdk/types.js'; -import type { Metadata } from '../../'; import Hyperswitch from 'hyperswitch'; export const metadata: Metadata = { diff --git a/packages/mcp-server/src/tools/customers/payment-methods/list-saved-customers-payment-methods.ts b/packages/mcp-server/src/tools/customers/payment-methods/list-saved-customers-payment-methods.ts index 4cd803c..29a8375 100644 --- a/packages/mcp-server/src/tools/customers/payment-methods/list-saved-customers-payment-methods.ts +++ b/packages/mcp-server/src/tools/customers/payment-methods/list-saved-customers-payment-methods.ts @@ -1,9 +1,8 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import { asTextContentResult } from 'hyperswitch-mcp/tools/types'; +import { Metadata, asTextContentResult } from 'hyperswitch-mcp/tools/types'; import { Tool } from '@modelcontextprotocol/sdk/types.js'; -import type { Metadata } from '../../'; import Hyperswitch from 'hyperswitch'; export const metadata: Metadata = { diff --git a/packages/mcp-server/src/tools/customers/retrieve-customers.ts b/packages/mcp-server/src/tools/customers/retrieve-customers.ts index d260c6b..b9c193d 100644 --- a/packages/mcp-server/src/tools/customers/retrieve-customers.ts +++ b/packages/mcp-server/src/tools/customers/retrieve-customers.ts @@ -1,10 +1,9 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. import { maybeFilter } from 'hyperswitch-mcp/filtering'; -import { asTextContentResult } from 'hyperswitch-mcp/tools/types'; +import { Metadata, asTextContentResult } from 'hyperswitch-mcp/tools/types'; import { Tool } from '@modelcontextprotocol/sdk/types.js'; -import type { Metadata } from '../'; import Hyperswitch from 'hyperswitch'; export const metadata: Metadata = { diff --git a/packages/mcp-server/src/tools/customers/update-customers.ts b/packages/mcp-server/src/tools/customers/update-customers.ts index 4bbd631..d9da0bc 100644 --- a/packages/mcp-server/src/tools/customers/update-customers.ts +++ b/packages/mcp-server/src/tools/customers/update-customers.ts @@ -1,9 +1,8 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import { asTextContentResult } from 'hyperswitch-mcp/tools/types'; +import { Metadata, asTextContentResult } from 'hyperswitch-mcp/tools/types'; import { Tool } from '@modelcontextprotocol/sdk/types.js'; -import type { Metadata } from '../'; import Hyperswitch from 'hyperswitch'; export const metadata: Metadata = { diff --git a/packages/mcp-server/src/tools/disputes/list-disputes.ts b/packages/mcp-server/src/tools/disputes/list-disputes.ts index 3a93efc..5780f63 100644 --- a/packages/mcp-server/src/tools/disputes/list-disputes.ts +++ b/packages/mcp-server/src/tools/disputes/list-disputes.ts @@ -1,10 +1,9 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. import { maybeFilter } from 'hyperswitch-mcp/filtering'; -import { asTextContentResult } from 'hyperswitch-mcp/tools/types'; +import { Metadata, asTextContentResult } from 'hyperswitch-mcp/tools/types'; import { Tool } from '@modelcontextprotocol/sdk/types.js'; -import type { Metadata } from '../'; import Hyperswitch from 'hyperswitch'; export const metadata: Metadata = { diff --git a/packages/mcp-server/src/tools/disputes/retrieve-disputes.ts b/packages/mcp-server/src/tools/disputes/retrieve-disputes.ts index c5cef21..4b26b1e 100644 --- a/packages/mcp-server/src/tools/disputes/retrieve-disputes.ts +++ b/packages/mcp-server/src/tools/disputes/retrieve-disputes.ts @@ -1,10 +1,9 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. import { maybeFilter } from 'hyperswitch-mcp/filtering'; -import { asTextContentResult } from 'hyperswitch-mcp/tools/types'; +import { Metadata, asTextContentResult } from 'hyperswitch-mcp/tools/types'; import { Tool } from '@modelcontextprotocol/sdk/types.js'; -import type { Metadata } from '../'; import Hyperswitch from 'hyperswitch'; export const metadata: Metadata = { diff --git a/packages/mcp-server/src/tools/events/delivery-attempts-events.ts b/packages/mcp-server/src/tools/events/delivery-attempts-events.ts index 558c772..1e833d5 100644 --- a/packages/mcp-server/src/tools/events/delivery-attempts-events.ts +++ b/packages/mcp-server/src/tools/events/delivery-attempts-events.ts @@ -1,10 +1,9 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. import { maybeFilter } from 'hyperswitch-mcp/filtering'; -import { asTextContentResult } from 'hyperswitch-mcp/tools/types'; +import { Metadata, asTextContentResult } from 'hyperswitch-mcp/tools/types'; import { Tool } from '@modelcontextprotocol/sdk/types.js'; -import type { Metadata } from '../'; import Hyperswitch from 'hyperswitch'; export const metadata: Metadata = { diff --git a/packages/mcp-server/src/tools/events/list-events.ts b/packages/mcp-server/src/tools/events/list-events.ts index 8acd1c1..b531675 100644 --- a/packages/mcp-server/src/tools/events/list-events.ts +++ b/packages/mcp-server/src/tools/events/list-events.ts @@ -1,10 +1,9 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. import { maybeFilter } from 'hyperswitch-mcp/filtering'; -import { asTextContentResult } from 'hyperswitch-mcp/tools/types'; +import { Metadata, asTextContentResult } from 'hyperswitch-mcp/tools/types'; import { Tool } from '@modelcontextprotocol/sdk/types.js'; -import type { Metadata } from '../'; import Hyperswitch from 'hyperswitch'; export const metadata: Metadata = { diff --git a/packages/mcp-server/src/tools/events/profile/list-events-profile.ts b/packages/mcp-server/src/tools/events/profile/list-events-profile.ts index 3532a46..23d5bbc 100644 --- a/packages/mcp-server/src/tools/events/profile/list-events-profile.ts +++ b/packages/mcp-server/src/tools/events/profile/list-events-profile.ts @@ -1,10 +1,9 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. import { maybeFilter } from 'hyperswitch-mcp/filtering'; -import { asTextContentResult } from 'hyperswitch-mcp/tools/types'; +import { Metadata, asTextContentResult } from 'hyperswitch-mcp/tools/types'; import { Tool } from '@modelcontextprotocol/sdk/types.js'; -import type { Metadata } from '../../'; import Hyperswitch from 'hyperswitch'; export const metadata: Metadata = { diff --git a/packages/mcp-server/src/tools/events/retry-events.ts b/packages/mcp-server/src/tools/events/retry-events.ts index 202b060..0c28dc0 100644 --- a/packages/mcp-server/src/tools/events/retry-events.ts +++ b/packages/mcp-server/src/tools/events/retry-events.ts @@ -1,10 +1,9 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. import { maybeFilter } from 'hyperswitch-mcp/filtering'; -import { asTextContentResult } from 'hyperswitch-mcp/tools/types'; +import { Metadata, asTextContentResult } from 'hyperswitch-mcp/tools/types'; import { Tool } from '@modelcontextprotocol/sdk/types.js'; -import type { Metadata } from '../'; import Hyperswitch from 'hyperswitch'; export const metadata: Metadata = { diff --git a/packages/mcp-server/src/tools/gsm/create-gsm.ts b/packages/mcp-server/src/tools/gsm/create-gsm.ts index c4466e4..365d4fe 100644 --- a/packages/mcp-server/src/tools/gsm/create-gsm.ts +++ b/packages/mcp-server/src/tools/gsm/create-gsm.ts @@ -1,10 +1,9 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. import { maybeFilter } from 'hyperswitch-mcp/filtering'; -import { asTextContentResult } from 'hyperswitch-mcp/tools/types'; +import { Metadata, asTextContentResult } from 'hyperswitch-mcp/tools/types'; import { Tool } from '@modelcontextprotocol/sdk/types.js'; -import type { Metadata } from '../'; import Hyperswitch from 'hyperswitch'; export const metadata: Metadata = { diff --git a/packages/mcp-server/src/tools/gsm/delete-gsm.ts b/packages/mcp-server/src/tools/gsm/delete-gsm.ts index 6c4f5f5..86ec3f5 100644 --- a/packages/mcp-server/src/tools/gsm/delete-gsm.ts +++ b/packages/mcp-server/src/tools/gsm/delete-gsm.ts @@ -1,10 +1,9 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. import { maybeFilter } from 'hyperswitch-mcp/filtering'; -import { asTextContentResult } from 'hyperswitch-mcp/tools/types'; +import { Metadata, asTextContentResult } from 'hyperswitch-mcp/tools/types'; import { Tool } from '@modelcontextprotocol/sdk/types.js'; -import type { Metadata } from '../'; import Hyperswitch from 'hyperswitch'; export const metadata: Metadata = { diff --git a/packages/mcp-server/src/tools/gsm/retrieve-gsm.ts b/packages/mcp-server/src/tools/gsm/retrieve-gsm.ts index 40fdfaa..d15c48f 100644 --- a/packages/mcp-server/src/tools/gsm/retrieve-gsm.ts +++ b/packages/mcp-server/src/tools/gsm/retrieve-gsm.ts @@ -1,10 +1,9 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. import { maybeFilter } from 'hyperswitch-mcp/filtering'; -import { asTextContentResult } from 'hyperswitch-mcp/tools/types'; +import { Metadata, asTextContentResult } from 'hyperswitch-mcp/tools/types'; import { Tool } from '@modelcontextprotocol/sdk/types.js'; -import type { Metadata } from '../'; import Hyperswitch from 'hyperswitch'; export const metadata: Metadata = { diff --git a/packages/mcp-server/src/tools/gsm/update-gsm.ts b/packages/mcp-server/src/tools/gsm/update-gsm.ts index 836d165..30a8778 100644 --- a/packages/mcp-server/src/tools/gsm/update-gsm.ts +++ b/packages/mcp-server/src/tools/gsm/update-gsm.ts @@ -1,10 +1,9 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. import { maybeFilter } from 'hyperswitch-mcp/filtering'; -import { asTextContentResult } from 'hyperswitch-mcp/tools/types'; +import { Metadata, asTextContentResult } from 'hyperswitch-mcp/tools/types'; import { Tool } from '@modelcontextprotocol/sdk/types.js'; -import type { Metadata } from '../'; import Hyperswitch from 'hyperswitch'; export const metadata: Metadata = { diff --git a/packages/mcp-server/src/tools/mandates/retrieve-mandates.ts b/packages/mcp-server/src/tools/mandates/retrieve-mandates.ts index d162b54..3520a06 100644 --- a/packages/mcp-server/src/tools/mandates/retrieve-mandates.ts +++ b/packages/mcp-server/src/tools/mandates/retrieve-mandates.ts @@ -1,10 +1,9 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. import { maybeFilter } from 'hyperswitch-mcp/filtering'; -import { asTextContentResult } from 'hyperswitch-mcp/tools/types'; +import { Metadata, asTextContentResult } from 'hyperswitch-mcp/tools/types'; import { Tool } from '@modelcontextprotocol/sdk/types.js'; -import type { Metadata } from '../'; import Hyperswitch from 'hyperswitch'; export const metadata: Metadata = { diff --git a/packages/mcp-server/src/tools/mandates/revoke-mandates.ts b/packages/mcp-server/src/tools/mandates/revoke-mandates.ts index 7d772ce..7f91887 100644 --- a/packages/mcp-server/src/tools/mandates/revoke-mandates.ts +++ b/packages/mcp-server/src/tools/mandates/revoke-mandates.ts @@ -1,10 +1,9 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. import { maybeFilter } from 'hyperswitch-mcp/filtering'; -import { asTextContentResult } from 'hyperswitch-mcp/tools/types'; +import { Metadata, asTextContentResult } from 'hyperswitch-mcp/tools/types'; import { Tool } from '@modelcontextprotocol/sdk/types.js'; -import type { Metadata } from '../'; import Hyperswitch from 'hyperswitch'; export const metadata: Metadata = { diff --git a/packages/mcp-server/src/tools/organization/create-organization.ts b/packages/mcp-server/src/tools/organization/create-organization.ts index f30acac..c7ca4b6 100644 --- a/packages/mcp-server/src/tools/organization/create-organization.ts +++ b/packages/mcp-server/src/tools/organization/create-organization.ts @@ -1,10 +1,9 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. import { maybeFilter } from 'hyperswitch-mcp/filtering'; -import { asTextContentResult } from 'hyperswitch-mcp/tools/types'; +import { Metadata, asTextContentResult } from 'hyperswitch-mcp/tools/types'; import { Tool } from '@modelcontextprotocol/sdk/types.js'; -import type { Metadata } from '../'; import Hyperswitch from 'hyperswitch'; export const metadata: Metadata = { diff --git a/packages/mcp-server/src/tools/organization/retrieve-organization.ts b/packages/mcp-server/src/tools/organization/retrieve-organization.ts index 79b5d0a..8cefe77 100644 --- a/packages/mcp-server/src/tools/organization/retrieve-organization.ts +++ b/packages/mcp-server/src/tools/organization/retrieve-organization.ts @@ -1,10 +1,9 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. import { maybeFilter } from 'hyperswitch-mcp/filtering'; -import { asTextContentResult } from 'hyperswitch-mcp/tools/types'; +import { Metadata, asTextContentResult } from 'hyperswitch-mcp/tools/types'; import { Tool } from '@modelcontextprotocol/sdk/types.js'; -import type { Metadata } from '../'; import Hyperswitch from 'hyperswitch'; export const metadata: Metadata = { diff --git a/packages/mcp-server/src/tools/organization/update-organization.ts b/packages/mcp-server/src/tools/organization/update-organization.ts index 686053b..6aacf25 100644 --- a/packages/mcp-server/src/tools/organization/update-organization.ts +++ b/packages/mcp-server/src/tools/organization/update-organization.ts @@ -1,10 +1,9 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. import { maybeFilter } from 'hyperswitch-mcp/filtering'; -import { asTextContentResult } from 'hyperswitch-mcp/tools/types'; +import { Metadata, asTextContentResult } from 'hyperswitch-mcp/tools/types'; import { Tool } from '@modelcontextprotocol/sdk/types.js'; -import type { Metadata } from '../'; import Hyperswitch from 'hyperswitch'; export const metadata: Metadata = { diff --git a/packages/mcp-server/src/tools/payment-link/retrieve-payment-link.ts b/packages/mcp-server/src/tools/payment-link/retrieve-payment-link.ts index a753a1b..f3fb017 100644 --- a/packages/mcp-server/src/tools/payment-link/retrieve-payment-link.ts +++ b/packages/mcp-server/src/tools/payment-link/retrieve-payment-link.ts @@ -1,10 +1,9 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. import { maybeFilter } from 'hyperswitch-mcp/filtering'; -import { asTextContentResult } from 'hyperswitch-mcp/tools/types'; +import { Metadata, asTextContentResult } from 'hyperswitch-mcp/tools/types'; import { Tool } from '@modelcontextprotocol/sdk/types.js'; -import type { Metadata } from '../'; import Hyperswitch from 'hyperswitch'; export const metadata: Metadata = { diff --git a/packages/mcp-server/src/tools/payment-methods/create-payment-methods.ts b/packages/mcp-server/src/tools/payment-methods/create-payment-methods.ts index 003a90f..528aa4f 100644 --- a/packages/mcp-server/src/tools/payment-methods/create-payment-methods.ts +++ b/packages/mcp-server/src/tools/payment-methods/create-payment-methods.ts @@ -1,9 +1,8 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import { asTextContentResult } from 'hyperswitch-mcp/tools/types'; +import { Metadata, asTextContentResult } from 'hyperswitch-mcp/tools/types'; import { Tool } from '@modelcontextprotocol/sdk/types.js'; -import type { Metadata } from '../'; import Hyperswitch from 'hyperswitch'; export const metadata: Metadata = { diff --git a/packages/mcp-server/src/tools/payment-methods/delete-payment-methods.ts b/packages/mcp-server/src/tools/payment-methods/delete-payment-methods.ts index da0a613..8b72063 100644 --- a/packages/mcp-server/src/tools/payment-methods/delete-payment-methods.ts +++ b/packages/mcp-server/src/tools/payment-methods/delete-payment-methods.ts @@ -1,10 +1,9 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. import { maybeFilter } from 'hyperswitch-mcp/filtering'; -import { asTextContentResult } from 'hyperswitch-mcp/tools/types'; +import { Metadata, asTextContentResult } from 'hyperswitch-mcp/tools/types'; import { Tool } from '@modelcontextprotocol/sdk/types.js'; -import type { Metadata } from '../'; import Hyperswitch from 'hyperswitch'; export const metadata: Metadata = { diff --git a/packages/mcp-server/src/tools/payment-methods/retrieve-payment-methods.ts b/packages/mcp-server/src/tools/payment-methods/retrieve-payment-methods.ts index 2ec2f8d..11090c1 100644 --- a/packages/mcp-server/src/tools/payment-methods/retrieve-payment-methods.ts +++ b/packages/mcp-server/src/tools/payment-methods/retrieve-payment-methods.ts @@ -1,9 +1,8 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import { asTextContentResult } from 'hyperswitch-mcp/tools/types'; +import { Metadata, asTextContentResult } from 'hyperswitch-mcp/tools/types'; import { Tool } from '@modelcontextprotocol/sdk/types.js'; -import type { Metadata } from '../'; import Hyperswitch from 'hyperswitch'; export const metadata: Metadata = { diff --git a/packages/mcp-server/src/tools/payment-methods/set-default-payment-methods.ts b/packages/mcp-server/src/tools/payment-methods/set-default-payment-methods.ts index 39e816b..0e35ede 100644 --- a/packages/mcp-server/src/tools/payment-methods/set-default-payment-methods.ts +++ b/packages/mcp-server/src/tools/payment-methods/set-default-payment-methods.ts @@ -1,10 +1,9 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. import { maybeFilter } from 'hyperswitch-mcp/filtering'; -import { asTextContentResult } from 'hyperswitch-mcp/tools/types'; +import { Metadata, asTextContentResult } from 'hyperswitch-mcp/tools/types'; import { Tool } from '@modelcontextprotocol/sdk/types.js'; -import type { Metadata } from '../'; import Hyperswitch from 'hyperswitch'; export const metadata: Metadata = { diff --git a/packages/mcp-server/src/tools/payment-methods/update-payment-methods.ts b/packages/mcp-server/src/tools/payment-methods/update-payment-methods.ts index 44cd0ec..ca82bc3 100644 --- a/packages/mcp-server/src/tools/payment-methods/update-payment-methods.ts +++ b/packages/mcp-server/src/tools/payment-methods/update-payment-methods.ts @@ -1,9 +1,8 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import { asTextContentResult } from 'hyperswitch-mcp/tools/types'; +import { Metadata, asTextContentResult } from 'hyperswitch-mcp/tools/types'; import { Tool } from '@modelcontextprotocol/sdk/types.js'; -import type { Metadata } from '../'; import Hyperswitch from 'hyperswitch'; export const metadata: Metadata = { diff --git a/packages/mcp-server/src/tools/payments/cancel-payments.ts b/packages/mcp-server/src/tools/payments/cancel-payments.ts index a2e92be..a30bd35 100644 --- a/packages/mcp-server/src/tools/payments/cancel-payments.ts +++ b/packages/mcp-server/src/tools/payments/cancel-payments.ts @@ -1,9 +1,8 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import { asTextContentResult } from 'hyperswitch-mcp/tools/types'; +import { Metadata, asTextContentResult } from 'hyperswitch-mcp/tools/types'; import { Tool } from '@modelcontextprotocol/sdk/types.js'; -import type { Metadata } from '../'; import Hyperswitch from 'hyperswitch'; export const metadata: Metadata = { diff --git a/packages/mcp-server/src/tools/payments/capture-payments.ts b/packages/mcp-server/src/tools/payments/capture-payments.ts index 7c75f65..921a122 100644 --- a/packages/mcp-server/src/tools/payments/capture-payments.ts +++ b/packages/mcp-server/src/tools/payments/capture-payments.ts @@ -1,9 +1,8 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import { asTextContentResult } from 'hyperswitch-mcp/tools/types'; +import { Metadata, asTextContentResult } from 'hyperswitch-mcp/tools/types'; import { Tool } from '@modelcontextprotocol/sdk/types.js'; -import type { Metadata } from '../'; import Hyperswitch from 'hyperswitch'; export const metadata: Metadata = { diff --git a/packages/mcp-server/src/tools/payments/complete-authorize-payments.ts b/packages/mcp-server/src/tools/payments/complete-authorize-payments.ts index 7aef82e..b8e2b51 100644 --- a/packages/mcp-server/src/tools/payments/complete-authorize-payments.ts +++ b/packages/mcp-server/src/tools/payments/complete-authorize-payments.ts @@ -1,9 +1,8 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import { asTextContentResult } from 'hyperswitch-mcp/tools/types'; +import { Metadata, asTextContentResult } from 'hyperswitch-mcp/tools/types'; import { Tool } from '@modelcontextprotocol/sdk/types.js'; -import type { Metadata } from '../'; import Hyperswitch from 'hyperswitch'; export const metadata: Metadata = { diff --git a/packages/mcp-server/src/tools/payments/confirm-payments.ts b/packages/mcp-server/src/tools/payments/confirm-payments.ts index 5f7252f..cadf275 100644 --- a/packages/mcp-server/src/tools/payments/confirm-payments.ts +++ b/packages/mcp-server/src/tools/payments/confirm-payments.ts @@ -1,9 +1,8 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import { asTextContentResult } from 'hyperswitch-mcp/tools/types'; +import { Metadata, asTextContentResult } from 'hyperswitch-mcp/tools/types'; import { Tool } from '@modelcontextprotocol/sdk/types.js'; -import type { Metadata } from '../'; import Hyperswitch from 'hyperswitch'; export const metadata: Metadata = { diff --git a/packages/mcp-server/src/tools/payments/create-payments.ts b/packages/mcp-server/src/tools/payments/create-payments.ts index 38a0c2f..7deaad0 100644 --- a/packages/mcp-server/src/tools/payments/create-payments.ts +++ b/packages/mcp-server/src/tools/payments/create-payments.ts @@ -1,9 +1,8 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import { asTextContentResult } from 'hyperswitch-mcp/tools/types'; +import { Metadata, asTextContentResult } from 'hyperswitch-mcp/tools/types'; import { Tool } from '@modelcontextprotocol/sdk/types.js'; -import type { Metadata } from '../'; import Hyperswitch from 'hyperswitch'; export const metadata: Metadata = { diff --git a/packages/mcp-server/src/tools/payments/create-session-token-payments.ts b/packages/mcp-server/src/tools/payments/create-session-token-payments.ts index 9f315b1..03de6ba 100644 --- a/packages/mcp-server/src/tools/payments/create-session-token-payments.ts +++ b/packages/mcp-server/src/tools/payments/create-session-token-payments.ts @@ -1,9 +1,8 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import { asTextContentResult } from 'hyperswitch-mcp/tools/types'; +import { Metadata, asTextContentResult } from 'hyperswitch-mcp/tools/types'; import { Tool } from '@modelcontextprotocol/sdk/types.js'; -import type { Metadata } from '../'; import Hyperswitch from 'hyperswitch'; export const metadata: Metadata = { diff --git a/packages/mcp-server/src/tools/payments/incremental-authorization-payments.ts b/packages/mcp-server/src/tools/payments/incremental-authorization-payments.ts index 19ce37d..506555f 100644 --- a/packages/mcp-server/src/tools/payments/incremental-authorization-payments.ts +++ b/packages/mcp-server/src/tools/payments/incremental-authorization-payments.ts @@ -1,9 +1,8 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import { asTextContentResult } from 'hyperswitch-mcp/tools/types'; +import { Metadata, asTextContentResult } from 'hyperswitch-mcp/tools/types'; import { Tool } from '@modelcontextprotocol/sdk/types.js'; -import type { Metadata } from '../'; import Hyperswitch from 'hyperswitch'; export const metadata: Metadata = { diff --git a/packages/mcp-server/src/tools/payments/list-payments.ts b/packages/mcp-server/src/tools/payments/list-payments.ts index 5875ad9..4d3b517 100644 --- a/packages/mcp-server/src/tools/payments/list-payments.ts +++ b/packages/mcp-server/src/tools/payments/list-payments.ts @@ -1,9 +1,8 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import { asTextContentResult } from 'hyperswitch-mcp/tools/types'; +import { Metadata, asTextContentResult } from 'hyperswitch-mcp/tools/types'; import { Tool } from '@modelcontextprotocol/sdk/types.js'; -import type { Metadata } from '../'; import Hyperswitch from 'hyperswitch'; export const metadata: Metadata = { diff --git a/packages/mcp-server/src/tools/payments/number-3ds/authenticate-payments-number-3ds.ts b/packages/mcp-server/src/tools/payments/number-3ds/authenticate-payments-number-3ds.ts index b8ff255..29984fd 100644 --- a/packages/mcp-server/src/tools/payments/number-3ds/authenticate-payments-number-3ds.ts +++ b/packages/mcp-server/src/tools/payments/number-3ds/authenticate-payments-number-3ds.ts @@ -1,10 +1,9 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. import { maybeFilter } from 'hyperswitch-mcp/filtering'; -import { asTextContentResult } from 'hyperswitch-mcp/tools/types'; +import { Metadata, asTextContentResult } from 'hyperswitch-mcp/tools/types'; import { Tool } from '@modelcontextprotocol/sdk/types.js'; -import type { Metadata } from '../../'; import Hyperswitch from 'hyperswitch'; export const metadata: Metadata = { diff --git a/packages/mcp-server/src/tools/payments/post-session-tokens-payments.ts b/packages/mcp-server/src/tools/payments/post-session-tokens-payments.ts index 60e54c6..f520f0d 100644 --- a/packages/mcp-server/src/tools/payments/post-session-tokens-payments.ts +++ b/packages/mcp-server/src/tools/payments/post-session-tokens-payments.ts @@ -1,9 +1,8 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import { asTextContentResult } from 'hyperswitch-mcp/tools/types'; +import { Metadata, asTextContentResult } from 'hyperswitch-mcp/tools/types'; import { Tool } from '@modelcontextprotocol/sdk/types.js'; -import type { Metadata } from '../'; import Hyperswitch from 'hyperswitch'; export const metadata: Metadata = { diff --git a/packages/mcp-server/src/tools/payments/retrieve-payments.ts b/packages/mcp-server/src/tools/payments/retrieve-payments.ts index 70d012b..2b53846 100644 --- a/packages/mcp-server/src/tools/payments/retrieve-payments.ts +++ b/packages/mcp-server/src/tools/payments/retrieve-payments.ts @@ -1,9 +1,8 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import { asTextContentResult } from 'hyperswitch-mcp/tools/types'; +import { Metadata, asTextContentResult } from 'hyperswitch-mcp/tools/types'; import { Tool } from '@modelcontextprotocol/sdk/types.js'; -import type { Metadata } from '../'; import Hyperswitch from 'hyperswitch'; export const metadata: Metadata = { diff --git a/packages/mcp-server/src/tools/payments/update-metadata-payments.ts b/packages/mcp-server/src/tools/payments/update-metadata-payments.ts index ff82bf5..92a3237 100644 --- a/packages/mcp-server/src/tools/payments/update-metadata-payments.ts +++ b/packages/mcp-server/src/tools/payments/update-metadata-payments.ts @@ -1,10 +1,9 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. import { maybeFilter } from 'hyperswitch-mcp/filtering'; -import { asTextContentResult } from 'hyperswitch-mcp/tools/types'; +import { Metadata, asTextContentResult } from 'hyperswitch-mcp/tools/types'; import { Tool } from '@modelcontextprotocol/sdk/types.js'; -import type { Metadata } from '../'; import Hyperswitch from 'hyperswitch'; export const metadata: Metadata = { diff --git a/packages/mcp-server/src/tools/payments/update-payments.ts b/packages/mcp-server/src/tools/payments/update-payments.ts index 80ae109..4289ee3 100644 --- a/packages/mcp-server/src/tools/payments/update-payments.ts +++ b/packages/mcp-server/src/tools/payments/update-payments.ts @@ -1,9 +1,8 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import { asTextContentResult } from 'hyperswitch-mcp/tools/types'; +import { Metadata, asTextContentResult } from 'hyperswitch-mcp/tools/types'; import { Tool } from '@modelcontextprotocol/sdk/types.js'; -import type { Metadata } from '../'; import Hyperswitch from 'hyperswitch'; export const metadata: Metadata = { diff --git a/packages/mcp-server/src/tools/payouts/cancel-payouts.ts b/packages/mcp-server/src/tools/payouts/cancel-payouts.ts index 9d7246e..fb3d206 100644 --- a/packages/mcp-server/src/tools/payouts/cancel-payouts.ts +++ b/packages/mcp-server/src/tools/payouts/cancel-payouts.ts @@ -1,9 +1,8 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import { asTextContentResult } from 'hyperswitch-mcp/tools/types'; +import { Metadata, asTextContentResult } from 'hyperswitch-mcp/tools/types'; import { Tool } from '@modelcontextprotocol/sdk/types.js'; -import type { Metadata } from '../'; import Hyperswitch from 'hyperswitch'; export const metadata: Metadata = { diff --git a/packages/mcp-server/src/tools/payouts/confirm-payouts.ts b/packages/mcp-server/src/tools/payouts/confirm-payouts.ts index a7147d1..84a3651 100644 --- a/packages/mcp-server/src/tools/payouts/confirm-payouts.ts +++ b/packages/mcp-server/src/tools/payouts/confirm-payouts.ts @@ -1,9 +1,8 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import { asTextContentResult } from 'hyperswitch-mcp/tools/types'; +import { Metadata, asTextContentResult } from 'hyperswitch-mcp/tools/types'; import { Tool } from '@modelcontextprotocol/sdk/types.js'; -import type { Metadata } from '../'; import Hyperswitch from 'hyperswitch'; export const metadata: Metadata = { diff --git a/packages/mcp-server/src/tools/payouts/create-payouts.ts b/packages/mcp-server/src/tools/payouts/create-payouts.ts index e067ec1..0d9e65d 100644 --- a/packages/mcp-server/src/tools/payouts/create-payouts.ts +++ b/packages/mcp-server/src/tools/payouts/create-payouts.ts @@ -1,9 +1,8 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import { asTextContentResult } from 'hyperswitch-mcp/tools/types'; +import { Metadata, asTextContentResult } from 'hyperswitch-mcp/tools/types'; import { Tool } from '@modelcontextprotocol/sdk/types.js'; -import type { Metadata } from '../'; import Hyperswitch from 'hyperswitch'; export const metadata: Metadata = { diff --git a/packages/mcp-server/src/tools/payouts/fulfill-payouts.ts b/packages/mcp-server/src/tools/payouts/fulfill-payouts.ts index 6b80c29..b6ee4fb 100644 --- a/packages/mcp-server/src/tools/payouts/fulfill-payouts.ts +++ b/packages/mcp-server/src/tools/payouts/fulfill-payouts.ts @@ -1,9 +1,8 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import { asTextContentResult } from 'hyperswitch-mcp/tools/types'; +import { Metadata, asTextContentResult } from 'hyperswitch-mcp/tools/types'; import { Tool } from '@modelcontextprotocol/sdk/types.js'; -import type { Metadata } from '../'; import Hyperswitch from 'hyperswitch'; export const metadata: Metadata = { diff --git a/packages/mcp-server/src/tools/payouts/list-filters-payouts.ts b/packages/mcp-server/src/tools/payouts/list-filters-payouts.ts index 086a7e4..ea67442 100644 --- a/packages/mcp-server/src/tools/payouts/list-filters-payouts.ts +++ b/packages/mcp-server/src/tools/payouts/list-filters-payouts.ts @@ -1,10 +1,9 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. import { maybeFilter } from 'hyperswitch-mcp/filtering'; -import { asTextContentResult } from 'hyperswitch-mcp/tools/types'; +import { Metadata, asTextContentResult } from 'hyperswitch-mcp/tools/types'; import { Tool } from '@modelcontextprotocol/sdk/types.js'; -import type { Metadata } from '../'; import Hyperswitch from 'hyperswitch'; export const metadata: Metadata = { diff --git a/packages/mcp-server/src/tools/payouts/list/retrieve-payouts-list.ts b/packages/mcp-server/src/tools/payouts/list/retrieve-payouts-list.ts index f2de6c5..56bb3ef 100644 --- a/packages/mcp-server/src/tools/payouts/list/retrieve-payouts-list.ts +++ b/packages/mcp-server/src/tools/payouts/list/retrieve-payouts-list.ts @@ -1,9 +1,8 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import { asTextContentResult } from 'hyperswitch-mcp/tools/types'; +import { Metadata, asTextContentResult } from 'hyperswitch-mcp/tools/types'; import { Tool } from '@modelcontextprotocol/sdk/types.js'; -import type { Metadata } from '../../'; import Hyperswitch from 'hyperswitch'; export const metadata: Metadata = { diff --git a/packages/mcp-server/src/tools/payouts/list/with-filters-payouts-list.ts b/packages/mcp-server/src/tools/payouts/list/with-filters-payouts-list.ts index c3c6237..8ae214f 100644 --- a/packages/mcp-server/src/tools/payouts/list/with-filters-payouts-list.ts +++ b/packages/mcp-server/src/tools/payouts/list/with-filters-payouts-list.ts @@ -1,9 +1,8 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import { asTextContentResult } from 'hyperswitch-mcp/tools/types'; +import { Metadata, asTextContentResult } from 'hyperswitch-mcp/tools/types'; import { Tool } from '@modelcontextprotocol/sdk/types.js'; -import type { Metadata } from '../../'; import Hyperswitch from 'hyperswitch'; export const metadata: Metadata = { diff --git a/packages/mcp-server/src/tools/payouts/retrieve-payouts.ts b/packages/mcp-server/src/tools/payouts/retrieve-payouts.ts index 3c3747d..7756fd7 100644 --- a/packages/mcp-server/src/tools/payouts/retrieve-payouts.ts +++ b/packages/mcp-server/src/tools/payouts/retrieve-payouts.ts @@ -1,9 +1,8 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import { asTextContentResult } from 'hyperswitch-mcp/tools/types'; +import { Metadata, asTextContentResult } from 'hyperswitch-mcp/tools/types'; import { Tool } from '@modelcontextprotocol/sdk/types.js'; -import type { Metadata } from '../'; import Hyperswitch from 'hyperswitch'; export const metadata: Metadata = { diff --git a/packages/mcp-server/src/tools/payouts/update-payouts.ts b/packages/mcp-server/src/tools/payouts/update-payouts.ts index e56720b..9e7978c 100644 --- a/packages/mcp-server/src/tools/payouts/update-payouts.ts +++ b/packages/mcp-server/src/tools/payouts/update-payouts.ts @@ -1,9 +1,8 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import { asTextContentResult } from 'hyperswitch-mcp/tools/types'; +import { Metadata, asTextContentResult } from 'hyperswitch-mcp/tools/types'; import { Tool } from '@modelcontextprotocol/sdk/types.js'; -import type { Metadata } from '../'; import Hyperswitch from 'hyperswitch'; export const metadata: Metadata = { diff --git a/packages/mcp-server/src/tools/poll/retrieve-status-poll.ts b/packages/mcp-server/src/tools/poll/retrieve-status-poll.ts index e779185..2938192 100644 --- a/packages/mcp-server/src/tools/poll/retrieve-status-poll.ts +++ b/packages/mcp-server/src/tools/poll/retrieve-status-poll.ts @@ -1,10 +1,9 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. import { maybeFilter } from 'hyperswitch-mcp/filtering'; -import { asTextContentResult } from 'hyperswitch-mcp/tools/types'; +import { Metadata, asTextContentResult } from 'hyperswitch-mcp/tools/types'; import { Tool } from '@modelcontextprotocol/sdk/types.js'; -import type { Metadata } from '../'; import Hyperswitch from 'hyperswitch'; export const metadata: Metadata = { diff --git a/packages/mcp-server/src/tools/profile-acquirers/create-profile-acquirers.ts b/packages/mcp-server/src/tools/profile-acquirers/create-profile-acquirers.ts index d18c979..a6ef0fc 100644 --- a/packages/mcp-server/src/tools/profile-acquirers/create-profile-acquirers.ts +++ b/packages/mcp-server/src/tools/profile-acquirers/create-profile-acquirers.ts @@ -1,10 +1,9 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. import { maybeFilter } from 'hyperswitch-mcp/filtering'; -import { asTextContentResult } from 'hyperswitch-mcp/tools/types'; +import { Metadata, asTextContentResult } from 'hyperswitch-mcp/tools/types'; import { Tool } from '@modelcontextprotocol/sdk/types.js'; -import type { Metadata } from '../'; import Hyperswitch from 'hyperswitch'; export const metadata: Metadata = { diff --git a/packages/mcp-server/src/tools/profile-acquirers/update-profile-acquirers.ts b/packages/mcp-server/src/tools/profile-acquirers/update-profile-acquirers.ts index b6e1521..1b78186 100644 --- a/packages/mcp-server/src/tools/profile-acquirers/update-profile-acquirers.ts +++ b/packages/mcp-server/src/tools/profile-acquirers/update-profile-acquirers.ts @@ -1,10 +1,9 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. import { maybeFilter } from 'hyperswitch-mcp/filtering'; -import { asTextContentResult } from 'hyperswitch-mcp/tools/types'; +import { Metadata, asTextContentResult } from 'hyperswitch-mcp/tools/types'; import { Tool } from '@modelcontextprotocol/sdk/types.js'; -import type { Metadata } from '../'; import Hyperswitch from 'hyperswitch'; export const metadata: Metadata = { diff --git a/packages/mcp-server/src/tools/refunds/create-refunds.ts b/packages/mcp-server/src/tools/refunds/create-refunds.ts index 030e969..cd30713 100644 --- a/packages/mcp-server/src/tools/refunds/create-refunds.ts +++ b/packages/mcp-server/src/tools/refunds/create-refunds.ts @@ -1,9 +1,8 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import { asTextContentResult } from 'hyperswitch-mcp/tools/types'; +import { Metadata, asTextContentResult } from 'hyperswitch-mcp/tools/types'; import { Tool } from '@modelcontextprotocol/sdk/types.js'; -import type { Metadata } from '../'; import Hyperswitch from 'hyperswitch'; export const metadata: Metadata = { diff --git a/packages/mcp-server/src/tools/refunds/list-refunds.ts b/packages/mcp-server/src/tools/refunds/list-refunds.ts index eae2ddd..94ce76c 100644 --- a/packages/mcp-server/src/tools/refunds/list-refunds.ts +++ b/packages/mcp-server/src/tools/refunds/list-refunds.ts @@ -1,9 +1,8 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import { asTextContentResult } from 'hyperswitch-mcp/tools/types'; +import { Metadata, asTextContentResult } from 'hyperswitch-mcp/tools/types'; import { Tool } from '@modelcontextprotocol/sdk/types.js'; -import type { Metadata } from '../'; import Hyperswitch from 'hyperswitch'; export const metadata: Metadata = { diff --git a/packages/mcp-server/src/tools/refunds/retrieve-refunds.ts b/packages/mcp-server/src/tools/refunds/retrieve-refunds.ts index 862766b..fb5d3c6 100644 --- a/packages/mcp-server/src/tools/refunds/retrieve-refunds.ts +++ b/packages/mcp-server/src/tools/refunds/retrieve-refunds.ts @@ -1,10 +1,9 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. import { maybeFilter } from 'hyperswitch-mcp/filtering'; -import { asTextContentResult } from 'hyperswitch-mcp/tools/types'; +import { Metadata, asTextContentResult } from 'hyperswitch-mcp/tools/types'; import { Tool } from '@modelcontextprotocol/sdk/types.js'; -import type { Metadata } from '../'; import Hyperswitch from 'hyperswitch'; export const metadata: Metadata = { diff --git a/packages/mcp-server/src/tools/refunds/update-refunds.ts b/packages/mcp-server/src/tools/refunds/update-refunds.ts index ae12d80..464b178 100644 --- a/packages/mcp-server/src/tools/refunds/update-refunds.ts +++ b/packages/mcp-server/src/tools/refunds/update-refunds.ts @@ -1,10 +1,9 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. import { maybeFilter } from 'hyperswitch-mcp/filtering'; -import { asTextContentResult } from 'hyperswitch-mcp/tools/types'; +import { Metadata, asTextContentResult } from 'hyperswitch-mcp/tools/types'; import { Tool } from '@modelcontextprotocol/sdk/types.js'; -import type { Metadata } from '../'; import Hyperswitch from 'hyperswitch'; export const metadata: Metadata = { diff --git a/packages/mcp-server/src/tools/relay/create-relay.ts b/packages/mcp-server/src/tools/relay/create-relay.ts index 71bc1ed..f72f740 100644 --- a/packages/mcp-server/src/tools/relay/create-relay.ts +++ b/packages/mcp-server/src/tools/relay/create-relay.ts @@ -1,10 +1,9 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. import { maybeFilter } from 'hyperswitch-mcp/filtering'; -import { asTextContentResult } from 'hyperswitch-mcp/tools/types'; +import { Metadata, asTextContentResult } from 'hyperswitch-mcp/tools/types'; import { Tool } from '@modelcontextprotocol/sdk/types.js'; -import type { Metadata } from '../'; import Hyperswitch from 'hyperswitch'; export const metadata: Metadata = { diff --git a/packages/mcp-server/src/tools/relay/retrieve-relay.ts b/packages/mcp-server/src/tools/relay/retrieve-relay.ts index bffcea2..9401059 100644 --- a/packages/mcp-server/src/tools/relay/retrieve-relay.ts +++ b/packages/mcp-server/src/tools/relay/retrieve-relay.ts @@ -1,10 +1,9 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. import { maybeFilter } from 'hyperswitch-mcp/filtering'; -import { asTextContentResult } from 'hyperswitch-mcp/tools/types'; +import { Metadata, asTextContentResult } from 'hyperswitch-mcp/tools/types'; import { Tool } from '@modelcontextprotocol/sdk/types.js'; -import type { Metadata } from '../'; import Hyperswitch from 'hyperswitch'; export const metadata: Metadata = { diff --git a/packages/mcp-server/src/tools/routing/activate-routing.ts b/packages/mcp-server/src/tools/routing/activate-routing.ts index 10d68c0..95caccd 100644 --- a/packages/mcp-server/src/tools/routing/activate-routing.ts +++ b/packages/mcp-server/src/tools/routing/activate-routing.ts @@ -1,10 +1,9 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. import { maybeFilter } from 'hyperswitch-mcp/filtering'; -import { asTextContentResult } from 'hyperswitch-mcp/tools/types'; +import { Metadata, asTextContentResult } from 'hyperswitch-mcp/tools/types'; import { Tool } from '@modelcontextprotocol/sdk/types.js'; -import type { Metadata } from '../'; import Hyperswitch from 'hyperswitch'; export const metadata: Metadata = { diff --git a/packages/mcp-server/src/tools/routing/create-routing.ts b/packages/mcp-server/src/tools/routing/create-routing.ts index d7e4ef1..d3914a1 100644 --- a/packages/mcp-server/src/tools/routing/create-routing.ts +++ b/packages/mcp-server/src/tools/routing/create-routing.ts @@ -1,9 +1,8 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import { asTextContentResult } from 'hyperswitch-mcp/tools/types'; +import { Metadata, asTextContentResult } from 'hyperswitch-mcp/tools/types'; import { Tool } from '@modelcontextprotocol/sdk/types.js'; -import type { Metadata } from '../'; import Hyperswitch from 'hyperswitch'; export const metadata: Metadata = { diff --git a/packages/mcp-server/src/tools/routing/deactivate-routing.ts b/packages/mcp-server/src/tools/routing/deactivate-routing.ts index 842464b..0c4c4a4 100644 --- a/packages/mcp-server/src/tools/routing/deactivate-routing.ts +++ b/packages/mcp-server/src/tools/routing/deactivate-routing.ts @@ -1,9 +1,8 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import { asTextContentResult } from 'hyperswitch-mcp/tools/types'; +import { Metadata, asTextContentResult } from 'hyperswitch-mcp/tools/types'; import { Tool } from '@modelcontextprotocol/sdk/types.js'; -import type { Metadata } from '../'; import Hyperswitch from 'hyperswitch'; export const metadata: Metadata = { diff --git a/packages/mcp-server/src/tools/routing/default/profile/retrieve-default-routing-profile.ts b/packages/mcp-server/src/tools/routing/default/profile/retrieve-default-routing-profile.ts index 64fe43e..0c4849e 100644 --- a/packages/mcp-server/src/tools/routing/default/profile/retrieve-default-routing-profile.ts +++ b/packages/mcp-server/src/tools/routing/default/profile/retrieve-default-routing-profile.ts @@ -1,10 +1,9 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. import { maybeFilter } from 'hyperswitch-mcp/filtering'; -import { asTextContentResult } from 'hyperswitch-mcp/tools/types'; +import { Metadata, asTextContentResult } from 'hyperswitch-mcp/tools/types'; import { Tool } from '@modelcontextprotocol/sdk/types.js'; -import type { Metadata } from '../../../'; import Hyperswitch from 'hyperswitch'; export const metadata: Metadata = { diff --git a/packages/mcp-server/src/tools/routing/default/profile/update-default-routing-profile.ts b/packages/mcp-server/src/tools/routing/default/profile/update-default-routing-profile.ts index a43ba05..16f0be3 100644 --- a/packages/mcp-server/src/tools/routing/default/profile/update-default-routing-profile.ts +++ b/packages/mcp-server/src/tools/routing/default/profile/update-default-routing-profile.ts @@ -1,10 +1,9 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. import { maybeFilter } from 'hyperswitch-mcp/filtering'; -import { asTextContentResult } from 'hyperswitch-mcp/tools/types'; +import { Metadata, asTextContentResult } from 'hyperswitch-mcp/tools/types'; import { Tool } from '@modelcontextprotocol/sdk/types.js'; -import type { Metadata } from '../../../'; import Hyperswitch from 'hyperswitch'; export const metadata: Metadata = { diff --git a/packages/mcp-server/src/tools/routing/default/retrieve-routing-default.ts b/packages/mcp-server/src/tools/routing/default/retrieve-routing-default.ts index 682ca24..faa72ad 100644 --- a/packages/mcp-server/src/tools/routing/default/retrieve-routing-default.ts +++ b/packages/mcp-server/src/tools/routing/default/retrieve-routing-default.ts @@ -1,10 +1,9 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. import { maybeFilter } from 'hyperswitch-mcp/filtering'; -import { asTextContentResult } from 'hyperswitch-mcp/tools/types'; +import { Metadata, asTextContentResult } from 'hyperswitch-mcp/tools/types'; import { Tool } from '@modelcontextprotocol/sdk/types.js'; -import type { Metadata } from '../../'; import Hyperswitch from 'hyperswitch'; export const metadata: Metadata = { diff --git a/packages/mcp-server/src/tools/routing/default/update-routing-default.ts b/packages/mcp-server/src/tools/routing/default/update-routing-default.ts index 191f6cd..14ff795 100644 --- a/packages/mcp-server/src/tools/routing/default/update-routing-default.ts +++ b/packages/mcp-server/src/tools/routing/default/update-routing-default.ts @@ -1,10 +1,9 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. import { maybeFilter } from 'hyperswitch-mcp/filtering'; -import { asTextContentResult } from 'hyperswitch-mcp/tools/types'; +import { Metadata, asTextContentResult } from 'hyperswitch-mcp/tools/types'; import { Tool } from '@modelcontextprotocol/sdk/types.js'; -import type { Metadata } from '../../'; import Hyperswitch from 'hyperswitch'; export const metadata: Metadata = { diff --git a/packages/mcp-server/src/tools/routing/list-routing.ts b/packages/mcp-server/src/tools/routing/list-routing.ts index cd8d856..60ca8bf 100644 --- a/packages/mcp-server/src/tools/routing/list-routing.ts +++ b/packages/mcp-server/src/tools/routing/list-routing.ts @@ -1,10 +1,9 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. import { maybeFilter } from 'hyperswitch-mcp/filtering'; -import { asTextContentResult } from 'hyperswitch-mcp/tools/types'; +import { Metadata, asTextContentResult } from 'hyperswitch-mcp/tools/types'; import { Tool } from '@modelcontextprotocol/sdk/types.js'; -import type { Metadata } from '../'; import Hyperswitch from 'hyperswitch'; export const metadata: Metadata = { diff --git a/packages/mcp-server/src/tools/routing/retrieve-active-routing.ts b/packages/mcp-server/src/tools/routing/retrieve-active-routing.ts index 6002d0d..613e5bd 100644 --- a/packages/mcp-server/src/tools/routing/retrieve-active-routing.ts +++ b/packages/mcp-server/src/tools/routing/retrieve-active-routing.ts @@ -1,9 +1,8 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import { asTextContentResult } from 'hyperswitch-mcp/tools/types'; +import { Metadata, asTextContentResult } from 'hyperswitch-mcp/tools/types'; import { Tool } from '@modelcontextprotocol/sdk/types.js'; -import type { Metadata } from '../'; import Hyperswitch from 'hyperswitch'; export const metadata: Metadata = { diff --git a/packages/mcp-server/src/tools/routing/retrieve-routing.ts b/packages/mcp-server/src/tools/routing/retrieve-routing.ts index 0f1bd28..1e5728b 100644 --- a/packages/mcp-server/src/tools/routing/retrieve-routing.ts +++ b/packages/mcp-server/src/tools/routing/retrieve-routing.ts @@ -1,9 +1,8 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import { asTextContentResult } from 'hyperswitch-mcp/tools/types'; +import { Metadata, asTextContentResult } from 'hyperswitch-mcp/tools/types'; import { Tool } from '@modelcontextprotocol/sdk/types.js'; -import type { Metadata } from '../'; import Hyperswitch from 'hyperswitch'; export const metadata: Metadata = { diff --git a/packages/mcp-server/src/tools/three-ds-decision/execute-three-ds-decision.ts b/packages/mcp-server/src/tools/three-ds-decision/execute-three-ds-decision.ts index b92317c..5fea406 100644 --- a/packages/mcp-server/src/tools/three-ds-decision/execute-three-ds-decision.ts +++ b/packages/mcp-server/src/tools/three-ds-decision/execute-three-ds-decision.ts @@ -1,9 +1,8 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import { asTextContentResult } from 'hyperswitch-mcp/tools/types'; +import { Metadata, asTextContentResult } from 'hyperswitch-mcp/tools/types'; import { Tool } from '@modelcontextprotocol/sdk/types.js'; -import type { Metadata } from '../'; import Hyperswitch from 'hyperswitch'; export const metadata: Metadata = { From bb5d6c1a9a216f6bb9c0b80d4e1636ce359e10d6 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 17 Jul 2025 03:05:53 +0000 Subject: [PATCH 07/44] chore(ts): reorder package.json imports --- package.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 31557d7..25c749d 100644 --- a/package.json +++ b/package.json @@ -30,7 +30,6 @@ "@swc/jest": "^0.2.29", "@types/jest": "^29.4.0", "@types/node": "^20.17.6", - "typescript-eslint": "8.31.1", "@typescript-eslint/eslint-plugin": "8.31.1", "@typescript-eslint/parser": "8.31.1", "eslint": "^9.20.1", @@ -44,7 +43,8 @@ "ts-node": "^10.5.0", "tsc-multi": "https://github.com/stainless-api/tsc-multi/releases/download/v1.1.8/tsc-multi.tgz", "tsconfig-paths": "^4.0.0", - "typescript": "5.8.3" + "typescript": "5.8.3", + "typescript-eslint": "8.31.1" }, "imports": { "hyperswitch": ".", From 60e25ff32e3fa9efd1f8eec0358d04119c6b031f Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 17 Jul 2025 03:26:22 +0000 Subject: [PATCH 08/44] chore(mcp): formatting --- packages/mcp-server/src/server.ts | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/packages/mcp-server/src/server.ts b/packages/mcp-server/src/server.ts index bd89239..0818c5c 100644 --- a/packages/mcp-server/src/server.ts +++ b/packages/mcp-server/src/server.ts @@ -28,11 +28,7 @@ export const server = new McpServer( name: 'hyperswitch_api', version: '0.0.1-alpha.1', }, - { - capabilities: { - tools: {}, - }, - }, + { capabilities: { tools: {} } }, ); /** From c80d7e4087257b9b45fc3d53deffec0f5c2c37ac Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 18 Jul 2025 03:05:30 +0000 Subject: [PATCH 09/44] fix(mcp): include required section for top-level properties and support naming transformations --- .../create-accounts-business-profile.ts | 4 +- .../delete-accounts-business-profile.ts | 1 + ...ing-business-profile-accounts-contracts.ts | 2 +- ...ing-business-profile-accounts-contracts.ts | 2 +- ...g-business-profile-accounts-elimination.ts | 1 + ...business-profile-accounts-success-based.ts | 1 + ...business-profile-accounts-success-based.ts | 5 +- .../list-accounts-business-profile.ts | 1 + .../retrieve-accounts-business-profile.ts | 1 + .../update-accounts-business-profile.ts | 4 +- .../connectors/create-accounts-connectors.ts | 3 +- .../connectors/delete-accounts-connectors.ts | 1 + .../connectors/list-accounts-connectors.ts | 1 + .../retrieve-accounts-connectors.ts | 1 + .../connectors/update-accounts-connectors.ts | 3 +- .../src/tools/accounts/create-accounts.ts | 4 +- .../src/tools/accounts/delete-accounts.ts | 1 + .../src/tools/accounts/kv-accounts.ts | 1 + .../accounts/list-payment-methods-accounts.ts | 1 + .../src/tools/accounts/retrieve-accounts.ts | 1 + .../src/tools/accounts/update-accounts.ts | 4 +- .../src/tools/api-keys/create-api-keys.ts | 1 + .../src/tools/api-keys/list-api-keys.ts | 1 + .../src/tools/api-keys/retrieve-api-keys.ts | 1 + .../src/tools/api-keys/revoke-api-keys.ts | 1 + .../src/tools/api-keys/update-api-keys.ts | 1 + .../authentication/create-authentication.ts | 2 +- .../src/tools/blocklist/create-blocklist.ts | 3 + .../src/tools/blocklist/delete-blocklist.ts | 3 + .../src/tools/blocklist/retrieve-blocklist.ts | 1 + .../src/tools/blocklist/toggle-blocklist.ts | 1 + .../src/tools/customers/create-customers.ts | 2 +- .../src/tools/customers/delete-customers.ts | 1 + .../src/tools/customers/list-customers.ts | 3 +- .../customers/list-mandates-customers.ts | 3 +- .../list-customers-payment-methods.ts | 1 + .../list-saved-customers-payment-methods.ts | 1 + .../src/tools/customers/retrieve-customers.ts | 3 +- .../src/tools/customers/update-customers.ts | 2 +- .../src/tools/disputes/list-disputes.ts | 2 +- .../src/tools/disputes/retrieve-disputes.ts | 1 + .../tools/events/delivery-attempts-events.ts | 1 + .../src/tools/events/list-events.ts | 1 + .../events/profile/list-events-profile.ts | 1 + .../src/tools/events/retry-events.ts | 1 + .../mcp-server/src/tools/gsm/create-gsm.ts | 11 ++++ .../mcp-server/src/tools/gsm/delete-gsm.ts | 1 + .../mcp-server/src/tools/gsm/retrieve-gsm.ts | 1 + .../mcp-server/src/tools/gsm/update-gsm.ts | 1 + .../src/tools/mandates/retrieve-mandates.ts | 3 +- .../src/tools/mandates/revoke-mandates.ts | 1 + .../tools/organization/create-organization.ts | 1 + .../organization/retrieve-organization.ts | 1 + .../tools/organization/update-organization.ts | 1 + .../payment-link/retrieve-payment-link.ts | 1 + .../payment-methods/create-payment-methods.ts | 4 +- .../payment-methods/delete-payment-methods.ts | 1 + .../retrieve-payment-methods.ts | 1 + .../set-default-payment-methods.ts | 1 + .../payment-methods/update-payment-methods.ts | 1 + .../src/tools/payments/cancel-payments.ts | 2 +- .../src/tools/payments/capture-payments.ts | 2 +- .../payments/complete-authorize-payments.ts | 4 +- .../src/tools/payments/confirm-payments.ts | 55 +++---------------- .../src/tools/payments/create-payments.ts | 46 +--------------- .../payments/create-session-token-payments.ts | 2 +- .../incremental-authorization-payments.ts | 1 + .../src/tools/payments/list-payments.ts | 1 + .../authenticate-payments-number-3ds.ts | 1 + .../payments/post-session-tokens-payments.ts | 1 + .../src/tools/payments/retrieve-payments.ts | 1 + .../payments/update-metadata-payments.ts | 1 + .../src/tools/payments/update-payments.ts | 55 +++---------------- .../src/tools/payouts/cancel-payouts.ts | 6 +- .../src/tools/payouts/confirm-payouts.ts | 5 +- .../src/tools/payouts/create-payouts.ts | 5 +- .../src/tools/payouts/fulfill-payouts.ts | 6 +- .../src/tools/payouts/list-filters-payouts.ts | 1 + .../payouts/list/retrieve-payouts-list.ts | 1 + .../payouts/list/with-filters-payouts-list.ts | 1 + .../src/tools/payouts/retrieve-payouts.ts | 1 + .../src/tools/payouts/update-payouts.ts | 5 +- .../src/tools/poll/retrieve-status-poll.ts | 1 + .../create-profile-acquirers.ts | 9 +++ .../update-profile-acquirers.ts | 1 + .../src/tools/refunds/create-refunds.ts | 3 +- .../src/tools/refunds/list-refunds.ts | 2 +- .../src/tools/refunds/retrieve-refunds.ts | 3 +- .../src/tools/refunds/update-refunds.ts | 3 +- .../src/tools/relay/create-relay.ts | 1 + .../src/tools/relay/retrieve-relay.ts | 1 + .../src/tools/routing/activate-routing.ts | 1 + .../src/tools/routing/create-routing.ts | 1 + .../src/tools/routing/deactivate-routing.ts | 1 + .../retrieve-default-routing-profile.ts | 1 + .../profile/update-default-routing-profile.ts | 1 + .../default/retrieve-routing-default.ts | 1 + .../routing/default/update-routing-default.ts | 1 + .../src/tools/routing/list-routing.ts | 1 + .../tools/routing/retrieve-active-routing.ts | 1 + .../src/tools/routing/retrieve-routing.ts | 1 + .../execute-three-ds-decision.ts | 2 +- 102 files changed, 150 insertions(+), 200 deletions(-) diff --git a/packages/mcp-server/src/tools/accounts/business-profile/create-accounts-business-profile.ts b/packages/mcp-server/src/tools/accounts/business-profile/create-accounts-business-profile.ts index 05ec61e..e1ecb68 100644 --- a/packages/mcp-server/src/tools/accounts/business-profile/create-accounts-business-profile.ts +++ b/packages/mcp-server/src/tools/accounts/business-profile/create-accounts-business-profile.ts @@ -186,6 +186,7 @@ export const tool: Tool = { $ref: '#/$defs/webhook_details', }, }, + required: ['account_id'], $defs: { authentication_connector_details: { type: 'object', @@ -712,14 +713,12 @@ export const tool: Tool = { description: 'Position of the key-value pair in the UI', }, }, - required: [], }, }, required: ['key', 'value'], }, }, }, - required: [], }, business_payout_link_config: { allOf: [ @@ -754,7 +753,6 @@ export const tool: Tool = { description: 'Primary color to be used in the form represented in hex format', }, }, - required: [], }, static_routing_algorithm: { anyOf: [ diff --git a/packages/mcp-server/src/tools/accounts/business-profile/delete-accounts-business-profile.ts b/packages/mcp-server/src/tools/accounts/business-profile/delete-accounts-business-profile.ts index 19a6d11..bd5a0d7 100644 --- a/packages/mcp-server/src/tools/accounts/business-profile/delete-accounts-business-profile.ts +++ b/packages/mcp-server/src/tools/accounts/business-profile/delete-accounts-business-profile.ts @@ -35,6 +35,7 @@ export const tool: Tool = { 'A jq filter to apply to the response to include certain fields. Consult the output schema in the tool description to see the fields that are available.\n\nFor example: to include only the `name` field in every object of a results array, you can provide ".results[].name".\n\nFor more information, see the [jq documentation](https://jqlang.org/manual/).', }, }, + required: ['account_id', 'profile_id'], }, }; diff --git a/packages/mcp-server/src/tools/accounts/business-profile/dynamic-routing/contracts/toggle-dynamic-routing-business-profile-accounts-contracts.ts b/packages/mcp-server/src/tools/accounts/business-profile/dynamic-routing/contracts/toggle-dynamic-routing-business-profile-accounts-contracts.ts index d91da27..90c1371 100644 --- a/packages/mcp-server/src/tools/accounts/business-profile/dynamic-routing/contracts/toggle-dynamic-routing-business-profile-accounts-contracts.ts +++ b/packages/mcp-server/src/tools/accounts/business-profile/dynamic-routing/contracts/toggle-dynamic-routing-business-profile-accounts-contracts.ts @@ -45,7 +45,6 @@ export const tool: Tool = { enum: ['day', 'month'], }, }, - required: [], }, label_info: { type: 'array', @@ -75,6 +74,7 @@ export const tool: Tool = { 'A jq filter to apply to the response to include certain fields. Consult the output schema in the tool description to see the fields that are available.\n\nFor example: to include only the `name` field in every object of a results array, you can provide ".results[].name".\n\nFor more information, see the [jq documentation](https://jqlang.org/manual/).', }, }, + required: ['account_id', 'profile_id', 'enable'], $defs: { dynamic_routing_features: { type: 'string', diff --git a/packages/mcp-server/src/tools/accounts/business-profile/dynamic-routing/contracts/update-config-dynamic-routing-business-profile-accounts-contracts.ts b/packages/mcp-server/src/tools/accounts/business-profile/dynamic-routing/contracts/update-config-dynamic-routing-business-profile-accounts-contracts.ts index 1dd8f38..ef3baaa 100644 --- a/packages/mcp-server/src/tools/accounts/business-profile/dynamic-routing/contracts/update-config-dynamic-routing-business-profile-accounts-contracts.ts +++ b/packages/mcp-server/src/tools/accounts/business-profile/dynamic-routing/contracts/update-config-dynamic-routing-business-profile-accounts-contracts.ts @@ -46,7 +46,6 @@ export const tool: Tool = { enum: ['day', 'month'], }, }, - required: [], }, label_info: { type: 'array', @@ -76,6 +75,7 @@ export const tool: Tool = { 'A jq filter to apply to the response to include certain fields. Consult the output schema in the tool description to see the fields that are available.\n\nFor example: to include only the `name` field in every object of a results array, you can provide ".results[].name".\n\nFor more information, see the [jq documentation](https://jqlang.org/manual/).', }, }, + required: ['account_id', 'profile_id', 'algorithm_id'], }, }; diff --git a/packages/mcp-server/src/tools/accounts/business-profile/dynamic-routing/elimination/toggle-dynamic-routing-business-profile-accounts-elimination.ts b/packages/mcp-server/src/tools/accounts/business-profile/dynamic-routing/elimination/toggle-dynamic-routing-business-profile-accounts-elimination.ts index 9ff3da5..f3c0bfe 100644 --- a/packages/mcp-server/src/tools/accounts/business-profile/dynamic-routing/elimination/toggle-dynamic-routing-business-profile-accounts-elimination.ts +++ b/packages/mcp-server/src/tools/accounts/business-profile/dynamic-routing/elimination/toggle-dynamic-routing-business-profile-accounts-elimination.ts @@ -38,6 +38,7 @@ export const tool: Tool = { 'A jq filter to apply to the response to include certain fields. Consult the output schema in the tool description to see the fields that are available.\n\nFor example: to include only the `name` field in every object of a results array, you can provide ".results[].name".\n\nFor more information, see the [jq documentation](https://jqlang.org/manual/).', }, }, + required: ['account_id', 'profile_id', 'enable'], $defs: { dynamic_routing_features: { type: 'string', diff --git a/packages/mcp-server/src/tools/accounts/business-profile/dynamic-routing/success-based/toggle-dynamic-routing-business-profile-accounts-success-based.ts b/packages/mcp-server/src/tools/accounts/business-profile/dynamic-routing/success-based/toggle-dynamic-routing-business-profile-accounts-success-based.ts index 05f81de..2086b0f 100644 --- a/packages/mcp-server/src/tools/accounts/business-profile/dynamic-routing/success-based/toggle-dynamic-routing-business-profile-accounts-success-based.ts +++ b/packages/mcp-server/src/tools/accounts/business-profile/dynamic-routing/success-based/toggle-dynamic-routing-business-profile-accounts-success-based.ts @@ -38,6 +38,7 @@ export const tool: Tool = { 'A jq filter to apply to the response to include certain fields. Consult the output schema in the tool description to see the fields that are available.\n\nFor example: to include only the `name` field in every object of a results array, you can provide ".results[].name".\n\nFor more information, see the [jq documentation](https://jqlang.org/manual/).', }, }, + required: ['account_id', 'profile_id', 'enable'], $defs: { dynamic_routing_features: { type: 'string', diff --git a/packages/mcp-server/src/tools/accounts/business-profile/dynamic-routing/success-based/update-config-dynamic-routing-business-profile-accounts-success-based.ts b/packages/mcp-server/src/tools/accounts/business-profile/dynamic-routing/success-based/update-config-dynamic-routing-business-profile-accounts-success-based.ts index aefcf62..d7aee41 100644 --- a/packages/mcp-server/src/tools/accounts/business-profile/dynamic-routing/success-based/update-config-dynamic-routing-business-profile-accounts-success-based.ts +++ b/packages/mcp-server/src/tools/accounts/business-profile/dynamic-routing/success-based/update-config-dynamic-routing-business-profile-accounts-success-based.ts @@ -89,11 +89,9 @@ export const tool: Tool = { type: 'number', }, }, - required: [], }, }, }, - required: [], }, config: { type: 'object', @@ -108,7 +106,6 @@ export const tool: Tool = { type: 'integer', }, }, - required: [], }, default_success_rate: { type: 'number', @@ -130,7 +127,6 @@ export const tool: Tool = { enum: ['merchant', 'global'], }, }, - required: [], }, params: { type: 'array', @@ -145,6 +141,7 @@ export const tool: Tool = { 'A jq filter to apply to the response to include certain fields. Consult the output schema in the tool description to see the fields that are available.\n\nFor example: to include only the `name` field in every object of a results array, you can provide ".results[].name".\n\nFor more information, see the [jq documentation](https://jqlang.org/manual/).', }, }, + required: ['account_id', 'profile_id', 'algorithm_id', 'decision_engine_configs'], $defs: { decision_engine_gateway_wise_extra_score: { type: 'object', diff --git a/packages/mcp-server/src/tools/accounts/business-profile/list-accounts-business-profile.ts b/packages/mcp-server/src/tools/accounts/business-profile/list-accounts-business-profile.ts index 076703a..0de3bfe 100644 --- a/packages/mcp-server/src/tools/accounts/business-profile/list-accounts-business-profile.ts +++ b/packages/mcp-server/src/tools/accounts/business-profile/list-accounts-business-profile.ts @@ -25,6 +25,7 @@ export const tool: Tool = { type: 'string', }, }, + required: ['account_id'], }, }; diff --git a/packages/mcp-server/src/tools/accounts/business-profile/retrieve-accounts-business-profile.ts b/packages/mcp-server/src/tools/accounts/business-profile/retrieve-accounts-business-profile.ts index 7809ab3..ab1fc40 100644 --- a/packages/mcp-server/src/tools/accounts/business-profile/retrieve-accounts-business-profile.ts +++ b/packages/mcp-server/src/tools/accounts/business-profile/retrieve-accounts-business-profile.ts @@ -28,6 +28,7 @@ export const tool: Tool = { type: 'string', }, }, + required: ['account_id', 'profile_id'], }, }; diff --git a/packages/mcp-server/src/tools/accounts/business-profile/update-accounts-business-profile.ts b/packages/mcp-server/src/tools/accounts/business-profile/update-accounts-business-profile.ts index 1536ceb..8acce35 100644 --- a/packages/mcp-server/src/tools/accounts/business-profile/update-accounts-business-profile.ts +++ b/packages/mcp-server/src/tools/accounts/business-profile/update-accounts-business-profile.ts @@ -189,6 +189,7 @@ export const tool: Tool = { $ref: '#/$defs/webhook_details', }, }, + required: ['account_id', 'profile_id'], $defs: { authentication_connector_details: { type: 'object', @@ -715,14 +716,12 @@ export const tool: Tool = { description: 'Position of the key-value pair in the UI', }, }, - required: [], }, }, required: ['key', 'value'], }, }, }, - required: [], }, business_payout_link_config: { allOf: [ @@ -757,7 +756,6 @@ export const tool: Tool = { description: 'Primary color to be used in the form represented in hex format', }, }, - required: [], }, static_routing_algorithm: { anyOf: [ diff --git a/packages/mcp-server/src/tools/accounts/connectors/create-accounts-connectors.ts b/packages/mcp-server/src/tools/accounts/connectors/create-accounts-connectors.ts index 09bd032..7a4b306 100644 --- a/packages/mcp-server/src/tools/accounts/connectors/create-accounts-connectors.ts +++ b/packages/mcp-server/src/tools/accounts/connectors/create-accounts-connectors.ts @@ -105,6 +105,7 @@ export const tool: Tool = { 'A boolean value to indicate if the connector is in Test mode. By default, its value is false.', }, }, + required: ['account_id', 'connector_name', 'connector_type'], $defs: { connector: { type: 'string', @@ -747,7 +748,6 @@ export const tool: Tool = { description: 'Metadata is useful for storing additional, unstructured information on an object.', }, }, - required: [], }, connector_wallet_details: { type: 'object', @@ -775,7 +775,6 @@ export const tool: Tool = { description: 'This field contains the Samsung Pay certificates and credentials', }, }, - required: [], }, merchant_connector_webhook_details: { type: 'object', diff --git a/packages/mcp-server/src/tools/accounts/connectors/delete-accounts-connectors.ts b/packages/mcp-server/src/tools/accounts/connectors/delete-accounts-connectors.ts index 5265871..aad1fec 100644 --- a/packages/mcp-server/src/tools/accounts/connectors/delete-accounts-connectors.ts +++ b/packages/mcp-server/src/tools/accounts/connectors/delete-accounts-connectors.ts @@ -35,6 +35,7 @@ export const tool: Tool = { 'A jq filter to apply to the response to include certain fields. Consult the output schema in the tool description to see the fields that are available.\n\nFor example: to include only the `name` field in every object of a results array, you can provide ".results[].name".\n\nFor more information, see the [jq documentation](https://jqlang.org/manual/).', }, }, + required: ['account_id', 'merchant_connector_id'], }, }; diff --git a/packages/mcp-server/src/tools/accounts/connectors/list-accounts-connectors.ts b/packages/mcp-server/src/tools/accounts/connectors/list-accounts-connectors.ts index 5f469ee..69772db 100644 --- a/packages/mcp-server/src/tools/accounts/connectors/list-accounts-connectors.ts +++ b/packages/mcp-server/src/tools/accounts/connectors/list-accounts-connectors.ts @@ -25,6 +25,7 @@ export const tool: Tool = { type: 'string', }, }, + required: ['account_id'], }, }; diff --git a/packages/mcp-server/src/tools/accounts/connectors/retrieve-accounts-connectors.ts b/packages/mcp-server/src/tools/accounts/connectors/retrieve-accounts-connectors.ts index 2c7895c..ca4eac6 100644 --- a/packages/mcp-server/src/tools/accounts/connectors/retrieve-accounts-connectors.ts +++ b/packages/mcp-server/src/tools/accounts/connectors/retrieve-accounts-connectors.ts @@ -28,6 +28,7 @@ export const tool: Tool = { type: 'string', }, }, + required: ['account_id', 'merchant_connector_id'], }, }; diff --git a/packages/mcp-server/src/tools/accounts/connectors/update-accounts-connectors.ts b/packages/mcp-server/src/tools/accounts/connectors/update-accounts-connectors.ts index 89d5063..ffc599a 100644 --- a/packages/mcp-server/src/tools/accounts/connectors/update-accounts-connectors.ts +++ b/packages/mcp-server/src/tools/accounts/connectors/update-accounts-connectors.ts @@ -85,6 +85,7 @@ export const tool: Tool = { 'A boolean value to indicate if the connector is in Test mode. By default, its value is false.', }, }, + required: ['account_id', 'merchant_connector_id', 'connector_type', 'status'], $defs: { connector_type: { type: 'string', @@ -365,7 +366,6 @@ export const tool: Tool = { description: 'Metadata is useful for storing additional, unstructured information on an object.', }, }, - required: [], }, connector_wallet_details: { type: 'object', @@ -393,7 +393,6 @@ export const tool: Tool = { description: 'This field contains the Samsung Pay certificates and credentials', }, }, - required: [], }, merchant_connector_webhook_details: { type: 'object', diff --git a/packages/mcp-server/src/tools/accounts/create-accounts.ts b/packages/mcp-server/src/tools/accounts/create-accounts.ts index 4571cca..4fe9950 100644 --- a/packages/mcp-server/src/tools/accounts/create-accounts.ts +++ b/packages/mcp-server/src/tools/accounts/create-accounts.ts @@ -101,6 +101,7 @@ export const tool: Tool = { $ref: '#/$defs/webhook_details', }, }, + required: ['merchant_id'], $defs: { merchant_details: { type: 'object', @@ -141,7 +142,6 @@ export const tool: Tool = { description: 'The business website of the merchant', }, }, - required: [], }, address_details: { type: 'object', @@ -184,7 +184,6 @@ export const tool: Tool = { description: 'The zip/postal code for the address', }, }, - required: [], }, country_alpha2: { type: 'string', @@ -980,7 +979,6 @@ export const tool: Tool = { description: 'Primary color to be used in the form represented in hex format', }, }, - required: [], }, primary_business_details: { type: 'object', diff --git a/packages/mcp-server/src/tools/accounts/delete-accounts.ts b/packages/mcp-server/src/tools/accounts/delete-accounts.ts index 61c4004..85a5f92 100644 --- a/packages/mcp-server/src/tools/accounts/delete-accounts.ts +++ b/packages/mcp-server/src/tools/accounts/delete-accounts.ts @@ -32,6 +32,7 @@ export const tool: Tool = { 'A jq filter to apply to the response to include certain fields. Consult the output schema in the tool description to see the fields that are available.\n\nFor example: to include only the `name` field in every object of a results array, you can provide ".results[].name".\n\nFor more information, see the [jq documentation](https://jqlang.org/manual/).', }, }, + required: ['account_id'], }, }; diff --git a/packages/mcp-server/src/tools/accounts/kv-accounts.ts b/packages/mcp-server/src/tools/accounts/kv-accounts.ts index 6985962..5d03a97 100644 --- a/packages/mcp-server/src/tools/accounts/kv-accounts.ts +++ b/packages/mcp-server/src/tools/accounts/kv-accounts.ts @@ -36,6 +36,7 @@ export const tool: Tool = { 'A jq filter to apply to the response to include certain fields. Consult the output schema in the tool description to see the fields that are available.\n\nFor example: to include only the `name` field in every object of a results array, you can provide ".results[].name".\n\nFor more information, see the [jq documentation](https://jqlang.org/manual/).', }, }, + required: ['account_id', 'kv_enabled'], }, }; diff --git a/packages/mcp-server/src/tools/accounts/list-payment-methods-accounts.ts b/packages/mcp-server/src/tools/accounts/list-payment-methods-accounts.ts index 5e20bb5..6eb455a 100644 --- a/packages/mcp-server/src/tools/accounts/list-payment-methods-accounts.ts +++ b/packages/mcp-server/src/tools/accounts/list-payment-methods-accounts.ts @@ -64,6 +64,7 @@ export const tool: Tool = { description: 'Indicates whether the payment method is eligible for recurring payments', }, }, + required: [], $defs: { country_alpha2: { type: 'string', diff --git a/packages/mcp-server/src/tools/accounts/retrieve-accounts.ts b/packages/mcp-server/src/tools/accounts/retrieve-accounts.ts index aaee373..090e54b 100644 --- a/packages/mcp-server/src/tools/accounts/retrieve-accounts.ts +++ b/packages/mcp-server/src/tools/accounts/retrieve-accounts.ts @@ -25,6 +25,7 @@ export const tool: Tool = { type: 'string', }, }, + required: ['account_id'], }, }; diff --git a/packages/mcp-server/src/tools/accounts/update-accounts.ts b/packages/mcp-server/src/tools/accounts/update-accounts.ts index dd88f21..b55f20a 100644 --- a/packages/mcp-server/src/tools/accounts/update-accounts.ts +++ b/packages/mcp-server/src/tools/accounts/update-accounts.ts @@ -98,6 +98,7 @@ export const tool: Tool = { $ref: '#/$defs/webhook_details', }, }, + required: ['account_id', 'merchant_id'], $defs: { merchant_details: { type: 'object', @@ -138,7 +139,6 @@ export const tool: Tool = { description: 'The business website of the merchant', }, }, - required: [], }, address_details: { type: 'object', @@ -181,7 +181,6 @@ export const tool: Tool = { description: 'The zip/postal code for the address', }, }, - required: [], }, country_alpha2: { type: 'string', @@ -977,7 +976,6 @@ export const tool: Tool = { description: 'Primary color to be used in the form represented in hex format', }, }, - required: [], }, primary_business_details: { type: 'object', diff --git a/packages/mcp-server/src/tools/api-keys/create-api-keys.ts b/packages/mcp-server/src/tools/api-keys/create-api-keys.ts index 948acca..9be5aa6 100644 --- a/packages/mcp-server/src/tools/api-keys/create-api-keys.ts +++ b/packages/mcp-server/src/tools/api-keys/create-api-keys.ts @@ -43,6 +43,7 @@ export const tool: Tool = { 'A jq filter to apply to the response to include certain fields. Consult the output schema in the tool description to see the fields that are available.\n\nFor example: to include only the `name` field in every object of a results array, you can provide ".results[].name".\n\nFor more information, see the [jq documentation](https://jqlang.org/manual/).', }, }, + required: ['merchant_id', 'expiration', 'name'], $defs: { api_key_expiration: { anyOf: [ diff --git a/packages/mcp-server/src/tools/api-keys/list-api-keys.ts b/packages/mcp-server/src/tools/api-keys/list-api-keys.ts index 9f44371..f1ebcbf 100644 --- a/packages/mcp-server/src/tools/api-keys/list-api-keys.ts +++ b/packages/mcp-server/src/tools/api-keys/list-api-keys.ts @@ -40,6 +40,7 @@ export const tool: Tool = { 'A jq filter to apply to the response to include certain fields. Consult the output schema in the tool description to see the fields that are available.\n\nFor example: to include only the `name` field in every object of a results array, you can provide ".results[].name".\n\nFor more information, see the [jq documentation](https://jqlang.org/manual/).', }, }, + required: ['merchant_id'], }, }; diff --git a/packages/mcp-server/src/tools/api-keys/retrieve-api-keys.ts b/packages/mcp-server/src/tools/api-keys/retrieve-api-keys.ts index 3c35b74..f43aa8a 100644 --- a/packages/mcp-server/src/tools/api-keys/retrieve-api-keys.ts +++ b/packages/mcp-server/src/tools/api-keys/retrieve-api-keys.ts @@ -35,6 +35,7 @@ export const tool: Tool = { 'A jq filter to apply to the response to include certain fields. Consult the output schema in the tool description to see the fields that are available.\n\nFor example: to include only the `name` field in every object of a results array, you can provide ".results[].name".\n\nFor more information, see the [jq documentation](https://jqlang.org/manual/).', }, }, + required: ['merchant_id', 'key_id'], }, }; diff --git a/packages/mcp-server/src/tools/api-keys/revoke-api-keys.ts b/packages/mcp-server/src/tools/api-keys/revoke-api-keys.ts index 744dee4..003106b 100644 --- a/packages/mcp-server/src/tools/api-keys/revoke-api-keys.ts +++ b/packages/mcp-server/src/tools/api-keys/revoke-api-keys.ts @@ -35,6 +35,7 @@ export const tool: Tool = { 'A jq filter to apply to the response to include certain fields. Consult the output schema in the tool description to see the fields that are available.\n\nFor example: to include only the `name` field in every object of a results array, you can provide ".results[].name".\n\nFor more information, see the [jq documentation](https://jqlang.org/manual/).', }, }, + required: ['merchant_id', 'key_id'], }, }; diff --git a/packages/mcp-server/src/tools/api-keys/update-api-keys.ts b/packages/mcp-server/src/tools/api-keys/update-api-keys.ts index da4b53e..919fda4 100644 --- a/packages/mcp-server/src/tools/api-keys/update-api-keys.ts +++ b/packages/mcp-server/src/tools/api-keys/update-api-keys.ts @@ -46,6 +46,7 @@ export const tool: Tool = { 'A jq filter to apply to the response to include certain fields. Consult the output schema in the tool description to see the fields that are available.\n\nFor example: to include only the `name` field in every object of a results array, you can provide ".results[].name".\n\nFor more information, see the [jq documentation](https://jqlang.org/manual/).', }, }, + required: ['merchant_id', 'key_id'], $defs: { api_key_expiration: { anyOf: [ diff --git a/packages/mcp-server/src/tools/authentication/create-authentication.ts b/packages/mcp-server/src/tools/authentication/create-authentication.ts index 0894194..772a281 100644 --- a/packages/mcp-server/src/tools/authentication/create-authentication.ts +++ b/packages/mcp-server/src/tools/authentication/create-authentication.ts @@ -57,6 +57,7 @@ export const tool: Tool = { description: 'The URL to which the user should be redirected after authentication.', }, }, + required: ['amount', 'currency'], $defs: { currency: { type: 'string', @@ -241,7 +242,6 @@ export const tool: Tool = { description: 'The merchant id of the card.', }, }, - required: [], }, authentication_connectors: { type: 'string', diff --git a/packages/mcp-server/src/tools/blocklist/create-blocklist.ts b/packages/mcp-server/src/tools/blocklist/create-blocklist.ts index 71f7b82..22c1771 100644 --- a/packages/mcp-server/src/tools/blocklist/create-blocklist.ts +++ b/packages/mcp-server/src/tools/blocklist/create-blocklist.ts @@ -33,6 +33,7 @@ export const tool: Tool = { enum: ['card_bin'], }, }, + required: ['data', 'type'], }, { type: 'object', @@ -45,6 +46,7 @@ export const tool: Tool = { enum: ['fingerprint'], }, }, + required: ['data', 'type'], }, { type: 'object', @@ -57,6 +59,7 @@ export const tool: Tool = { enum: ['extended_card_bin'], }, }, + required: ['data', 'type'], }, ], properties: { diff --git a/packages/mcp-server/src/tools/blocklist/delete-blocklist.ts b/packages/mcp-server/src/tools/blocklist/delete-blocklist.ts index d7c7693..acfd22f 100644 --- a/packages/mcp-server/src/tools/blocklist/delete-blocklist.ts +++ b/packages/mcp-server/src/tools/blocklist/delete-blocklist.ts @@ -33,6 +33,7 @@ export const tool: Tool = { enum: ['card_bin'], }, }, + required: ['data', 'type'], }, { type: 'object', @@ -45,6 +46,7 @@ export const tool: Tool = { enum: ['fingerprint'], }, }, + required: ['data', 'type'], }, { type: 'object', @@ -57,6 +59,7 @@ export const tool: Tool = { enum: ['extended_card_bin'], }, }, + required: ['data', 'type'], }, ], properties: { diff --git a/packages/mcp-server/src/tools/blocklist/retrieve-blocklist.ts b/packages/mcp-server/src/tools/blocklist/retrieve-blocklist.ts index be920af..12551cd 100644 --- a/packages/mcp-server/src/tools/blocklist/retrieve-blocklist.ts +++ b/packages/mcp-server/src/tools/blocklist/retrieve-blocklist.ts @@ -32,6 +32,7 @@ export const tool: Tool = { 'A jq filter to apply to the response to include certain fields. Consult the output schema in the tool description to see the fields that are available.\n\nFor example: to include only the `name` field in every object of a results array, you can provide ".results[].name".\n\nFor more information, see the [jq documentation](https://jqlang.org/manual/).', }, }, + required: ['data_kind'], $defs: { blocklist_data_kind: { type: 'string', diff --git a/packages/mcp-server/src/tools/blocklist/toggle-blocklist.ts b/packages/mcp-server/src/tools/blocklist/toggle-blocklist.ts index 0ec5e7a..f0d202b 100644 --- a/packages/mcp-server/src/tools/blocklist/toggle-blocklist.ts +++ b/packages/mcp-server/src/tools/blocklist/toggle-blocklist.ts @@ -33,6 +33,7 @@ export const tool: Tool = { 'A jq filter to apply to the response to include certain fields. Consult the output schema in the tool description to see the fields that are available.\n\nFor example: to include only the `name` field in every object of a results array, you can provide ".results[].name".\n\nFor more information, see the [jq documentation](https://jqlang.org/manual/).', }, }, + required: ['status'], }, }; diff --git a/packages/mcp-server/src/tools/customers/create-customers.ts b/packages/mcp-server/src/tools/customers/create-customers.ts index 7c3a956..59087b7 100644 --- a/packages/mcp-server/src/tools/customers/create-customers.ts +++ b/packages/mcp-server/src/tools/customers/create-customers.ts @@ -55,6 +55,7 @@ export const tool: Tool = { description: 'The country code for the customer phone number', }, }, + required: [], $defs: { address_details: { type: 'object', @@ -97,7 +98,6 @@ export const tool: Tool = { description: 'The zip/postal code for the address', }, }, - required: [], }, country_alpha2: { type: 'string', diff --git a/packages/mcp-server/src/tools/customers/delete-customers.ts b/packages/mcp-server/src/tools/customers/delete-customers.ts index d55bff2..13f923c 100644 --- a/packages/mcp-server/src/tools/customers/delete-customers.ts +++ b/packages/mcp-server/src/tools/customers/delete-customers.ts @@ -32,6 +32,7 @@ export const tool: Tool = { 'A jq filter to apply to the response to include certain fields. Consult the output schema in the tool description to see the fields that are available.\n\nFor example: to include only the `name` field in every object of a results array, you can provide ".results[].name".\n\nFor more information, see the [jq documentation](https://jqlang.org/manual/).', }, }, + required: ['customer_id'], }, }; diff --git a/packages/mcp-server/src/tools/customers/list-customers.ts b/packages/mcp-server/src/tools/customers/list-customers.ts index ed037ef..a9d0f96 100644 --- a/packages/mcp-server/src/tools/customers/list-customers.ts +++ b/packages/mcp-server/src/tools/customers/list-customers.ts @@ -18,7 +18,7 @@ export const metadata: Metadata = { export const tool: Tool = { name: 'list_customers', description: - "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\nLists all the customers for a particular merchant id.\n\n# Response Schema\n```json\n{\n type: 'array',\n items: {\n $ref: '#/$defs/customer'\n },\n $defs: {\n customer: {\n type: 'object',\n properties: {\n created_at: {\n type: 'string',\n description: 'A timestamp (ISO 8601 code) that determines when the customer was created',\n format: 'date-time'\n },\n customer_id: {\n type: 'string',\n description: 'The identifier for the customer object'\n },\n address: {\n $ref: '#/$defs/address_details'\n },\n default_payment_method_id: {\n type: 'string',\n description: 'The identifier for the default payment method.'\n },\n description: {\n type: 'string',\n description: 'An arbitrary string that you can attach to a customer object.'\n },\n email: {\n type: 'string',\n description: 'The customer\\'s email address'\n },\n metadata: {\n type: 'object',\n description: 'You can specify up to 50 keys, with key names up to 40 characters long and values up to 500\\ncharacters long. Metadata is useful for storing additional, structured information on an\\nobject.'\n },\n name: {\n type: 'string',\n description: 'The customer\\'s name'\n },\n phone: {\n type: 'string',\n description: 'The customer\\'s phone number'\n },\n phone_country_code: {\n type: 'string',\n description: 'The country code for the customer phone number'\n }\n },\n required: [ 'created_at',\n 'customer_id'\n ]\n },\n address_details: {\n type: 'object',\n description: 'Address details',\n properties: {\n city: {\n type: 'string',\n description: 'The city, district, suburb, town, or village of the address.'\n },\n country: {\n $ref: '#/$defs/country_alpha2'\n },\n first_name: {\n type: 'string',\n description: 'The first name for the address'\n },\n last_name: {\n type: 'string',\n description: 'The last name for the address'\n },\n line1: {\n type: 'string',\n description: 'The first line of the street address or P.O. Box.'\n },\n line2: {\n type: 'string',\n description: 'The second line of the street address or P.O. Box (e.g., apartment, suite, unit, or building).'\n },\n line3: {\n type: 'string',\n description: 'The third line of the street address, if applicable.'\n },\n state: {\n type: 'string',\n description: 'The address state'\n },\n zip: {\n type: 'string',\n description: 'The zip/postal code for the address'\n }\n },\n required: []\n },\n country_alpha2: {\n type: 'string',\n enum: [ 'AF',\n 'AX',\n 'AL',\n 'DZ',\n 'AS',\n 'AD',\n 'AO',\n 'AI',\n 'AQ',\n 'AG',\n 'AR',\n 'AM',\n 'AW',\n 'AU',\n 'AT',\n 'AZ',\n 'BS',\n 'BH',\n 'BD',\n 'BB',\n 'BY',\n 'BE',\n 'BZ',\n 'BJ',\n 'BM',\n 'BT',\n 'BO',\n 'BQ',\n 'BA',\n 'BW',\n 'BV',\n 'BR',\n 'IO',\n 'BN',\n 'BG',\n 'BF',\n 'BI',\n 'KH',\n 'CM',\n 'CA',\n 'CV',\n 'KY',\n 'CF',\n 'TD',\n 'CL',\n 'CN',\n 'CX',\n 'CC',\n 'CO',\n 'KM',\n 'CG',\n 'CD',\n 'CK',\n 'CR',\n 'CI',\n 'HR',\n 'CU',\n 'CW',\n 'CY',\n 'CZ',\n 'DK',\n 'DJ',\n 'DM',\n 'DO',\n 'EC',\n 'EG',\n 'SV',\n 'GQ',\n 'ER',\n 'EE',\n 'ET',\n 'FK',\n 'FO',\n 'FJ',\n 'FI',\n 'FR',\n 'GF',\n 'PF',\n 'TF',\n 'GA',\n 'GM',\n 'GE',\n 'DE',\n 'GH',\n 'GI',\n 'GR',\n 'GL',\n 'GD',\n 'GP',\n 'GU',\n 'GT',\n 'GG',\n 'GN',\n 'GW',\n 'GY',\n 'HT',\n 'HM',\n 'VA',\n 'HN',\n 'HK',\n 'HU',\n 'IS',\n 'IN',\n 'ID',\n 'IR',\n 'IQ',\n 'IE',\n 'IM',\n 'IL',\n 'IT',\n 'JM',\n 'JP',\n 'JE',\n 'JO',\n 'KZ',\n 'KE',\n 'KI',\n 'KP',\n 'KR',\n 'KW',\n 'KG',\n 'LA',\n 'LV',\n 'LB',\n 'LS',\n 'LR',\n 'LY',\n 'LI',\n 'LT',\n 'LU',\n 'MO',\n 'MK',\n 'MG',\n 'MW',\n 'MY',\n 'MV',\n 'ML',\n 'MT',\n 'MH',\n 'MQ',\n 'MR',\n 'MU',\n 'YT',\n 'MX',\n 'FM',\n 'MD',\n 'MC',\n 'MN',\n 'ME',\n 'MS',\n 'MA',\n 'MZ',\n 'MM',\n 'NA',\n 'NR',\n 'NP',\n 'NL',\n 'NC',\n 'NZ',\n 'NI',\n 'NE',\n 'NG',\n 'NU',\n 'NF',\n 'MP',\n 'NO',\n 'OM',\n 'PK',\n 'PW',\n 'PS',\n 'PA',\n 'PG',\n 'PY',\n 'PE',\n 'PH',\n 'PN',\n 'PL',\n 'PT',\n 'PR',\n 'QA',\n 'RE',\n 'RO',\n 'RU',\n 'RW',\n 'BL',\n 'SH',\n 'KN',\n 'LC',\n 'MF',\n 'PM',\n 'VC',\n 'WS',\n 'SM',\n 'ST',\n 'SA',\n 'SN',\n 'RS',\n 'SC',\n 'SL',\n 'SG',\n 'SX',\n 'SK',\n 'SI',\n 'SB',\n 'SO',\n 'ZA',\n 'GS',\n 'SS',\n 'ES',\n 'LK',\n 'SD',\n 'SR',\n 'SJ',\n 'SZ',\n 'SE',\n 'CH',\n 'SY',\n 'TW',\n 'TJ',\n 'TZ',\n 'TH',\n 'TL',\n 'TG',\n 'TK',\n 'TO',\n 'TT',\n 'TN',\n 'TR',\n 'TM',\n 'TC',\n 'TV',\n 'UG',\n 'UA',\n 'AE',\n 'GB',\n 'UM',\n 'UY',\n 'UZ',\n 'VU',\n 'VE',\n 'VN',\n 'VG',\n 'VI',\n 'WF',\n 'EH',\n 'YE',\n 'ZM',\n 'ZW',\n 'US'\n ]\n }\n }\n}\n```", + "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\nLists all the customers for a particular merchant id.\n\n# Response Schema\n```json\n{\n type: 'array',\n items: {\n $ref: '#/$defs/customer'\n },\n $defs: {\n customer: {\n type: 'object',\n properties: {\n created_at: {\n type: 'string',\n description: 'A timestamp (ISO 8601 code) that determines when the customer was created',\n format: 'date-time'\n },\n customer_id: {\n type: 'string',\n description: 'The identifier for the customer object'\n },\n address: {\n $ref: '#/$defs/address_details'\n },\n default_payment_method_id: {\n type: 'string',\n description: 'The identifier for the default payment method.'\n },\n description: {\n type: 'string',\n description: 'An arbitrary string that you can attach to a customer object.'\n },\n email: {\n type: 'string',\n description: 'The customer\\'s email address'\n },\n metadata: {\n type: 'object',\n description: 'You can specify up to 50 keys, with key names up to 40 characters long and values up to 500\\ncharacters long. Metadata is useful for storing additional, structured information on an\\nobject.'\n },\n name: {\n type: 'string',\n description: 'The customer\\'s name'\n },\n phone: {\n type: 'string',\n description: 'The customer\\'s phone number'\n },\n phone_country_code: {\n type: 'string',\n description: 'The country code for the customer phone number'\n }\n },\n required: [ 'created_at',\n 'customer_id'\n ]\n },\n address_details: {\n type: 'object',\n description: 'Address details',\n properties: {\n city: {\n type: 'string',\n description: 'The city, district, suburb, town, or village of the address.'\n },\n country: {\n $ref: '#/$defs/country_alpha2'\n },\n first_name: {\n type: 'string',\n description: 'The first name for the address'\n },\n last_name: {\n type: 'string',\n description: 'The last name for the address'\n },\n line1: {\n type: 'string',\n description: 'The first line of the street address or P.O. Box.'\n },\n line2: {\n type: 'string',\n description: 'The second line of the street address or P.O. Box (e.g., apartment, suite, unit, or building).'\n },\n line3: {\n type: 'string',\n description: 'The third line of the street address, if applicable.'\n },\n state: {\n type: 'string',\n description: 'The address state'\n },\n zip: {\n type: 'string',\n description: 'The zip/postal code for the address'\n }\n }\n },\n country_alpha2: {\n type: 'string',\n enum: [ 'AF',\n 'AX',\n 'AL',\n 'DZ',\n 'AS',\n 'AD',\n 'AO',\n 'AI',\n 'AQ',\n 'AG',\n 'AR',\n 'AM',\n 'AW',\n 'AU',\n 'AT',\n 'AZ',\n 'BS',\n 'BH',\n 'BD',\n 'BB',\n 'BY',\n 'BE',\n 'BZ',\n 'BJ',\n 'BM',\n 'BT',\n 'BO',\n 'BQ',\n 'BA',\n 'BW',\n 'BV',\n 'BR',\n 'IO',\n 'BN',\n 'BG',\n 'BF',\n 'BI',\n 'KH',\n 'CM',\n 'CA',\n 'CV',\n 'KY',\n 'CF',\n 'TD',\n 'CL',\n 'CN',\n 'CX',\n 'CC',\n 'CO',\n 'KM',\n 'CG',\n 'CD',\n 'CK',\n 'CR',\n 'CI',\n 'HR',\n 'CU',\n 'CW',\n 'CY',\n 'CZ',\n 'DK',\n 'DJ',\n 'DM',\n 'DO',\n 'EC',\n 'EG',\n 'SV',\n 'GQ',\n 'ER',\n 'EE',\n 'ET',\n 'FK',\n 'FO',\n 'FJ',\n 'FI',\n 'FR',\n 'GF',\n 'PF',\n 'TF',\n 'GA',\n 'GM',\n 'GE',\n 'DE',\n 'GH',\n 'GI',\n 'GR',\n 'GL',\n 'GD',\n 'GP',\n 'GU',\n 'GT',\n 'GG',\n 'GN',\n 'GW',\n 'GY',\n 'HT',\n 'HM',\n 'VA',\n 'HN',\n 'HK',\n 'HU',\n 'IS',\n 'IN',\n 'ID',\n 'IR',\n 'IQ',\n 'IE',\n 'IM',\n 'IL',\n 'IT',\n 'JM',\n 'JP',\n 'JE',\n 'JO',\n 'KZ',\n 'KE',\n 'KI',\n 'KP',\n 'KR',\n 'KW',\n 'KG',\n 'LA',\n 'LV',\n 'LB',\n 'LS',\n 'LR',\n 'LY',\n 'LI',\n 'LT',\n 'LU',\n 'MO',\n 'MK',\n 'MG',\n 'MW',\n 'MY',\n 'MV',\n 'ML',\n 'MT',\n 'MH',\n 'MQ',\n 'MR',\n 'MU',\n 'YT',\n 'MX',\n 'FM',\n 'MD',\n 'MC',\n 'MN',\n 'ME',\n 'MS',\n 'MA',\n 'MZ',\n 'MM',\n 'NA',\n 'NR',\n 'NP',\n 'NL',\n 'NC',\n 'NZ',\n 'NI',\n 'NE',\n 'NG',\n 'NU',\n 'NF',\n 'MP',\n 'NO',\n 'OM',\n 'PK',\n 'PW',\n 'PS',\n 'PA',\n 'PG',\n 'PY',\n 'PE',\n 'PH',\n 'PN',\n 'PL',\n 'PT',\n 'PR',\n 'QA',\n 'RE',\n 'RO',\n 'RU',\n 'RW',\n 'BL',\n 'SH',\n 'KN',\n 'LC',\n 'MF',\n 'PM',\n 'VC',\n 'WS',\n 'SM',\n 'ST',\n 'SA',\n 'SN',\n 'RS',\n 'SC',\n 'SL',\n 'SG',\n 'SX',\n 'SK',\n 'SI',\n 'SB',\n 'SO',\n 'ZA',\n 'GS',\n 'SS',\n 'ES',\n 'LK',\n 'SD',\n 'SR',\n 'SJ',\n 'SZ',\n 'SE',\n 'CH',\n 'SY',\n 'TW',\n 'TJ',\n 'TZ',\n 'TH',\n 'TL',\n 'TG',\n 'TK',\n 'TO',\n 'TT',\n 'TN',\n 'TR',\n 'TM',\n 'TC',\n 'TV',\n 'UG',\n 'UA',\n 'AE',\n 'GB',\n 'UM',\n 'UY',\n 'UZ',\n 'VU',\n 'VE',\n 'VN',\n 'VG',\n 'VI',\n 'WF',\n 'EH',\n 'YE',\n 'ZM',\n 'ZW',\n 'US'\n ]\n }\n }\n}\n```", inputSchema: { type: 'object', properties: { @@ -37,6 +37,7 @@ export const tool: Tool = { 'A jq filter to apply to the response to include certain fields. Consult the output schema in the tool description to see the fields that are available.\n\nFor example: to include only the `name` field in every object of a results array, you can provide ".results[].name".\n\nFor more information, see the [jq documentation](https://jqlang.org/manual/).', }, }, + required: [], }, }; diff --git a/packages/mcp-server/src/tools/customers/list-mandates-customers.ts b/packages/mcp-server/src/tools/customers/list-mandates-customers.ts index a54c0bd..c4d5031 100644 --- a/packages/mcp-server/src/tools/customers/list-mandates-customers.ts +++ b/packages/mcp-server/src/tools/customers/list-mandates-customers.ts @@ -18,7 +18,7 @@ export const metadata: Metadata = { export const tool: Tool = { name: 'list_mandates_customers', description: - "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\nLists all the mandates for a particular customer id.\n\n# Response Schema\n```json\n{\n type: 'array',\n items: {\n $ref: '#/$defs/mandate_response'\n },\n $defs: {\n mandate_response: {\n type: 'object',\n properties: {\n mandate_id: {\n type: 'string',\n description: 'The identifier for mandate'\n },\n payment_method: {\n type: 'string',\n description: 'The payment method'\n },\n payment_method_id: {\n type: 'string',\n description: 'The identifier for payment method'\n },\n status: {\n $ref: '#/$defs/mandate_status'\n },\n card: {\n type: 'object',\n properties: {\n card_exp_month: {\n type: 'string',\n description: 'The expiry month of card'\n },\n card_exp_year: {\n type: 'string',\n description: 'The expiry year of card'\n },\n card_fingerprint: {\n type: 'string',\n description: 'A unique identifier alias to identify a particular card'\n },\n card_holder_name: {\n type: 'string',\n description: 'The card holder name'\n },\n card_isin: {\n type: 'string',\n description: 'The first 6 digits of card'\n },\n card_issuer: {\n type: 'string',\n description: 'The bank that issued the card'\n },\n card_network: {\n $ref: '#/$defs/card_network'\n },\n card_token: {\n type: 'string',\n description: 'The token from card locker'\n },\n card_type: {\n type: 'string',\n description: 'The type of the payment card'\n },\n issuer_country: {\n type: 'string',\n description: 'The country code in in which the card was issued'\n },\n last4_digits: {\n type: 'string',\n description: 'The last 4 digits of card'\n },\n nick_name: {\n type: 'string',\n description: 'The nick_name of the card holder'\n },\n scheme: {\n type: 'string',\n description: 'The card scheme network for the particular card'\n }\n },\n required: []\n },\n customer_acceptance: {\n $ref: '#/$defs/customer_acceptance'\n },\n payment_method_type: {\n type: 'string',\n description: 'The payment method type'\n }\n },\n required: [ 'mandate_id',\n 'payment_method',\n 'payment_method_id',\n 'status'\n ]\n },\n mandate_status: {\n type: 'string',\n description: 'The status of the mandate, which indicates whether it can be used to initiate a payment.',\n enum: [ 'active',\n 'inactive',\n 'pending',\n 'revoked'\n ]\n },\n card_network: {\n type: 'string',\n description: 'Indicates the card network.',\n enum: [ 'Visa',\n 'Mastercard',\n 'AmericanExpress',\n 'JCB',\n 'DinersClub',\n 'Discover',\n 'CartesBancaires',\n 'UnionPay',\n 'Interac',\n 'RuPay',\n 'Maestro',\n 'Star',\n 'Pulse',\n 'Accel',\n 'Nyce'\n ]\n },\n customer_acceptance: {\n type: 'object',\n description: 'This \"CustomerAcceptance\" object is passed during Payments-Confirm request, it enlists the type, time, and mode of acceptance properties related to an acceptance done by the customer. The customer_acceptance sub object is usually passed by the SDK or client.',\n properties: {\n acceptance_type: {\n type: 'string',\n description: 'This is used to indicate if the mandate was accepted online or offline',\n enum: [ 'online',\n 'offline'\n ]\n },\n accepted_at: {\n type: 'string',\n description: 'Specifying when the customer acceptance was provided',\n format: 'date-time'\n },\n online: {\n type: 'object',\n description: 'Details of online mandate',\n properties: {\n ip_address: {\n type: 'string',\n description: 'Ip address of the customer machine from which the mandate was created'\n },\n user_agent: {\n type: 'string',\n description: 'The user-agent of the customer\\'s browser'\n }\n },\n required: [ 'ip_address',\n 'user_agent'\n ]\n }\n },\n required: [ 'acceptance_type'\n ]\n }\n }\n}\n```", + "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\nLists all the mandates for a particular customer id.\n\n# Response Schema\n```json\n{\n type: 'array',\n items: {\n $ref: '#/$defs/mandate_response'\n },\n $defs: {\n mandate_response: {\n type: 'object',\n properties: {\n mandate_id: {\n type: 'string',\n description: 'The identifier for mandate'\n },\n payment_method: {\n type: 'string',\n description: 'The payment method'\n },\n payment_method_id: {\n type: 'string',\n description: 'The identifier for payment method'\n },\n status: {\n $ref: '#/$defs/mandate_status'\n },\n card: {\n type: 'object',\n properties: {\n card_exp_month: {\n type: 'string',\n description: 'The expiry month of card'\n },\n card_exp_year: {\n type: 'string',\n description: 'The expiry year of card'\n },\n card_fingerprint: {\n type: 'string',\n description: 'A unique identifier alias to identify a particular card'\n },\n card_holder_name: {\n type: 'string',\n description: 'The card holder name'\n },\n card_isin: {\n type: 'string',\n description: 'The first 6 digits of card'\n },\n card_issuer: {\n type: 'string',\n description: 'The bank that issued the card'\n },\n card_network: {\n $ref: '#/$defs/card_network'\n },\n card_token: {\n type: 'string',\n description: 'The token from card locker'\n },\n card_type: {\n type: 'string',\n description: 'The type of the payment card'\n },\n issuer_country: {\n type: 'string',\n description: 'The country code in in which the card was issued'\n },\n last4_digits: {\n type: 'string',\n description: 'The last 4 digits of card'\n },\n nick_name: {\n type: 'string',\n description: 'The nick_name of the card holder'\n },\n scheme: {\n type: 'string',\n description: 'The card scheme network for the particular card'\n }\n }\n },\n customer_acceptance: {\n $ref: '#/$defs/customer_acceptance'\n },\n payment_method_type: {\n type: 'string',\n description: 'The payment method type'\n }\n },\n required: [ 'mandate_id',\n 'payment_method',\n 'payment_method_id',\n 'status'\n ]\n },\n mandate_status: {\n type: 'string',\n description: 'The status of the mandate, which indicates whether it can be used to initiate a payment.',\n enum: [ 'active',\n 'inactive',\n 'pending',\n 'revoked'\n ]\n },\n card_network: {\n type: 'string',\n description: 'Indicates the card network.',\n enum: [ 'Visa',\n 'Mastercard',\n 'AmericanExpress',\n 'JCB',\n 'DinersClub',\n 'Discover',\n 'CartesBancaires',\n 'UnionPay',\n 'Interac',\n 'RuPay',\n 'Maestro',\n 'Star',\n 'Pulse',\n 'Accel',\n 'Nyce'\n ]\n },\n customer_acceptance: {\n type: 'object',\n description: 'This \"CustomerAcceptance\" object is passed during Payments-Confirm request, it enlists the type, time, and mode of acceptance properties related to an acceptance done by the customer. The customer_acceptance sub object is usually passed by the SDK or client.',\n properties: {\n acceptance_type: {\n type: 'string',\n description: 'This is used to indicate if the mandate was accepted online or offline',\n enum: [ 'online',\n 'offline'\n ]\n },\n accepted_at: {\n type: 'string',\n description: 'Specifying when the customer acceptance was provided',\n format: 'date-time'\n },\n online: {\n type: 'object',\n description: 'Details of online mandate',\n properties: {\n ip_address: {\n type: 'string',\n description: 'Ip address of the customer machine from which the mandate was created'\n },\n user_agent: {\n type: 'string',\n description: 'The user-agent of the customer\\'s browser'\n }\n },\n required: [ 'ip_address',\n 'user_agent'\n ]\n }\n },\n required: [ 'acceptance_type'\n ]\n }\n }\n}\n```", inputSchema: { type: 'object', properties: { @@ -32,6 +32,7 @@ export const tool: Tool = { 'A jq filter to apply to the response to include certain fields. Consult the output schema in the tool description to see the fields that are available.\n\nFor example: to include only the `name` field in every object of a results array, you can provide ".results[].name".\n\nFor more information, see the [jq documentation](https://jqlang.org/manual/).', }, }, + required: ['customer_id'], }, }; diff --git a/packages/mcp-server/src/tools/customers/payment-methods/list-customers-payment-methods.ts b/packages/mcp-server/src/tools/customers/payment-methods/list-customers-payment-methods.ts index 35a337a..e6f66cf 100644 --- a/packages/mcp-server/src/tools/customers/payment-methods/list-customers-payment-methods.ts +++ b/packages/mcp-server/src/tools/customers/payment-methods/list-customers-payment-methods.ts @@ -67,6 +67,7 @@ export const tool: Tool = { description: 'Indicates whether the payment method is eligible for recurring payments', }, }, + required: ['customer_id'], $defs: { country_alpha2: { type: 'string', diff --git a/packages/mcp-server/src/tools/customers/payment-methods/list-saved-customers-payment-methods.ts b/packages/mcp-server/src/tools/customers/payment-methods/list-saved-customers-payment-methods.ts index 29a8375..7b91257 100644 --- a/packages/mcp-server/src/tools/customers/payment-methods/list-saved-customers-payment-methods.ts +++ b/packages/mcp-server/src/tools/customers/payment-methods/list-saved-customers-payment-methods.ts @@ -64,6 +64,7 @@ export const tool: Tool = { description: 'Indicates whether the payment method is eligible for recurring payments', }, }, + required: [], $defs: { country_alpha2: { type: 'string', diff --git a/packages/mcp-server/src/tools/customers/retrieve-customers.ts b/packages/mcp-server/src/tools/customers/retrieve-customers.ts index b9c193d..d444d4c 100644 --- a/packages/mcp-server/src/tools/customers/retrieve-customers.ts +++ b/packages/mcp-server/src/tools/customers/retrieve-customers.ts @@ -18,7 +18,7 @@ export const metadata: Metadata = { export const tool: Tool = { name: 'retrieve_customers', description: - "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\nRetrieves a customer's details.\n\n# Response Schema\n```json\n{\n $ref: '#/$defs/customer',\n $defs: {\n customer: {\n type: 'object',\n properties: {\n created_at: {\n type: 'string',\n description: 'A timestamp (ISO 8601 code) that determines when the customer was created',\n format: 'date-time'\n },\n customer_id: {\n type: 'string',\n description: 'The identifier for the customer object'\n },\n address: {\n $ref: '#/$defs/address_details'\n },\n default_payment_method_id: {\n type: 'string',\n description: 'The identifier for the default payment method.'\n },\n description: {\n type: 'string',\n description: 'An arbitrary string that you can attach to a customer object.'\n },\n email: {\n type: 'string',\n description: 'The customer\\'s email address'\n },\n metadata: {\n type: 'object',\n description: 'You can specify up to 50 keys, with key names up to 40 characters long and values up to 500\\ncharacters long. Metadata is useful for storing additional, structured information on an\\nobject.'\n },\n name: {\n type: 'string',\n description: 'The customer\\'s name'\n },\n phone: {\n type: 'string',\n description: 'The customer\\'s phone number'\n },\n phone_country_code: {\n type: 'string',\n description: 'The country code for the customer phone number'\n }\n },\n required: [ 'created_at',\n 'customer_id'\n ]\n },\n address_details: {\n type: 'object',\n description: 'Address details',\n properties: {\n city: {\n type: 'string',\n description: 'The city, district, suburb, town, or village of the address.'\n },\n country: {\n $ref: '#/$defs/country_alpha2'\n },\n first_name: {\n type: 'string',\n description: 'The first name for the address'\n },\n last_name: {\n type: 'string',\n description: 'The last name for the address'\n },\n line1: {\n type: 'string',\n description: 'The first line of the street address or P.O. Box.'\n },\n line2: {\n type: 'string',\n description: 'The second line of the street address or P.O. Box (e.g., apartment, suite, unit, or building).'\n },\n line3: {\n type: 'string',\n description: 'The third line of the street address, if applicable.'\n },\n state: {\n type: 'string',\n description: 'The address state'\n },\n zip: {\n type: 'string',\n description: 'The zip/postal code for the address'\n }\n },\n required: []\n },\n country_alpha2: {\n type: 'string',\n enum: [ 'AF',\n 'AX',\n 'AL',\n 'DZ',\n 'AS',\n 'AD',\n 'AO',\n 'AI',\n 'AQ',\n 'AG',\n 'AR',\n 'AM',\n 'AW',\n 'AU',\n 'AT',\n 'AZ',\n 'BS',\n 'BH',\n 'BD',\n 'BB',\n 'BY',\n 'BE',\n 'BZ',\n 'BJ',\n 'BM',\n 'BT',\n 'BO',\n 'BQ',\n 'BA',\n 'BW',\n 'BV',\n 'BR',\n 'IO',\n 'BN',\n 'BG',\n 'BF',\n 'BI',\n 'KH',\n 'CM',\n 'CA',\n 'CV',\n 'KY',\n 'CF',\n 'TD',\n 'CL',\n 'CN',\n 'CX',\n 'CC',\n 'CO',\n 'KM',\n 'CG',\n 'CD',\n 'CK',\n 'CR',\n 'CI',\n 'HR',\n 'CU',\n 'CW',\n 'CY',\n 'CZ',\n 'DK',\n 'DJ',\n 'DM',\n 'DO',\n 'EC',\n 'EG',\n 'SV',\n 'GQ',\n 'ER',\n 'EE',\n 'ET',\n 'FK',\n 'FO',\n 'FJ',\n 'FI',\n 'FR',\n 'GF',\n 'PF',\n 'TF',\n 'GA',\n 'GM',\n 'GE',\n 'DE',\n 'GH',\n 'GI',\n 'GR',\n 'GL',\n 'GD',\n 'GP',\n 'GU',\n 'GT',\n 'GG',\n 'GN',\n 'GW',\n 'GY',\n 'HT',\n 'HM',\n 'VA',\n 'HN',\n 'HK',\n 'HU',\n 'IS',\n 'IN',\n 'ID',\n 'IR',\n 'IQ',\n 'IE',\n 'IM',\n 'IL',\n 'IT',\n 'JM',\n 'JP',\n 'JE',\n 'JO',\n 'KZ',\n 'KE',\n 'KI',\n 'KP',\n 'KR',\n 'KW',\n 'KG',\n 'LA',\n 'LV',\n 'LB',\n 'LS',\n 'LR',\n 'LY',\n 'LI',\n 'LT',\n 'LU',\n 'MO',\n 'MK',\n 'MG',\n 'MW',\n 'MY',\n 'MV',\n 'ML',\n 'MT',\n 'MH',\n 'MQ',\n 'MR',\n 'MU',\n 'YT',\n 'MX',\n 'FM',\n 'MD',\n 'MC',\n 'MN',\n 'ME',\n 'MS',\n 'MA',\n 'MZ',\n 'MM',\n 'NA',\n 'NR',\n 'NP',\n 'NL',\n 'NC',\n 'NZ',\n 'NI',\n 'NE',\n 'NG',\n 'NU',\n 'NF',\n 'MP',\n 'NO',\n 'OM',\n 'PK',\n 'PW',\n 'PS',\n 'PA',\n 'PG',\n 'PY',\n 'PE',\n 'PH',\n 'PN',\n 'PL',\n 'PT',\n 'PR',\n 'QA',\n 'RE',\n 'RO',\n 'RU',\n 'RW',\n 'BL',\n 'SH',\n 'KN',\n 'LC',\n 'MF',\n 'PM',\n 'VC',\n 'WS',\n 'SM',\n 'ST',\n 'SA',\n 'SN',\n 'RS',\n 'SC',\n 'SL',\n 'SG',\n 'SX',\n 'SK',\n 'SI',\n 'SB',\n 'SO',\n 'ZA',\n 'GS',\n 'SS',\n 'ES',\n 'LK',\n 'SD',\n 'SR',\n 'SJ',\n 'SZ',\n 'SE',\n 'CH',\n 'SY',\n 'TW',\n 'TJ',\n 'TZ',\n 'TH',\n 'TL',\n 'TG',\n 'TK',\n 'TO',\n 'TT',\n 'TN',\n 'TR',\n 'TM',\n 'TC',\n 'TV',\n 'UG',\n 'UA',\n 'AE',\n 'GB',\n 'UM',\n 'UY',\n 'UZ',\n 'VU',\n 'VE',\n 'VN',\n 'VG',\n 'VI',\n 'WF',\n 'EH',\n 'YE',\n 'ZM',\n 'ZW',\n 'US'\n ]\n }\n }\n}\n```", + "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\nRetrieves a customer's details.\n\n# Response Schema\n```json\n{\n $ref: '#/$defs/customer',\n $defs: {\n customer: {\n type: 'object',\n properties: {\n created_at: {\n type: 'string',\n description: 'A timestamp (ISO 8601 code) that determines when the customer was created',\n format: 'date-time'\n },\n customer_id: {\n type: 'string',\n description: 'The identifier for the customer object'\n },\n address: {\n $ref: '#/$defs/address_details'\n },\n default_payment_method_id: {\n type: 'string',\n description: 'The identifier for the default payment method.'\n },\n description: {\n type: 'string',\n description: 'An arbitrary string that you can attach to a customer object.'\n },\n email: {\n type: 'string',\n description: 'The customer\\'s email address'\n },\n metadata: {\n type: 'object',\n description: 'You can specify up to 50 keys, with key names up to 40 characters long and values up to 500\\ncharacters long. Metadata is useful for storing additional, structured information on an\\nobject.'\n },\n name: {\n type: 'string',\n description: 'The customer\\'s name'\n },\n phone: {\n type: 'string',\n description: 'The customer\\'s phone number'\n },\n phone_country_code: {\n type: 'string',\n description: 'The country code for the customer phone number'\n }\n },\n required: [ 'created_at',\n 'customer_id'\n ]\n },\n address_details: {\n type: 'object',\n description: 'Address details',\n properties: {\n city: {\n type: 'string',\n description: 'The city, district, suburb, town, or village of the address.'\n },\n country: {\n $ref: '#/$defs/country_alpha2'\n },\n first_name: {\n type: 'string',\n description: 'The first name for the address'\n },\n last_name: {\n type: 'string',\n description: 'The last name for the address'\n },\n line1: {\n type: 'string',\n description: 'The first line of the street address or P.O. Box.'\n },\n line2: {\n type: 'string',\n description: 'The second line of the street address or P.O. Box (e.g., apartment, suite, unit, or building).'\n },\n line3: {\n type: 'string',\n description: 'The third line of the street address, if applicable.'\n },\n state: {\n type: 'string',\n description: 'The address state'\n },\n zip: {\n type: 'string',\n description: 'The zip/postal code for the address'\n }\n }\n },\n country_alpha2: {\n type: 'string',\n enum: [ 'AF',\n 'AX',\n 'AL',\n 'DZ',\n 'AS',\n 'AD',\n 'AO',\n 'AI',\n 'AQ',\n 'AG',\n 'AR',\n 'AM',\n 'AW',\n 'AU',\n 'AT',\n 'AZ',\n 'BS',\n 'BH',\n 'BD',\n 'BB',\n 'BY',\n 'BE',\n 'BZ',\n 'BJ',\n 'BM',\n 'BT',\n 'BO',\n 'BQ',\n 'BA',\n 'BW',\n 'BV',\n 'BR',\n 'IO',\n 'BN',\n 'BG',\n 'BF',\n 'BI',\n 'KH',\n 'CM',\n 'CA',\n 'CV',\n 'KY',\n 'CF',\n 'TD',\n 'CL',\n 'CN',\n 'CX',\n 'CC',\n 'CO',\n 'KM',\n 'CG',\n 'CD',\n 'CK',\n 'CR',\n 'CI',\n 'HR',\n 'CU',\n 'CW',\n 'CY',\n 'CZ',\n 'DK',\n 'DJ',\n 'DM',\n 'DO',\n 'EC',\n 'EG',\n 'SV',\n 'GQ',\n 'ER',\n 'EE',\n 'ET',\n 'FK',\n 'FO',\n 'FJ',\n 'FI',\n 'FR',\n 'GF',\n 'PF',\n 'TF',\n 'GA',\n 'GM',\n 'GE',\n 'DE',\n 'GH',\n 'GI',\n 'GR',\n 'GL',\n 'GD',\n 'GP',\n 'GU',\n 'GT',\n 'GG',\n 'GN',\n 'GW',\n 'GY',\n 'HT',\n 'HM',\n 'VA',\n 'HN',\n 'HK',\n 'HU',\n 'IS',\n 'IN',\n 'ID',\n 'IR',\n 'IQ',\n 'IE',\n 'IM',\n 'IL',\n 'IT',\n 'JM',\n 'JP',\n 'JE',\n 'JO',\n 'KZ',\n 'KE',\n 'KI',\n 'KP',\n 'KR',\n 'KW',\n 'KG',\n 'LA',\n 'LV',\n 'LB',\n 'LS',\n 'LR',\n 'LY',\n 'LI',\n 'LT',\n 'LU',\n 'MO',\n 'MK',\n 'MG',\n 'MW',\n 'MY',\n 'MV',\n 'ML',\n 'MT',\n 'MH',\n 'MQ',\n 'MR',\n 'MU',\n 'YT',\n 'MX',\n 'FM',\n 'MD',\n 'MC',\n 'MN',\n 'ME',\n 'MS',\n 'MA',\n 'MZ',\n 'MM',\n 'NA',\n 'NR',\n 'NP',\n 'NL',\n 'NC',\n 'NZ',\n 'NI',\n 'NE',\n 'NG',\n 'NU',\n 'NF',\n 'MP',\n 'NO',\n 'OM',\n 'PK',\n 'PW',\n 'PS',\n 'PA',\n 'PG',\n 'PY',\n 'PE',\n 'PH',\n 'PN',\n 'PL',\n 'PT',\n 'PR',\n 'QA',\n 'RE',\n 'RO',\n 'RU',\n 'RW',\n 'BL',\n 'SH',\n 'KN',\n 'LC',\n 'MF',\n 'PM',\n 'VC',\n 'WS',\n 'SM',\n 'ST',\n 'SA',\n 'SN',\n 'RS',\n 'SC',\n 'SL',\n 'SG',\n 'SX',\n 'SK',\n 'SI',\n 'SB',\n 'SO',\n 'ZA',\n 'GS',\n 'SS',\n 'ES',\n 'LK',\n 'SD',\n 'SR',\n 'SJ',\n 'SZ',\n 'SE',\n 'CH',\n 'SY',\n 'TW',\n 'TJ',\n 'TZ',\n 'TH',\n 'TL',\n 'TG',\n 'TK',\n 'TO',\n 'TT',\n 'TN',\n 'TR',\n 'TM',\n 'TC',\n 'TV',\n 'UG',\n 'UA',\n 'AE',\n 'GB',\n 'UM',\n 'UY',\n 'UZ',\n 'VU',\n 'VE',\n 'VN',\n 'VG',\n 'VI',\n 'WF',\n 'EH',\n 'YE',\n 'ZM',\n 'ZW',\n 'US'\n ]\n }\n }\n}\n```", inputSchema: { type: 'object', properties: { @@ -32,6 +32,7 @@ export const tool: Tool = { 'A jq filter to apply to the response to include certain fields. Consult the output schema in the tool description to see the fields that are available.\n\nFor example: to include only the `name` field in every object of a results array, you can provide ".results[].name".\n\nFor more information, see the [jq documentation](https://jqlang.org/manual/).', }, }, + required: ['customer_id'], }, }; diff --git a/packages/mcp-server/src/tools/customers/update-customers.ts b/packages/mcp-server/src/tools/customers/update-customers.ts index d9da0bc..4e19c6c 100644 --- a/packages/mcp-server/src/tools/customers/update-customers.ts +++ b/packages/mcp-server/src/tools/customers/update-customers.ts @@ -53,6 +53,7 @@ export const tool: Tool = { description: 'The country code for the customer phone number', }, }, + required: ['customer_id'], $defs: { address_details: { type: 'object', @@ -95,7 +96,6 @@ export const tool: Tool = { description: 'The zip/postal code for the address', }, }, - required: [], }, country_alpha2: { type: 'string', diff --git a/packages/mcp-server/src/tools/disputes/list-disputes.ts b/packages/mcp-server/src/tools/disputes/list-disputes.ts index 5780f63..7eeb688 100644 --- a/packages/mcp-server/src/tools/disputes/list-disputes.ts +++ b/packages/mcp-server/src/tools/disputes/list-disputes.ts @@ -64,7 +64,6 @@ export const tool: Tool = { format: 'date-time', }, }, - required: [], }, jq_filter: { type: 'string', @@ -73,6 +72,7 @@ export const tool: Tool = { 'A jq filter to apply to the response to include certain fields. Consult the output schema in the tool description to see the fields that are available.\n\nFor example: to include only the `name` field in every object of a results array, you can provide ".results[].name".\n\nFor more information, see the [jq documentation](https://jqlang.org/manual/).', }, }, + required: [], $defs: { dispute_stage: { type: 'string', diff --git a/packages/mcp-server/src/tools/disputes/retrieve-disputes.ts b/packages/mcp-server/src/tools/disputes/retrieve-disputes.ts index 4b26b1e..a0af7b1 100644 --- a/packages/mcp-server/src/tools/disputes/retrieve-disputes.ts +++ b/packages/mcp-server/src/tools/disputes/retrieve-disputes.ts @@ -32,6 +32,7 @@ export const tool: Tool = { 'A jq filter to apply to the response to include certain fields. Consult the output schema in the tool description to see the fields that are available.\n\nFor example: to include only the `name` field in every object of a results array, you can provide ".results[].name".\n\nFor more information, see the [jq documentation](https://jqlang.org/manual/).', }, }, + required: ['dispute_id'], }, }; diff --git a/packages/mcp-server/src/tools/events/delivery-attempts-events.ts b/packages/mcp-server/src/tools/events/delivery-attempts-events.ts index 1e833d5..443f204 100644 --- a/packages/mcp-server/src/tools/events/delivery-attempts-events.ts +++ b/packages/mcp-server/src/tools/events/delivery-attempts-events.ts @@ -35,6 +35,7 @@ export const tool: Tool = { 'A jq filter to apply to the response to include certain fields. Consult the output schema in the tool description to see the fields that are available.\n\nFor example: to include only the `name` field in every object of a results array, you can provide ".results[].name".\n\nFor more information, see the [jq documentation](https://jqlang.org/manual/).', }, }, + required: ['merchant_id', 'event_id'], }, }; diff --git a/packages/mcp-server/src/tools/events/list-events.ts b/packages/mcp-server/src/tools/events/list-events.ts index b531675..0450d0f 100644 --- a/packages/mcp-server/src/tools/events/list-events.ts +++ b/packages/mcp-server/src/tools/events/list-events.ts @@ -77,6 +77,7 @@ export const tool: Tool = { 'A jq filter to apply to the response to include certain fields. Consult the output schema in the tool description to see the fields that are available.\n\nFor example: to include only the `name` field in every object of a results array, you can provide ".results[].name".\n\nFor more information, see the [jq documentation](https://jqlang.org/manual/).', }, }, + required: ['merchant_id'], $defs: { event_class: { type: 'string', diff --git a/packages/mcp-server/src/tools/events/profile/list-events-profile.ts b/packages/mcp-server/src/tools/events/profile/list-events-profile.ts index 23d5bbc..37755a0 100644 --- a/packages/mcp-server/src/tools/events/profile/list-events-profile.ts +++ b/packages/mcp-server/src/tools/events/profile/list-events-profile.ts @@ -74,6 +74,7 @@ export const tool: Tool = { 'A jq filter to apply to the response to include certain fields. Consult the output schema in the tool description to see the fields that are available.\n\nFor example: to include only the `name` field in every object of a results array, you can provide ".results[].name".\n\nFor more information, see the [jq documentation](https://jqlang.org/manual/).', }, }, + required: [], $defs: { event_class: { type: 'string', diff --git a/packages/mcp-server/src/tools/events/retry-events.ts b/packages/mcp-server/src/tools/events/retry-events.ts index 0c28dc0..9fb8768 100644 --- a/packages/mcp-server/src/tools/events/retry-events.ts +++ b/packages/mcp-server/src/tools/events/retry-events.ts @@ -35,6 +35,7 @@ export const tool: Tool = { 'A jq filter to apply to the response to include certain fields. Consult the output schema in the tool description to see the fields that are available.\n\nFor example: to include only the `name` field in every object of a results array, you can provide ".results[].name".\n\nFor more information, see the [jq documentation](https://jqlang.org/manual/).', }, }, + required: ['merchant_id', 'event_id'], }, }; diff --git a/packages/mcp-server/src/tools/gsm/create-gsm.ts b/packages/mcp-server/src/tools/gsm/create-gsm.ts index 365d4fe..7e0e011 100644 --- a/packages/mcp-server/src/tools/gsm/create-gsm.ts +++ b/packages/mcp-server/src/tools/gsm/create-gsm.ts @@ -78,6 +78,17 @@ export const tool: Tool = { 'A jq filter to apply to the response to include certain fields. Consult the output schema in the tool description to see the fields that are available.\n\nFor example: to include only the `name` field in every object of a results array, you can provide ".results[].name".\n\nFor more information, see the [jq documentation](https://jqlang.org/manual/).', }, }, + required: [ + 'clear_pan_possible', + 'code', + 'connector', + 'decision', + 'flow', + 'message', + 'status', + 'step_up_possible', + 'sub_flow', + ], $defs: { connector: { type: 'string', diff --git a/packages/mcp-server/src/tools/gsm/delete-gsm.ts b/packages/mcp-server/src/tools/gsm/delete-gsm.ts index 86ec3f5..aa2d14e 100644 --- a/packages/mcp-server/src/tools/gsm/delete-gsm.ts +++ b/packages/mcp-server/src/tools/gsm/delete-gsm.ts @@ -49,6 +49,7 @@ export const tool: Tool = { 'A jq filter to apply to the response to include certain fields. Consult the output schema in the tool description to see the fields that are available.\n\nFor example: to include only the `name` field in every object of a results array, you can provide ".results[].name".\n\nFor more information, see the [jq documentation](https://jqlang.org/manual/).', }, }, + required: ['code', 'connector', 'flow', 'message', 'sub_flow'], }, }; diff --git a/packages/mcp-server/src/tools/gsm/retrieve-gsm.ts b/packages/mcp-server/src/tools/gsm/retrieve-gsm.ts index d15c48f..9f9b1ee 100644 --- a/packages/mcp-server/src/tools/gsm/retrieve-gsm.ts +++ b/packages/mcp-server/src/tools/gsm/retrieve-gsm.ts @@ -48,6 +48,7 @@ export const tool: Tool = { 'A jq filter to apply to the response to include certain fields. Consult the output schema in the tool description to see the fields that are available.\n\nFor example: to include only the `name` field in every object of a results array, you can provide ".results[].name".\n\nFor more information, see the [jq documentation](https://jqlang.org/manual/).', }, }, + required: ['code', 'connector', 'flow', 'message', 'sub_flow'], $defs: { connector: { type: 'string', diff --git a/packages/mcp-server/src/tools/gsm/update-gsm.ts b/packages/mcp-server/src/tools/gsm/update-gsm.ts index 30a8778..d17948e 100644 --- a/packages/mcp-server/src/tools/gsm/update-gsm.ts +++ b/packages/mcp-server/src/tools/gsm/update-gsm.ts @@ -79,6 +79,7 @@ export const tool: Tool = { 'A jq filter to apply to the response to include certain fields. Consult the output schema in the tool description to see the fields that are available.\n\nFor example: to include only the `name` field in every object of a results array, you can provide ".results[].name".\n\nFor more information, see the [jq documentation](https://jqlang.org/manual/).', }, }, + required: ['code', 'connector', 'flow', 'message', 'sub_flow'], $defs: { gsm_decision: { type: 'string', diff --git a/packages/mcp-server/src/tools/mandates/retrieve-mandates.ts b/packages/mcp-server/src/tools/mandates/retrieve-mandates.ts index 3520a06..88002c7 100644 --- a/packages/mcp-server/src/tools/mandates/retrieve-mandates.ts +++ b/packages/mcp-server/src/tools/mandates/retrieve-mandates.ts @@ -18,7 +18,7 @@ export const metadata: Metadata = { export const tool: Tool = { name: 'retrieve_mandates', description: - "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\nRetrieves a mandate created using the Payments/Create API\n\n# Response Schema\n```json\n{\n $ref: '#/$defs/mandate_response',\n $defs: {\n mandate_response: {\n type: 'object',\n properties: {\n mandate_id: {\n type: 'string',\n description: 'The identifier for mandate'\n },\n payment_method: {\n type: 'string',\n description: 'The payment method'\n },\n payment_method_id: {\n type: 'string',\n description: 'The identifier for payment method'\n },\n status: {\n $ref: '#/$defs/mandate_status'\n },\n card: {\n type: 'object',\n properties: {\n card_exp_month: {\n type: 'string',\n description: 'The expiry month of card'\n },\n card_exp_year: {\n type: 'string',\n description: 'The expiry year of card'\n },\n card_fingerprint: {\n type: 'string',\n description: 'A unique identifier alias to identify a particular card'\n },\n card_holder_name: {\n type: 'string',\n description: 'The card holder name'\n },\n card_isin: {\n type: 'string',\n description: 'The first 6 digits of card'\n },\n card_issuer: {\n type: 'string',\n description: 'The bank that issued the card'\n },\n card_network: {\n $ref: '#/$defs/card_network'\n },\n card_token: {\n type: 'string',\n description: 'The token from card locker'\n },\n card_type: {\n type: 'string',\n description: 'The type of the payment card'\n },\n issuer_country: {\n type: 'string',\n description: 'The country code in in which the card was issued'\n },\n last4_digits: {\n type: 'string',\n description: 'The last 4 digits of card'\n },\n nick_name: {\n type: 'string',\n description: 'The nick_name of the card holder'\n },\n scheme: {\n type: 'string',\n description: 'The card scheme network for the particular card'\n }\n },\n required: []\n },\n customer_acceptance: {\n $ref: '#/$defs/customer_acceptance'\n },\n payment_method_type: {\n type: 'string',\n description: 'The payment method type'\n }\n },\n required: [ 'mandate_id',\n 'payment_method',\n 'payment_method_id',\n 'status'\n ]\n },\n mandate_status: {\n type: 'string',\n description: 'The status of the mandate, which indicates whether it can be used to initiate a payment.',\n enum: [ 'active',\n 'inactive',\n 'pending',\n 'revoked'\n ]\n },\n card_network: {\n type: 'string',\n description: 'Indicates the card network.',\n enum: [ 'Visa',\n 'Mastercard',\n 'AmericanExpress',\n 'JCB',\n 'DinersClub',\n 'Discover',\n 'CartesBancaires',\n 'UnionPay',\n 'Interac',\n 'RuPay',\n 'Maestro',\n 'Star',\n 'Pulse',\n 'Accel',\n 'Nyce'\n ]\n },\n customer_acceptance: {\n type: 'object',\n description: 'This \"CustomerAcceptance\" object is passed during Payments-Confirm request, it enlists the type, time, and mode of acceptance properties related to an acceptance done by the customer. The customer_acceptance sub object is usually passed by the SDK or client.',\n properties: {\n acceptance_type: {\n type: 'string',\n description: 'This is used to indicate if the mandate was accepted online or offline',\n enum: [ 'online',\n 'offline'\n ]\n },\n accepted_at: {\n type: 'string',\n description: 'Specifying when the customer acceptance was provided',\n format: 'date-time'\n },\n online: {\n type: 'object',\n description: 'Details of online mandate',\n properties: {\n ip_address: {\n type: 'string',\n description: 'Ip address of the customer machine from which the mandate was created'\n },\n user_agent: {\n type: 'string',\n description: 'The user-agent of the customer\\'s browser'\n }\n },\n required: [ 'ip_address',\n 'user_agent'\n ]\n }\n },\n required: [ 'acceptance_type'\n ]\n }\n }\n}\n```", + "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\nRetrieves a mandate created using the Payments/Create API\n\n# Response Schema\n```json\n{\n $ref: '#/$defs/mandate_response',\n $defs: {\n mandate_response: {\n type: 'object',\n properties: {\n mandate_id: {\n type: 'string',\n description: 'The identifier for mandate'\n },\n payment_method: {\n type: 'string',\n description: 'The payment method'\n },\n payment_method_id: {\n type: 'string',\n description: 'The identifier for payment method'\n },\n status: {\n $ref: '#/$defs/mandate_status'\n },\n card: {\n type: 'object',\n properties: {\n card_exp_month: {\n type: 'string',\n description: 'The expiry month of card'\n },\n card_exp_year: {\n type: 'string',\n description: 'The expiry year of card'\n },\n card_fingerprint: {\n type: 'string',\n description: 'A unique identifier alias to identify a particular card'\n },\n card_holder_name: {\n type: 'string',\n description: 'The card holder name'\n },\n card_isin: {\n type: 'string',\n description: 'The first 6 digits of card'\n },\n card_issuer: {\n type: 'string',\n description: 'The bank that issued the card'\n },\n card_network: {\n $ref: '#/$defs/card_network'\n },\n card_token: {\n type: 'string',\n description: 'The token from card locker'\n },\n card_type: {\n type: 'string',\n description: 'The type of the payment card'\n },\n issuer_country: {\n type: 'string',\n description: 'The country code in in which the card was issued'\n },\n last4_digits: {\n type: 'string',\n description: 'The last 4 digits of card'\n },\n nick_name: {\n type: 'string',\n description: 'The nick_name of the card holder'\n },\n scheme: {\n type: 'string',\n description: 'The card scheme network for the particular card'\n }\n }\n },\n customer_acceptance: {\n $ref: '#/$defs/customer_acceptance'\n },\n payment_method_type: {\n type: 'string',\n description: 'The payment method type'\n }\n },\n required: [ 'mandate_id',\n 'payment_method',\n 'payment_method_id',\n 'status'\n ]\n },\n mandate_status: {\n type: 'string',\n description: 'The status of the mandate, which indicates whether it can be used to initiate a payment.',\n enum: [ 'active',\n 'inactive',\n 'pending',\n 'revoked'\n ]\n },\n card_network: {\n type: 'string',\n description: 'Indicates the card network.',\n enum: [ 'Visa',\n 'Mastercard',\n 'AmericanExpress',\n 'JCB',\n 'DinersClub',\n 'Discover',\n 'CartesBancaires',\n 'UnionPay',\n 'Interac',\n 'RuPay',\n 'Maestro',\n 'Star',\n 'Pulse',\n 'Accel',\n 'Nyce'\n ]\n },\n customer_acceptance: {\n type: 'object',\n description: 'This \"CustomerAcceptance\" object is passed during Payments-Confirm request, it enlists the type, time, and mode of acceptance properties related to an acceptance done by the customer. The customer_acceptance sub object is usually passed by the SDK or client.',\n properties: {\n acceptance_type: {\n type: 'string',\n description: 'This is used to indicate if the mandate was accepted online or offline',\n enum: [ 'online',\n 'offline'\n ]\n },\n accepted_at: {\n type: 'string',\n description: 'Specifying when the customer acceptance was provided',\n format: 'date-time'\n },\n online: {\n type: 'object',\n description: 'Details of online mandate',\n properties: {\n ip_address: {\n type: 'string',\n description: 'Ip address of the customer machine from which the mandate was created'\n },\n user_agent: {\n type: 'string',\n description: 'The user-agent of the customer\\'s browser'\n }\n },\n required: [ 'ip_address',\n 'user_agent'\n ]\n }\n },\n required: [ 'acceptance_type'\n ]\n }\n }\n}\n```", inputSchema: { type: 'object', properties: { @@ -32,6 +32,7 @@ export const tool: Tool = { 'A jq filter to apply to the response to include certain fields. Consult the output schema in the tool description to see the fields that are available.\n\nFor example: to include only the `name` field in every object of a results array, you can provide ".results[].name".\n\nFor more information, see the [jq documentation](https://jqlang.org/manual/).', }, }, + required: ['mandate_id'], }, }; diff --git a/packages/mcp-server/src/tools/mandates/revoke-mandates.ts b/packages/mcp-server/src/tools/mandates/revoke-mandates.ts index 7f91887..886bb20 100644 --- a/packages/mcp-server/src/tools/mandates/revoke-mandates.ts +++ b/packages/mcp-server/src/tools/mandates/revoke-mandates.ts @@ -32,6 +32,7 @@ export const tool: Tool = { 'A jq filter to apply to the response to include certain fields. Consult the output schema in the tool description to see the fields that are available.\n\nFor example: to include only the `name` field in every object of a results array, you can provide ".results[].name".\n\nFor more information, see the [jq documentation](https://jqlang.org/manual/).', }, }, + required: ['mandate_id'], }, }; diff --git a/packages/mcp-server/src/tools/organization/create-organization.ts b/packages/mcp-server/src/tools/organization/create-organization.ts index c7ca4b6..3038a5b 100644 --- a/packages/mcp-server/src/tools/organization/create-organization.ts +++ b/packages/mcp-server/src/tools/organization/create-organization.ts @@ -41,6 +41,7 @@ export const tool: Tool = { 'A jq filter to apply to the response to include certain fields. Consult the output schema in the tool description to see the fields that are available.\n\nFor example: to include only the `name` field in every object of a results array, you can provide ".results[].name".\n\nFor more information, see the [jq documentation](https://jqlang.org/manual/).', }, }, + required: ['organization_name'], }, }; diff --git a/packages/mcp-server/src/tools/organization/retrieve-organization.ts b/packages/mcp-server/src/tools/organization/retrieve-organization.ts index 8cefe77..881e8c2 100644 --- a/packages/mcp-server/src/tools/organization/retrieve-organization.ts +++ b/packages/mcp-server/src/tools/organization/retrieve-organization.ts @@ -32,6 +32,7 @@ export const tool: Tool = { 'A jq filter to apply to the response to include certain fields. Consult the output schema in the tool description to see the fields that are available.\n\nFor example: to include only the `name` field in every object of a results array, you can provide ".results[].name".\n\nFor more information, see the [jq documentation](https://jqlang.org/manual/).', }, }, + required: ['id'], }, }; diff --git a/packages/mcp-server/src/tools/organization/update-organization.ts b/packages/mcp-server/src/tools/organization/update-organization.ts index 6aacf25..207b146 100644 --- a/packages/mcp-server/src/tools/organization/update-organization.ts +++ b/packages/mcp-server/src/tools/organization/update-organization.ts @@ -48,6 +48,7 @@ export const tool: Tool = { 'A jq filter to apply to the response to include certain fields. Consult the output schema in the tool description to see the fields that are available.\n\nFor example: to include only the `name` field in every object of a results array, you can provide ".results[].name".\n\nFor more information, see the [jq documentation](https://jqlang.org/manual/).', }, }, + required: ['id', 'platform_merchant_id'], }, }; diff --git a/packages/mcp-server/src/tools/payment-link/retrieve-payment-link.ts b/packages/mcp-server/src/tools/payment-link/retrieve-payment-link.ts index f3fb017..daf7633 100644 --- a/packages/mcp-server/src/tools/payment-link/retrieve-payment-link.ts +++ b/packages/mcp-server/src/tools/payment-link/retrieve-payment-link.ts @@ -37,6 +37,7 @@ export const tool: Tool = { 'A jq filter to apply to the response to include certain fields. Consult the output schema in the tool description to see the fields that are available.\n\nFor example: to include only the `name` field in every object of a results array, you can provide ".results[].name".\n\nFor more information, see the [jq documentation](https://jqlang.org/manual/).', }, }, + required: ['payment_link_id'], }, }; diff --git a/packages/mcp-server/src/tools/payment-methods/create-payment-methods.ts b/packages/mcp-server/src/tools/payment-methods/create-payment-methods.ts index 528aa4f..99fd010 100644 --- a/packages/mcp-server/src/tools/payment-methods/create-payment-methods.ts +++ b/packages/mcp-server/src/tools/payment-methods/create-payment-methods.ts @@ -92,6 +92,7 @@ export const tool: Tool = { $ref: '#/$defs/wallet', }, }, + required: ['payment_method'], $defs: { bank: { anyOf: [ @@ -476,10 +477,8 @@ export const tool: Tool = { description: 'The contact number', }, }, - required: [], }, }, - required: [], }, address_details: { type: 'object', @@ -522,7 +521,6 @@ export const tool: Tool = { description: 'The zip/postal code for the address', }, }, - required: [], }, card_detail: { type: 'object', diff --git a/packages/mcp-server/src/tools/payment-methods/delete-payment-methods.ts b/packages/mcp-server/src/tools/payment-methods/delete-payment-methods.ts index 8b72063..55d5f83 100644 --- a/packages/mcp-server/src/tools/payment-methods/delete-payment-methods.ts +++ b/packages/mcp-server/src/tools/payment-methods/delete-payment-methods.ts @@ -32,6 +32,7 @@ export const tool: Tool = { 'A jq filter to apply to the response to include certain fields. Consult the output schema in the tool description to see the fields that are available.\n\nFor example: to include only the `name` field in every object of a results array, you can provide ".results[].name".\n\nFor more information, see the [jq documentation](https://jqlang.org/manual/).', }, }, + required: ['method_id'], }, }; diff --git a/packages/mcp-server/src/tools/payment-methods/retrieve-payment-methods.ts b/packages/mcp-server/src/tools/payment-methods/retrieve-payment-methods.ts index 11090c1..0474bbd 100644 --- a/packages/mcp-server/src/tools/payment-methods/retrieve-payment-methods.ts +++ b/packages/mcp-server/src/tools/payment-methods/retrieve-payment-methods.ts @@ -25,6 +25,7 @@ export const tool: Tool = { type: 'string', }, }, + required: ['method_id'], }, }; diff --git a/packages/mcp-server/src/tools/payment-methods/set-default-payment-methods.ts b/packages/mcp-server/src/tools/payment-methods/set-default-payment-methods.ts index 0e35ede..8ef5d88 100644 --- a/packages/mcp-server/src/tools/payment-methods/set-default-payment-methods.ts +++ b/packages/mcp-server/src/tools/payment-methods/set-default-payment-methods.ts @@ -35,6 +35,7 @@ export const tool: Tool = { 'A jq filter to apply to the response to include certain fields. Consult the output schema in the tool description to see the fields that are available.\n\nFor example: to include only the `name` field in every object of a results array, you can provide ".results[].name".\n\nFor more information, see the [jq documentation](https://jqlang.org/manual/).', }, }, + required: ['customer_id', 'payment_method_id'], }, }; diff --git a/packages/mcp-server/src/tools/payment-methods/update-payment-methods.ts b/packages/mcp-server/src/tools/payment-methods/update-payment-methods.ts index ca82bc3..c46bb19 100644 --- a/packages/mcp-server/src/tools/payment-methods/update-payment-methods.ts +++ b/packages/mcp-server/src/tools/payment-methods/update-payment-methods.ts @@ -52,6 +52,7 @@ export const tool: Tool = { 'This is a 15 minute expiry token which shall be used from the client to authenticate and perform sessions from the SDK', }, }, + required: ['method_id'], }, }; diff --git a/packages/mcp-server/src/tools/payments/cancel-payments.ts b/packages/mcp-server/src/tools/payments/cancel-payments.ts index a30bd35..0f742f6 100644 --- a/packages/mcp-server/src/tools/payments/cancel-payments.ts +++ b/packages/mcp-server/src/tools/payments/cancel-payments.ts @@ -38,6 +38,7 @@ export const tool: Tool = { 'A jq filter to apply to the response to include certain fields. Consult the output schema in the tool description to see the fields that are available.\n\nFor example: to include only the `name` field in every object of a results array, you can provide ".results[].name".\n\nFor more information, see the [jq documentation](https://jqlang.org/manual/).', }, }, + required: ['payment_id'], $defs: { merchant_connector_details_wrap: { type: 'object', @@ -67,7 +68,6 @@ export const tool: Tool = { description: 'Metadata is useful for storing additional, unstructured information on an object.', }, }, - required: [], }, }, }, diff --git a/packages/mcp-server/src/tools/payments/capture-payments.ts b/packages/mcp-server/src/tools/payments/capture-payments.ts index 921a122..de7b5b8 100644 --- a/packages/mcp-server/src/tools/payments/capture-payments.ts +++ b/packages/mcp-server/src/tools/payments/capture-payments.ts @@ -52,6 +52,7 @@ export const tool: Tool = { "A dynamic suffix that appears on your customer's credit card statement. This is concatenated with the (shortened) descriptor prefix set on your account to form the complete statement descriptor. The combined length should not exceed connector-specific limits (typically 22 characters).", }, }, + required: ['payment_id'], $defs: { merchant_connector_details_wrap: { type: 'object', @@ -81,7 +82,6 @@ export const tool: Tool = { description: 'Metadata is useful for storing additional, unstructured information on an object.', }, }, - required: [], }, }, }, diff --git a/packages/mcp-server/src/tools/payments/complete-authorize-payments.ts b/packages/mcp-server/src/tools/payments/complete-authorize-payments.ts index b8e2b51..56ddff5 100644 --- a/packages/mcp-server/src/tools/payments/complete-authorize-payments.ts +++ b/packages/mcp-server/src/tools/payments/complete-authorize-payments.ts @@ -35,6 +35,7 @@ export const tool: Tool = { $ref: '#/$defs/three_ds_completion_indicator', }, }, + required: ['payment_id', 'client_secret'], $defs: { address: { type: 'object', @@ -57,10 +58,8 @@ export const tool: Tool = { description: 'The contact number', }, }, - required: [], }, }, - required: [], }, address_details: { type: 'object', @@ -103,7 +102,6 @@ export const tool: Tool = { description: 'The zip/postal code for the address', }, }, - required: [], }, country_alpha2: { type: 'string', diff --git a/packages/mcp-server/src/tools/payments/confirm-payments.ts b/packages/mcp-server/src/tools/payments/confirm-payments.ts index cadf275..3378331 100644 --- a/packages/mcp-server/src/tools/payments/confirm-payments.ts +++ b/packages/mcp-server/src/tools/payments/confirm-payments.ts @@ -21,10 +21,8 @@ export const tool: Tool = { inputSchema: { type: 'object', properties: { - payment_id: { + path_payment_id: { type: 'string', - description: - 'Optional. A merchant-provided unique identifier for the payment, contains 30 characters long (e.g., "pay_mbabizu24mvu3mela5njyhpit4"). If provided, it ensures idempotency for the payment creation request. If omitted, Hyperswitch generates a unique ID for the payment.', }, all_keys_required: { type: 'boolean', @@ -153,6 +151,11 @@ export const tool: Tool = { payment_experience: { $ref: '#/$defs/payment_experience', }, + body_payment_id: { + type: 'string', + description: + 'Optional. A merchant-provided unique identifier for the payment, contains 30 characters long (e.g., "pay_mbabizu24mvu3mela5njyhpit4"). If provided, it ensures idempotency for the payment creation request. If omitted, Hyperswitch generates a unique ID for the payment.', + }, payment_link: { type: 'boolean', description: 'Whether to generate the payment link for this payment or not (if applicable)', @@ -268,6 +271,7 @@ export const tool: Tool = { $ref: '#/$defs/three_ds_completion_indicator', }, }, + required: ['path_payment_id'], $defs: { payment_method_type: { type: 'string', @@ -404,10 +408,8 @@ export const tool: Tool = { description: 'The contact number', }, }, - required: [], }, }, - required: [], }, address_details: { type: 'object', @@ -450,7 +452,6 @@ export const tool: Tool = { description: 'The zip/postal code for the address', }, }, - required: [], }, country_alpha2: { type: 'string', @@ -763,7 +764,6 @@ export const tool: Tool = { description: 'User-agent of the browser', }, }, - required: [], }, capture_method: { type: 'string', @@ -913,7 +913,6 @@ export const tool: Tool = { description: 'payload required by airwallex', }, }, - required: [], }, apple_pay: { type: 'object', @@ -997,7 +996,6 @@ export const tool: Tool = { ], }, }, - required: [], }, braintree: { type: 'object', @@ -1024,10 +1022,8 @@ export const tool: Tool = { 'Information about the order category that merchant wants to specify at connector level. (e.g. In Noon Payments it can take values like "pay", "food", or any other custom string set by the merchant in Noon\'s Dashboard)', }, }, - required: [], }, }, - required: [], }, ctp_service_details: { type: 'object', @@ -1052,7 +1048,6 @@ export const tool: Tool = { description: 'session transaction flow id', }, }, - required: [], }, ctp_service_provider: { type: 'string', @@ -1302,7 +1297,6 @@ export const tool: Tool = { description: "A way to update the mandate's payment method details", }, }, - required: [], }, mandate_type: { anyOf: [ @@ -1381,7 +1375,6 @@ export const tool: Tool = { description: 'Metadata is useful for storing additional, unstructured information on an object.', }, }, - required: [], }, order_details_with_amount: { type: 'object', @@ -1643,14 +1636,12 @@ export const tool: Tool = { description: 'Position of the key-value pair in the UI', }, }, - required: [], }, }, required: ['key', 'value'], }, }, }, - required: [], }, payment_method_data_request: { anyOf: [ @@ -1987,7 +1978,6 @@ export const tool: Tool = { description: "paypal's email address", }, }, - required: [], }, }, required: ['paypal_redirect'], @@ -2227,7 +2217,6 @@ export const tool: Tool = { description: 'The billing email', }, }, - required: [], }, }, required: ['klarna_redirect'], @@ -2275,7 +2264,6 @@ export const tool: Tool = { description: 'The billing name', }, }, - required: [], }, }, required: ['afterpay_clearpay_redirect'], @@ -2383,7 +2371,6 @@ export const tool: Tool = { type: 'string', }, }, - required: [], }, }, required: ['blik'], @@ -2469,7 +2456,6 @@ export const tool: Tool = { type: 'string', }, }, - required: [], }, }, required: ['interac'], @@ -2499,7 +2485,6 @@ export const tool: Tool = { type: 'string', }, }, - required: [], }, }, required: ['online_banking_finland'], @@ -2565,7 +2550,6 @@ export const tool: Tool = { $ref: '#/$defs/bank_redirect_billing', }, }, - required: [], }, }, required: ['przelewy24'], @@ -2828,10 +2812,8 @@ export const tool: Tool = { description: 'The Email ID for ACH billing', }, }, - required: [], }, }, - required: [], }, }, required: ['ach_bank_transfer'], @@ -2864,7 +2846,6 @@ export const tool: Tool = { $ref: '#/$defs/sepa_and_bacs_billing_details', }, }, - required: [], }, }, required: ['bacs_bank_transfer'], @@ -2882,10 +2863,8 @@ export const tool: Tool = { type: 'string', }, }, - required: [], }, }, - required: [], }, }, required: ['multibanco_bank_transfer'], @@ -2900,7 +2879,6 @@ export const tool: Tool = { $ref: '#/$defs/doku_billing_details', }, }, - required: [], }, }, required: ['permata_bank_transfer'], @@ -2915,7 +2893,6 @@ export const tool: Tool = { $ref: '#/$defs/doku_billing_details', }, }, - required: [], }, }, required: ['bca_bank_transfer'], @@ -2930,7 +2907,6 @@ export const tool: Tool = { $ref: '#/$defs/doku_billing_details', }, }, - required: [], }, }, required: ['bni_va_bank_transfer'], @@ -2945,7 +2921,6 @@ export const tool: Tool = { $ref: '#/$defs/doku_billing_details', }, }, - required: [], }, }, required: ['bri_va_bank_transfer'], @@ -2960,7 +2935,6 @@ export const tool: Tool = { $ref: '#/$defs/doku_billing_details', }, }, - required: [], }, }, required: ['cimb_va_bank_transfer'], @@ -2975,7 +2949,6 @@ export const tool: Tool = { $ref: '#/$defs/doku_billing_details', }, }, - required: [], }, }, required: ['danamon_va_bank_transfer'], @@ -2990,7 +2963,6 @@ export const tool: Tool = { $ref: '#/$defs/doku_billing_details', }, }, - required: [], }, }, required: ['mandiri_va_bank_transfer'], @@ -3022,7 +2994,6 @@ export const tool: Tool = { description: 'Source bank account number', }, }, - required: [], }, }, required: ['pix'], @@ -3046,7 +3017,6 @@ export const tool: Tool = { type: 'string', }, }, - required: [], }, }, required: ['local_bank_transfer'], @@ -3120,7 +3090,6 @@ export const tool: Tool = { $ref: '#/$defs/address', }, }, - required: [], }, { type: 'object', @@ -3130,7 +3099,6 @@ export const tool: Tool = { $ref: '#/$defs/address', }, }, - required: [], }, { type: 'object', @@ -3148,7 +3116,6 @@ export const tool: Tool = { type: 'string', }, }, - required: [], }, }, required: ['upi_collect'], @@ -3543,7 +3510,6 @@ export const tool: Tool = { description: 'The billing name for bank debits', }, }, - required: [], }, sepa_and_bacs_billing_details: { type: 'object', @@ -3557,7 +3523,6 @@ export const tool: Tool = { description: 'The billing name for SEPA and BACS billing', }, }, - required: [], }, doku_billing_details: { type: 'object', @@ -3575,7 +3540,6 @@ export const tool: Tool = { description: 'The billing second name for Doku', }, }, - required: [], }, real_time_payment_data: { anyOf: [ @@ -3627,7 +3591,6 @@ export const tool: Tool = { type: 'string', }, }, - required: [], }, voucher_data: { anyOf: [ @@ -3646,7 +3609,6 @@ export const tool: Tool = { description: "The shopper's social security number", }, }, - required: [], }, }, required: ['boleto'], @@ -3670,7 +3632,6 @@ export const tool: Tool = { description: 'The billing second name for Alfamart', }, }, - required: [], }, }, required: ['alfamart'], @@ -3694,7 +3655,6 @@ export const tool: Tool = { description: 'The billing second name for Alfamart', }, }, - required: [], }, }, required: ['indomaret'], @@ -3775,7 +3735,6 @@ export const tool: Tool = { description: 'The telephone number for Japanese convenience stores', }, }, - required: [], }, open_banking_data: { type: 'object', diff --git a/packages/mcp-server/src/tools/payments/create-payments.ts b/packages/mcp-server/src/tools/payments/create-payments.ts index 7deaad0..980d792 100644 --- a/packages/mcp-server/src/tools/payments/create-payments.ts +++ b/packages/mcp-server/src/tools/payments/create-payments.ts @@ -277,6 +277,7 @@ export const tool: Tool = { $ref: '#/$defs/three_ds_completion_indicator', }, }, + required: ['amount', 'currency'], $defs: { currency: { type: 'string', @@ -580,10 +581,8 @@ export const tool: Tool = { description: 'The contact number', }, }, - required: [], }, }, - required: [], }, address_details: { type: 'object', @@ -626,7 +625,6 @@ export const tool: Tool = { description: 'The zip/postal code for the address', }, }, - required: [], }, country_alpha2: { type: 'string', @@ -939,7 +937,6 @@ export const tool: Tool = { description: 'User-agent of the browser', }, }, - required: [], }, capture_method: { type: 'string', @@ -1089,7 +1086,6 @@ export const tool: Tool = { description: 'payload required by airwallex', }, }, - required: [], }, apple_pay: { type: 'object', @@ -1173,7 +1169,6 @@ export const tool: Tool = { ], }, }, - required: [], }, braintree: { type: 'object', @@ -1200,10 +1195,8 @@ export const tool: Tool = { 'Information about the order category that merchant wants to specify at connector level. (e.g. In Noon Payments it can take values like "pay", "food", or any other custom string set by the merchant in Noon\'s Dashboard)', }, }, - required: [], }, }, - required: [], }, ctp_service_details: { type: 'object', @@ -1228,7 +1221,6 @@ export const tool: Tool = { description: 'session transaction flow id', }, }, - required: [], }, ctp_service_provider: { type: 'string', @@ -1311,7 +1303,6 @@ export const tool: Tool = { description: "A way to update the mandate's payment method details", }, }, - required: [], }, mandate_type: { anyOf: [ @@ -1390,7 +1381,6 @@ export const tool: Tool = { description: 'Metadata is useful for storing additional, unstructured information on an object.', }, }, - required: [], }, order_details_with_amount: { type: 'object', @@ -1652,14 +1642,12 @@ export const tool: Tool = { description: 'Position of the key-value pair in the UI', }, }, - required: [], }, }, required: ['key', 'value'], }, }, }, - required: [], }, payment_method_data_request: { anyOf: [ @@ -1996,7 +1984,6 @@ export const tool: Tool = { description: "paypal's email address", }, }, - required: [], }, }, required: ['paypal_redirect'], @@ -2236,7 +2223,6 @@ export const tool: Tool = { description: 'The billing email', }, }, - required: [], }, }, required: ['klarna_redirect'], @@ -2284,7 +2270,6 @@ export const tool: Tool = { description: 'The billing name', }, }, - required: [], }, }, required: ['afterpay_clearpay_redirect'], @@ -2392,7 +2377,6 @@ export const tool: Tool = { type: 'string', }, }, - required: [], }, }, required: ['blik'], @@ -2478,7 +2462,6 @@ export const tool: Tool = { type: 'string', }, }, - required: [], }, }, required: ['interac'], @@ -2508,7 +2491,6 @@ export const tool: Tool = { type: 'string', }, }, - required: [], }, }, required: ['online_banking_finland'], @@ -2574,7 +2556,6 @@ export const tool: Tool = { $ref: '#/$defs/bank_redirect_billing', }, }, - required: [], }, }, required: ['przelewy24'], @@ -2837,10 +2818,8 @@ export const tool: Tool = { description: 'The Email ID for ACH billing', }, }, - required: [], }, }, - required: [], }, }, required: ['ach_bank_transfer'], @@ -2873,7 +2852,6 @@ export const tool: Tool = { $ref: '#/$defs/sepa_and_bacs_billing_details', }, }, - required: [], }, }, required: ['bacs_bank_transfer'], @@ -2891,10 +2869,8 @@ export const tool: Tool = { type: 'string', }, }, - required: [], }, }, - required: [], }, }, required: ['multibanco_bank_transfer'], @@ -2909,7 +2885,6 @@ export const tool: Tool = { $ref: '#/$defs/doku_billing_details', }, }, - required: [], }, }, required: ['permata_bank_transfer'], @@ -2924,7 +2899,6 @@ export const tool: Tool = { $ref: '#/$defs/doku_billing_details', }, }, - required: [], }, }, required: ['bca_bank_transfer'], @@ -2939,7 +2913,6 @@ export const tool: Tool = { $ref: '#/$defs/doku_billing_details', }, }, - required: [], }, }, required: ['bni_va_bank_transfer'], @@ -2954,7 +2927,6 @@ export const tool: Tool = { $ref: '#/$defs/doku_billing_details', }, }, - required: [], }, }, required: ['bri_va_bank_transfer'], @@ -2969,7 +2941,6 @@ export const tool: Tool = { $ref: '#/$defs/doku_billing_details', }, }, - required: [], }, }, required: ['cimb_va_bank_transfer'], @@ -2984,7 +2955,6 @@ export const tool: Tool = { $ref: '#/$defs/doku_billing_details', }, }, - required: [], }, }, required: ['danamon_va_bank_transfer'], @@ -2999,7 +2969,6 @@ export const tool: Tool = { $ref: '#/$defs/doku_billing_details', }, }, - required: [], }, }, required: ['mandiri_va_bank_transfer'], @@ -3031,7 +3000,6 @@ export const tool: Tool = { description: 'Source bank account number', }, }, - required: [], }, }, required: ['pix'], @@ -3055,7 +3023,6 @@ export const tool: Tool = { type: 'string', }, }, - required: [], }, }, required: ['local_bank_transfer'], @@ -3129,7 +3096,6 @@ export const tool: Tool = { $ref: '#/$defs/address', }, }, - required: [], }, { type: 'object', @@ -3139,7 +3105,6 @@ export const tool: Tool = { $ref: '#/$defs/address', }, }, - required: [], }, { type: 'object', @@ -3157,7 +3122,6 @@ export const tool: Tool = { type: 'string', }, }, - required: [], }, }, required: ['upi_collect'], @@ -3552,7 +3516,6 @@ export const tool: Tool = { description: 'The billing name for bank debits', }, }, - required: [], }, sepa_and_bacs_billing_details: { type: 'object', @@ -3566,7 +3529,6 @@ export const tool: Tool = { description: 'The billing name for SEPA and BACS billing', }, }, - required: [], }, doku_billing_details: { type: 'object', @@ -3584,7 +3546,6 @@ export const tool: Tool = { description: 'The billing second name for Doku', }, }, - required: [], }, real_time_payment_data: { anyOf: [ @@ -3636,7 +3597,6 @@ export const tool: Tool = { type: 'string', }, }, - required: [], }, voucher_data: { anyOf: [ @@ -3655,7 +3615,6 @@ export const tool: Tool = { description: "The shopper's social security number", }, }, - required: [], }, }, required: ['boleto'], @@ -3679,7 +3638,6 @@ export const tool: Tool = { description: 'The billing second name for Alfamart', }, }, - required: [], }, }, required: ['alfamart'], @@ -3703,7 +3661,6 @@ export const tool: Tool = { description: 'The billing second name for Alfamart', }, }, - required: [], }, }, required: ['indomaret'], @@ -3784,7 +3741,6 @@ export const tool: Tool = { description: 'The telephone number for Japanese convenience stores', }, }, - required: [], }, open_banking_data: { type: 'object', diff --git a/packages/mcp-server/src/tools/payments/create-session-token-payments.ts b/packages/mcp-server/src/tools/payments/create-session-token-payments.ts index 03de6ba..2a6103a 100644 --- a/packages/mcp-server/src/tools/payments/create-session-token-payments.ts +++ b/packages/mcp-server/src/tools/payments/create-session-token-payments.ts @@ -41,6 +41,7 @@ export const tool: Tool = { $ref: '#/$defs/merchant_connector_details_wrap', }, }, + required: ['client_secret', 'payment_id', 'wallets'], $defs: { payment_method_type: { type: 'string', @@ -178,7 +179,6 @@ export const tool: Tool = { description: 'Metadata is useful for storing additional, unstructured information on an object.', }, }, - required: [], }, }, }, diff --git a/packages/mcp-server/src/tools/payments/incremental-authorization-payments.ts b/packages/mcp-server/src/tools/payments/incremental-authorization-payments.ts index 506555f..18e5a72 100644 --- a/packages/mcp-server/src/tools/payments/incremental-authorization-payments.ts +++ b/packages/mcp-server/src/tools/payments/incremental-authorization-payments.ts @@ -33,6 +33,7 @@ export const tool: Tool = { description: 'Reason for incremental authorization', }, }, + required: ['payment_id', 'amount'], }, }; diff --git a/packages/mcp-server/src/tools/payments/list-payments.ts b/packages/mcp-server/src/tools/payments/list-payments.ts index 4d3b517..fda29f9 100644 --- a/packages/mcp-server/src/tools/payments/list-payments.ts +++ b/packages/mcp-server/src/tools/payments/list-payments.ts @@ -63,6 +63,7 @@ export const tool: Tool = { description: 'A cursor for use in pagination, fetch the next list after some object', }, }, + required: [], }, }; diff --git a/packages/mcp-server/src/tools/payments/number-3ds/authenticate-payments-number-3ds.ts b/packages/mcp-server/src/tools/payments/number-3ds/authenticate-payments-number-3ds.ts index 29984fd..903d94f 100644 --- a/packages/mcp-server/src/tools/payments/number-3ds/authenticate-payments-number-3ds.ts +++ b/packages/mcp-server/src/tools/payments/number-3ds/authenticate-payments-number-3ds.ts @@ -88,6 +88,7 @@ export const tool: Tool = { 'A jq filter to apply to the response to include certain fields. Consult the output schema in the tool description to see the fields that are available.\n\nFor example: to include only the `name` field in every object of a results array, you can provide ".results[].name".\n\nFor more information, see the [jq documentation](https://jqlang.org/manual/).', }, }, + required: ['payment_id', 'client_secret', 'device_channel', 'threeds_method_comp_ind'], $defs: { three_ds_completion_indicator: { type: 'string', diff --git a/packages/mcp-server/src/tools/payments/post-session-tokens-payments.ts b/packages/mcp-server/src/tools/payments/post-session-tokens-payments.ts index f520f0d..0a50bfc 100644 --- a/packages/mcp-server/src/tools/payments/post-session-tokens-payments.ts +++ b/packages/mcp-server/src/tools/payments/post-session-tokens-payments.ts @@ -53,6 +53,7 @@ export const tool: Tool = { $ref: '#/$defs/payment_method_type', }, }, + required: ['payment_id', 'client_secret', 'payment_method', 'payment_method_type'], $defs: { payment_method_type: { type: 'string', diff --git a/packages/mcp-server/src/tools/payments/retrieve-payments.ts b/packages/mcp-server/src/tools/payments/retrieve-payments.ts index 2b53846..546332a 100644 --- a/packages/mcp-server/src/tools/payments/retrieve-payments.ts +++ b/packages/mcp-server/src/tools/payments/retrieve-payments.ts @@ -42,6 +42,7 @@ export const tool: Tool = { description: 'Decider to enable or disable the connector call for retrieve request', }, }, + required: ['payment_id'], }, }; diff --git a/packages/mcp-server/src/tools/payments/update-metadata-payments.ts b/packages/mcp-server/src/tools/payments/update-metadata-payments.ts index 92a3237..0f0cadd 100644 --- a/packages/mcp-server/src/tools/payments/update-metadata-payments.ts +++ b/packages/mcp-server/src/tools/payments/update-metadata-payments.ts @@ -36,6 +36,7 @@ export const tool: Tool = { 'A jq filter to apply to the response to include certain fields. Consult the output schema in the tool description to see the fields that are available.\n\nFor example: to include only the `name` field in every object of a results array, you can provide ".results[].name".\n\nFor more information, see the [jq documentation](https://jqlang.org/manual/).', }, }, + required: ['payment_id', 'metadata'], }, }; diff --git a/packages/mcp-server/src/tools/payments/update-payments.ts b/packages/mcp-server/src/tools/payments/update-payments.ts index 4289ee3..f1f380d 100644 --- a/packages/mcp-server/src/tools/payments/update-payments.ts +++ b/packages/mcp-server/src/tools/payments/update-payments.ts @@ -21,10 +21,8 @@ export const tool: Tool = { inputSchema: { type: 'object', properties: { - payment_id: { + path_payment_id: { type: 'string', - description: - 'Optional. A merchant-provided unique identifier for the payment, contains 30 characters long (e.g., "pay_mbabizu24mvu3mela5njyhpit4"). If provided, it ensures idempotency for the payment creation request. If omitted, Hyperswitch generates a unique ID for the payment.', }, all_keys_required: { type: 'boolean', @@ -144,6 +142,11 @@ export const tool: Tool = { payment_experience: { $ref: '#/$defs/payment_experience', }, + body_payment_id: { + type: 'string', + description: + 'Optional. A merchant-provided unique identifier for the payment, contains 30 characters long (e.g., "pay_mbabizu24mvu3mela5njyhpit4"). If provided, it ensures idempotency for the payment creation request. If omitted, Hyperswitch generates a unique ID for the payment.', + }, payment_link: { type: 'boolean', description: 'Whether to generate the payment link for this payment or not (if applicable)', @@ -262,6 +265,7 @@ export const tool: Tool = { $ref: '#/$defs/three_ds_completion_indicator', }, }, + required: ['path_payment_id'], $defs: { payment_method_type: { type: 'string', @@ -398,10 +402,8 @@ export const tool: Tool = { description: 'The contact number', }, }, - required: [], }, }, - required: [], }, address_details: { type: 'object', @@ -444,7 +446,6 @@ export const tool: Tool = { description: 'The zip/postal code for the address', }, }, - required: [], }, country_alpha2: { type: 'string', @@ -757,7 +758,6 @@ export const tool: Tool = { description: 'User-agent of the browser', }, }, - required: [], }, capture_method: { type: 'string', @@ -907,7 +907,6 @@ export const tool: Tool = { description: 'payload required by airwallex', }, }, - required: [], }, apple_pay: { type: 'object', @@ -991,7 +990,6 @@ export const tool: Tool = { ], }, }, - required: [], }, braintree: { type: 'object', @@ -1018,10 +1016,8 @@ export const tool: Tool = { 'Information about the order category that merchant wants to specify at connector level. (e.g. In Noon Payments it can take values like "pay", "food", or any other custom string set by the merchant in Noon\'s Dashboard)', }, }, - required: [], }, }, - required: [], }, ctp_service_details: { type: 'object', @@ -1046,7 +1042,6 @@ export const tool: Tool = { description: 'session transaction flow id', }, }, - required: [], }, ctp_service_provider: { type: 'string', @@ -1296,7 +1291,6 @@ export const tool: Tool = { description: "A way to update the mandate's payment method details", }, }, - required: [], }, mandate_type: { anyOf: [ @@ -1375,7 +1369,6 @@ export const tool: Tool = { description: 'Metadata is useful for storing additional, unstructured information on an object.', }, }, - required: [], }, order_details_with_amount: { type: 'object', @@ -1637,14 +1630,12 @@ export const tool: Tool = { description: 'Position of the key-value pair in the UI', }, }, - required: [], }, }, required: ['key', 'value'], }, }, }, - required: [], }, payment_method_data_request: { anyOf: [ @@ -1981,7 +1972,6 @@ export const tool: Tool = { description: "paypal's email address", }, }, - required: [], }, }, required: ['paypal_redirect'], @@ -2221,7 +2211,6 @@ export const tool: Tool = { description: 'The billing email', }, }, - required: [], }, }, required: ['klarna_redirect'], @@ -2269,7 +2258,6 @@ export const tool: Tool = { description: 'The billing name', }, }, - required: [], }, }, required: ['afterpay_clearpay_redirect'], @@ -2377,7 +2365,6 @@ export const tool: Tool = { type: 'string', }, }, - required: [], }, }, required: ['blik'], @@ -2463,7 +2450,6 @@ export const tool: Tool = { type: 'string', }, }, - required: [], }, }, required: ['interac'], @@ -2493,7 +2479,6 @@ export const tool: Tool = { type: 'string', }, }, - required: [], }, }, required: ['online_banking_finland'], @@ -2559,7 +2544,6 @@ export const tool: Tool = { $ref: '#/$defs/bank_redirect_billing', }, }, - required: [], }, }, required: ['przelewy24'], @@ -2822,10 +2806,8 @@ export const tool: Tool = { description: 'The Email ID for ACH billing', }, }, - required: [], }, }, - required: [], }, }, required: ['ach_bank_transfer'], @@ -2858,7 +2840,6 @@ export const tool: Tool = { $ref: '#/$defs/sepa_and_bacs_billing_details', }, }, - required: [], }, }, required: ['bacs_bank_transfer'], @@ -2876,10 +2857,8 @@ export const tool: Tool = { type: 'string', }, }, - required: [], }, }, - required: [], }, }, required: ['multibanco_bank_transfer'], @@ -2894,7 +2873,6 @@ export const tool: Tool = { $ref: '#/$defs/doku_billing_details', }, }, - required: [], }, }, required: ['permata_bank_transfer'], @@ -2909,7 +2887,6 @@ export const tool: Tool = { $ref: '#/$defs/doku_billing_details', }, }, - required: [], }, }, required: ['bca_bank_transfer'], @@ -2924,7 +2901,6 @@ export const tool: Tool = { $ref: '#/$defs/doku_billing_details', }, }, - required: [], }, }, required: ['bni_va_bank_transfer'], @@ -2939,7 +2915,6 @@ export const tool: Tool = { $ref: '#/$defs/doku_billing_details', }, }, - required: [], }, }, required: ['bri_va_bank_transfer'], @@ -2954,7 +2929,6 @@ export const tool: Tool = { $ref: '#/$defs/doku_billing_details', }, }, - required: [], }, }, required: ['cimb_va_bank_transfer'], @@ -2969,7 +2943,6 @@ export const tool: Tool = { $ref: '#/$defs/doku_billing_details', }, }, - required: [], }, }, required: ['danamon_va_bank_transfer'], @@ -2984,7 +2957,6 @@ export const tool: Tool = { $ref: '#/$defs/doku_billing_details', }, }, - required: [], }, }, required: ['mandiri_va_bank_transfer'], @@ -3016,7 +2988,6 @@ export const tool: Tool = { description: 'Source bank account number', }, }, - required: [], }, }, required: ['pix'], @@ -3040,7 +3011,6 @@ export const tool: Tool = { type: 'string', }, }, - required: [], }, }, required: ['local_bank_transfer'], @@ -3114,7 +3084,6 @@ export const tool: Tool = { $ref: '#/$defs/address', }, }, - required: [], }, { type: 'object', @@ -3124,7 +3093,6 @@ export const tool: Tool = { $ref: '#/$defs/address', }, }, - required: [], }, { type: 'object', @@ -3142,7 +3110,6 @@ export const tool: Tool = { type: 'string', }, }, - required: [], }, }, required: ['upi_collect'], @@ -3537,7 +3504,6 @@ export const tool: Tool = { description: 'The billing name for bank debits', }, }, - required: [], }, sepa_and_bacs_billing_details: { type: 'object', @@ -3551,7 +3517,6 @@ export const tool: Tool = { description: 'The billing name for SEPA and BACS billing', }, }, - required: [], }, doku_billing_details: { type: 'object', @@ -3569,7 +3534,6 @@ export const tool: Tool = { description: 'The billing second name for Doku', }, }, - required: [], }, real_time_payment_data: { anyOf: [ @@ -3621,7 +3585,6 @@ export const tool: Tool = { type: 'string', }, }, - required: [], }, voucher_data: { anyOf: [ @@ -3640,7 +3603,6 @@ export const tool: Tool = { description: "The shopper's social security number", }, }, - required: [], }, }, required: ['boleto'], @@ -3664,7 +3626,6 @@ export const tool: Tool = { description: 'The billing second name for Alfamart', }, }, - required: [], }, }, required: ['alfamart'], @@ -3688,7 +3649,6 @@ export const tool: Tool = { description: 'The billing second name for Alfamart', }, }, - required: [], }, }, required: ['indomaret'], @@ -3769,7 +3729,6 @@ export const tool: Tool = { description: 'The telephone number for Japanese convenience stores', }, }, - required: [], }, open_banking_data: { type: 'object', diff --git a/packages/mcp-server/src/tools/payouts/cancel-payouts.ts b/packages/mcp-server/src/tools/payouts/cancel-payouts.ts index fb3d206..3bcef53 100644 --- a/packages/mcp-server/src/tools/payouts/cancel-payouts.ts +++ b/packages/mcp-server/src/tools/payouts/cancel-payouts.ts @@ -21,12 +21,16 @@ export const tool: Tool = { inputSchema: { type: 'object', properties: { - payout_id: { + path_payout_id: { + type: 'string', + }, + body_payout_id: { type: 'string', description: 'Unique identifier for the payout. This ensures idempotency for multiple payouts\nthat have been done by a single merchant. This field is auto generated and is returned in the API response.', }, }, + required: ['path_payout_id', 'body_payout_id'], }, }; diff --git a/packages/mcp-server/src/tools/payouts/confirm-payouts.ts b/packages/mcp-server/src/tools/payouts/confirm-payouts.ts index 84a3651..fedec97 100644 --- a/packages/mcp-server/src/tools/payouts/confirm-payouts.ts +++ b/packages/mcp-server/src/tools/payouts/confirm-payouts.ts @@ -141,6 +141,7 @@ export const tool: Tool = { 'Will be used to expire client secret after certain amount of time to be supplied in seconds\n(900) for 15 mins', }, }, + required: ['payout_id', 'client_secret'], $defs: { address: { type: 'object', @@ -163,10 +164,8 @@ export const tool: Tool = { description: 'The contact number', }, }, - required: [], }, }, - required: [], }, address_details: { type: 'object', @@ -209,7 +208,6 @@ export const tool: Tool = { description: 'The zip/postal code for the address', }, }, - required: [], }, country_alpha2: { type: 'string', @@ -714,7 +712,6 @@ export const tool: Tool = { description: 'Primary color to be used in the form represented in hex format', }, }, - required: [], }, method_data: { anyOf: [ diff --git a/packages/mcp-server/src/tools/payouts/create-payouts.ts b/packages/mcp-server/src/tools/payouts/create-payouts.ts index 0d9e65d..d413a2a 100644 --- a/packages/mcp-server/src/tools/payouts/create-payouts.ts +++ b/packages/mcp-server/src/tools/payouts/create-payouts.ts @@ -139,6 +139,7 @@ export const tool: Tool = { 'Will be used to expire client secret after certain amount of time to be supplied in seconds\n(900) for 15 mins', }, }, + required: ['amount', 'currency'], $defs: { currency: { type: 'string', @@ -328,10 +329,8 @@ export const tool: Tool = { description: 'The contact number', }, }, - required: [], }, }, - required: [], }, address_details: { type: 'object', @@ -374,7 +373,6 @@ export const tool: Tool = { description: 'The zip/postal code for the address', }, }, - required: [], }, country_alpha2: { type: 'string', @@ -712,7 +710,6 @@ export const tool: Tool = { description: 'Primary color to be used in the form represented in hex format', }, }, - required: [], }, method_data: { anyOf: [ diff --git a/packages/mcp-server/src/tools/payouts/fulfill-payouts.ts b/packages/mcp-server/src/tools/payouts/fulfill-payouts.ts index b6ee4fb..abe5cf1 100644 --- a/packages/mcp-server/src/tools/payouts/fulfill-payouts.ts +++ b/packages/mcp-server/src/tools/payouts/fulfill-payouts.ts @@ -21,12 +21,16 @@ export const tool: Tool = { inputSchema: { type: 'object', properties: { - payout_id: { + path_payout_id: { + type: 'string', + }, + body_payout_id: { type: 'string', description: 'Unique identifier for the payout. This ensures idempotency for multiple payouts\nthat have been done by a single merchant. This field is auto generated and is returned in the API response.', }, }, + required: ['path_payout_id', 'body_payout_id'], }, }; diff --git a/packages/mcp-server/src/tools/payouts/list-filters-payouts.ts b/packages/mcp-server/src/tools/payouts/list-filters-payouts.ts index ea67442..a18963d 100644 --- a/packages/mcp-server/src/tools/payouts/list-filters-payouts.ts +++ b/packages/mcp-server/src/tools/payouts/list-filters-payouts.ts @@ -41,6 +41,7 @@ export const tool: Tool = { 'A jq filter to apply to the response to include certain fields. Consult the output schema in the tool description to see the fields that are available.\n\nFor example: to include only the `name` field in every object of a results array, you can provide ".results[].name".\n\nFor more information, see the [jq documentation](https://jqlang.org/manual/).', }, }, + required: ['start_time'], }, }; diff --git a/packages/mcp-server/src/tools/payouts/list/retrieve-payouts-list.ts b/packages/mcp-server/src/tools/payouts/list/retrieve-payouts-list.ts index 56bb3ef..4cf3d05 100644 --- a/packages/mcp-server/src/tools/payouts/list/retrieve-payouts-list.ts +++ b/packages/mcp-server/src/tools/payouts/list/retrieve-payouts-list.ts @@ -47,6 +47,7 @@ export const tool: Tool = { 'The time range for which objects are needed. TimeRange has two fields start_time and end_time from which objects can be filtered as per required scenarios (created_at, time less than, greater than etc).', }, }, + required: ['created', 'customer_id', 'ending_before', 'limit', 'starting_after', 'time_range'], }, }; diff --git a/packages/mcp-server/src/tools/payouts/list/with-filters-payouts-list.ts b/packages/mcp-server/src/tools/payouts/list/with-filters-payouts-list.ts index 8ae214f..8ccd51b 100644 --- a/packages/mcp-server/src/tools/payouts/list/with-filters-payouts-list.ts +++ b/packages/mcp-server/src/tools/payouts/list/with-filters-payouts-list.ts @@ -81,6 +81,7 @@ export const tool: Tool = { }, }, }, + required: ['currency', 'entity_type', 'start_time'], $defs: { currency: { type: 'string', diff --git a/packages/mcp-server/src/tools/payouts/retrieve-payouts.ts b/packages/mcp-server/src/tools/payouts/retrieve-payouts.ts index 7756fd7..7d00fa0 100644 --- a/packages/mcp-server/src/tools/payouts/retrieve-payouts.ts +++ b/packages/mcp-server/src/tools/payouts/retrieve-payouts.ts @@ -29,6 +29,7 @@ export const tool: Tool = { description: 'Sync with the connector to get the payout details (defaults to false)', }, }, + required: ['payout_id'], }, }; diff --git a/packages/mcp-server/src/tools/payouts/update-payouts.ts b/packages/mcp-server/src/tools/payouts/update-payouts.ts index 9e7978c..5eb307f 100644 --- a/packages/mcp-server/src/tools/payouts/update-payouts.ts +++ b/packages/mcp-server/src/tools/payouts/update-payouts.ts @@ -146,6 +146,7 @@ export const tool: Tool = { 'Will be used to expire client secret after certain amount of time to be supplied in seconds\n(900) for 15 mins', }, }, + required: ['payout_id'], $defs: { address: { type: 'object', @@ -168,10 +169,8 @@ export const tool: Tool = { description: 'The contact number', }, }, - required: [], }, }, - required: [], }, address_details: { type: 'object', @@ -214,7 +213,6 @@ export const tool: Tool = { description: 'The zip/postal code for the address', }, }, - required: [], }, country_alpha2: { type: 'string', @@ -719,7 +717,6 @@ export const tool: Tool = { description: 'Primary color to be used in the form represented in hex format', }, }, - required: [], }, method_data: { anyOf: [ diff --git a/packages/mcp-server/src/tools/poll/retrieve-status-poll.ts b/packages/mcp-server/src/tools/poll/retrieve-status-poll.ts index 2938192..293bbb1 100644 --- a/packages/mcp-server/src/tools/poll/retrieve-status-poll.ts +++ b/packages/mcp-server/src/tools/poll/retrieve-status-poll.ts @@ -32,6 +32,7 @@ export const tool: Tool = { 'A jq filter to apply to the response to include certain fields. Consult the output schema in the tool description to see the fields that are available.\n\nFor example: to include only the `name` field in every object of a results array, you can provide ".results[].name".\n\nFor more information, see the [jq documentation](https://jqlang.org/manual/).', }, }, + required: ['poll_id'], }, }; diff --git a/packages/mcp-server/src/tools/profile-acquirers/create-profile-acquirers.ts b/packages/mcp-server/src/tools/profile-acquirers/create-profile-acquirers.ts index a6ef0fc..7deea61 100644 --- a/packages/mcp-server/src/tools/profile-acquirers/create-profile-acquirers.ts +++ b/packages/mcp-server/src/tools/profile-acquirers/create-profile-acquirers.ts @@ -61,6 +61,15 @@ export const tool: Tool = { 'A jq filter to apply to the response to include certain fields. Consult the output schema in the tool description to see the fields that are available.\n\nFor example: to include only the `name` field in every object of a results array, you can provide ".results[].name".\n\nFor more information, see the [jq documentation](https://jqlang.org/manual/).', }, }, + required: [ + 'acquirer_assigned_merchant_id', + 'acquirer_bin', + 'acquirer_fraud_rate', + 'merchant_country_code', + 'merchant_name', + 'network', + 'profile_id', + ], }, }; diff --git a/packages/mcp-server/src/tools/profile-acquirers/update-profile-acquirers.ts b/packages/mcp-server/src/tools/profile-acquirers/update-profile-acquirers.ts index 1b78186..194911e 100644 --- a/packages/mcp-server/src/tools/profile-acquirers/update-profile-acquirers.ts +++ b/packages/mcp-server/src/tools/profile-acquirers/update-profile-acquirers.ts @@ -56,6 +56,7 @@ export const tool: Tool = { 'A jq filter to apply to the response to include certain fields. Consult the output schema in the tool description to see the fields that are available.\n\nFor example: to include only the `name` field in every object of a results array, you can provide ".results[].name".\n\nFor more information, see the [jq documentation](https://jqlang.org/manual/).', }, }, + required: ['profile_id', 'profile_acquirer_id'], }, }; diff --git a/packages/mcp-server/src/tools/refunds/create-refunds.ts b/packages/mcp-server/src/tools/refunds/create-refunds.ts index cd30713..8bb98c6 100644 --- a/packages/mcp-server/src/tools/refunds/create-refunds.ts +++ b/packages/mcp-server/src/tools/refunds/create-refunds.ts @@ -61,6 +61,7 @@ export const tool: Tool = { $ref: '#/$defs/split_refund', }, }, + required: ['payment_id'], $defs: { merchant_connector_details_wrap: { type: 'object', @@ -90,7 +91,6 @@ export const tool: Tool = { description: 'Metadata is useful for storing additional, unstructured information on an object.', }, }, - required: [], }, split_refund: { anyOf: [ @@ -113,7 +113,6 @@ export const tool: Tool = { "Toggle for reverting the transfer that was made during the charge.\nIf set to false, the funds are pulled from the main platform's account.", }, }, - required: [], }, }, required: ['stripe_split_refund'], diff --git a/packages/mcp-server/src/tools/refunds/list-refunds.ts b/packages/mcp-server/src/tools/refunds/list-refunds.ts index 94ce76c..b914355 100644 --- a/packages/mcp-server/src/tools/refunds/list-refunds.ts +++ b/packages/mcp-server/src/tools/refunds/list-refunds.ts @@ -41,7 +41,6 @@ export const tool: Tool = { 'The start amount to filter list of transactions which are greater than or equal to the start amount', }, }, - required: [], }, connector: { type: 'array', @@ -98,6 +97,7 @@ export const tool: Tool = { }, }, }, + required: ['start_time'], $defs: { currency: { type: 'string', diff --git a/packages/mcp-server/src/tools/refunds/retrieve-refunds.ts b/packages/mcp-server/src/tools/refunds/retrieve-refunds.ts index fb5d3c6..1dd6bdc 100644 --- a/packages/mcp-server/src/tools/refunds/retrieve-refunds.ts +++ b/packages/mcp-server/src/tools/refunds/retrieve-refunds.ts @@ -18,7 +18,7 @@ export const metadata: Metadata = { export const tool: Tool = { name: 'retrieve_refunds', description: - "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\nRetrieves a Refund. This may be used to get the status of a previously initiated refund\n\n# Response Schema\n```json\n{\n $ref: '#/$defs/refund_response',\n $defs: {\n refund_response: {\n type: 'object',\n properties: {\n amount: {\n type: 'integer',\n description: 'The refund amount, which should be less than or equal to the total payment amount. Amount for the payment in lowest denomination of the currency. (i.e) in cents for USD denomination, in paisa for INR denomination etc'\n },\n connector: {\n type: 'string',\n description: 'The connector used for the refund and the corresponding payment'\n },\n currency: {\n type: 'string',\n description: 'The three-letter ISO currency code'\n },\n payment_id: {\n type: 'string',\n description: 'The payment id against which refund is initiated'\n },\n refund_id: {\n type: 'string',\n description: 'Unique Identifier for the refund'\n },\n status: {\n $ref: '#/$defs/refund_status'\n },\n created_at: {\n type: 'string',\n description: 'The timestamp at which refund is created',\n format: 'date-time'\n },\n error_code: {\n type: 'string',\n description: 'The code for the error'\n },\n error_message: {\n type: 'string',\n description: 'The error message'\n },\n issuer_error_code: {\n type: 'string',\n description: 'Error code received from the issuer in case of failed refunds'\n },\n issuer_error_message: {\n type: 'string',\n description: 'Error message received from the issuer in case of failed refunds'\n },\n merchant_connector_id: {\n type: 'string',\n description: 'The merchant_connector_id of the processor through which this payment went through'\n },\n metadata: {\n type: 'object',\n description: 'You can specify up to 50 keys, with key names up to 40 characters long and values up to 500 characters long. Metadata is useful for storing additional, structured information on an object'\n },\n profile_id: {\n type: 'string',\n description: 'The id of business profile for this refund'\n },\n reason: {\n type: 'string',\n description: 'An arbitrary string attached to the object. Often useful for displaying to users and your customer support executive'\n },\n split_refunds: {\n $ref: '#/$defs/split_refund'\n },\n unified_code: {\n type: 'string',\n description: 'Error code unified across the connectors is received here if there was an error while calling connector'\n },\n unified_message: {\n type: 'string',\n description: 'Error message unified across the connectors is received here if there was an error while calling connector'\n },\n updated_at: {\n type: 'string',\n description: 'The timestamp at which refund is updated',\n format: 'date-time'\n }\n },\n required: [ 'amount',\n 'connector',\n 'currency',\n 'payment_id',\n 'refund_id',\n 'status'\n ]\n },\n refund_status: {\n type: 'string',\n description: 'The status for refunds',\n enum: [ 'succeeded',\n 'failed',\n 'pending',\n 'review'\n ]\n },\n split_refund: {\n anyOf: [ {\n type: 'object',\n properties: {\n stripe_split_refund: {\n type: 'object',\n description: 'Charge specific fields for controlling the revert of funds from either platform or connected account for Stripe. Check sub-fields for more details.',\n properties: {\n revert_platform_fee: {\n type: 'boolean',\n description: 'Toggle for reverting the application fee that was collected for the payment.\\nIf set to false, the funds are pulled from the destination account.'\n },\n revert_transfer: {\n type: 'boolean',\n description: 'Toggle for reverting the transfer that was made during the charge.\\nIf set to false, the funds are pulled from the main platform\\'s account.'\n }\n },\n required: []\n }\n },\n required: [ 'stripe_split_refund'\n ]\n },\n {\n type: 'object',\n properties: {\n adyen_split_refund: {\n $ref: '#/$defs/adyen_split_data'\n }\n },\n required: [ 'adyen_split_refund'\n ]\n },\n {\n type: 'object',\n properties: {\n xendit_split_refund: {\n $ref: '#/$defs/xendit_split_sub_merchant_data'\n }\n },\n required: [ 'xendit_split_refund'\n ]\n }\n ],\n description: 'Charge specific fields for controlling the revert of funds from either platform or connected account. Check sub-fields for more details.'\n },\n adyen_split_data: {\n type: 'object',\n description: 'Fee information for Split Payments to be charged on the payment being collected for Adyen',\n properties: {\n split_items: {\n type: 'array',\n description: 'Data for the split items',\n items: {\n type: 'object',\n description: 'Data for the split items',\n properties: {\n amount: {\n type: 'integer',\n description: 'The amount of the split item'\n },\n reference: {\n type: 'string',\n description: 'Unique Identifier for the split item'\n },\n split_type: {\n type: 'string',\n enum: [ 'BalanceAccount',\n 'AcquiringFees',\n 'PaymentFee',\n 'AdyenFees',\n 'AdyenCommission',\n 'AdyenMarkup',\n 'Interchange',\n 'SchemeFee',\n 'Commission',\n 'TopUp',\n 'Vat'\n ]\n },\n account: {\n type: 'string',\n description: 'The unique identifier of the account to which the split amount is allocated.'\n },\n description: {\n type: 'string',\n description: 'Description for the part of the payment that will be allocated to the specified account.'\n }\n },\n required: [ 'amount',\n 'reference',\n 'split_type'\n ]\n }\n },\n store: {\n type: 'string',\n description: 'The store identifier'\n }\n },\n required: [ 'split_items'\n ]\n },\n xendit_split_sub_merchant_data: {\n type: 'object',\n description: 'Fee information to be charged on the payment being collected for sub-merchant via xendit',\n properties: {\n for_user_id: {\n type: 'string',\n description: 'The sub-account user-id that you want to make this transaction for.'\n }\n },\n required: [ 'for_user_id'\n ]\n }\n }\n}\n```", + "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\nRetrieves a Refund. This may be used to get the status of a previously initiated refund\n\n# Response Schema\n```json\n{\n $ref: '#/$defs/refund_response',\n $defs: {\n refund_response: {\n type: 'object',\n properties: {\n amount: {\n type: 'integer',\n description: 'The refund amount, which should be less than or equal to the total payment amount. Amount for the payment in lowest denomination of the currency. (i.e) in cents for USD denomination, in paisa for INR denomination etc'\n },\n connector: {\n type: 'string',\n description: 'The connector used for the refund and the corresponding payment'\n },\n currency: {\n type: 'string',\n description: 'The three-letter ISO currency code'\n },\n payment_id: {\n type: 'string',\n description: 'The payment id against which refund is initiated'\n },\n refund_id: {\n type: 'string',\n description: 'Unique Identifier for the refund'\n },\n status: {\n $ref: '#/$defs/refund_status'\n },\n created_at: {\n type: 'string',\n description: 'The timestamp at which refund is created',\n format: 'date-time'\n },\n error_code: {\n type: 'string',\n description: 'The code for the error'\n },\n error_message: {\n type: 'string',\n description: 'The error message'\n },\n issuer_error_code: {\n type: 'string',\n description: 'Error code received from the issuer in case of failed refunds'\n },\n issuer_error_message: {\n type: 'string',\n description: 'Error message received from the issuer in case of failed refunds'\n },\n merchant_connector_id: {\n type: 'string',\n description: 'The merchant_connector_id of the processor through which this payment went through'\n },\n metadata: {\n type: 'object',\n description: 'You can specify up to 50 keys, with key names up to 40 characters long and values up to 500 characters long. Metadata is useful for storing additional, structured information on an object'\n },\n profile_id: {\n type: 'string',\n description: 'The id of business profile for this refund'\n },\n reason: {\n type: 'string',\n description: 'An arbitrary string attached to the object. Often useful for displaying to users and your customer support executive'\n },\n split_refunds: {\n $ref: '#/$defs/split_refund'\n },\n unified_code: {\n type: 'string',\n description: 'Error code unified across the connectors is received here if there was an error while calling connector'\n },\n unified_message: {\n type: 'string',\n description: 'Error message unified across the connectors is received here if there was an error while calling connector'\n },\n updated_at: {\n type: 'string',\n description: 'The timestamp at which refund is updated',\n format: 'date-time'\n }\n },\n required: [ 'amount',\n 'connector',\n 'currency',\n 'payment_id',\n 'refund_id',\n 'status'\n ]\n },\n refund_status: {\n type: 'string',\n description: 'The status for refunds',\n enum: [ 'succeeded',\n 'failed',\n 'pending',\n 'review'\n ]\n },\n split_refund: {\n anyOf: [ {\n type: 'object',\n properties: {\n stripe_split_refund: {\n type: 'object',\n description: 'Charge specific fields for controlling the revert of funds from either platform or connected account for Stripe. Check sub-fields for more details.',\n properties: {\n revert_platform_fee: {\n type: 'boolean',\n description: 'Toggle for reverting the application fee that was collected for the payment.\\nIf set to false, the funds are pulled from the destination account.'\n },\n revert_transfer: {\n type: 'boolean',\n description: 'Toggle for reverting the transfer that was made during the charge.\\nIf set to false, the funds are pulled from the main platform\\'s account.'\n }\n }\n }\n },\n required: [ 'stripe_split_refund'\n ]\n },\n {\n type: 'object',\n properties: {\n adyen_split_refund: {\n $ref: '#/$defs/adyen_split_data'\n }\n },\n required: [ 'adyen_split_refund'\n ]\n },\n {\n type: 'object',\n properties: {\n xendit_split_refund: {\n $ref: '#/$defs/xendit_split_sub_merchant_data'\n }\n },\n required: [ 'xendit_split_refund'\n ]\n }\n ],\n description: 'Charge specific fields for controlling the revert of funds from either platform or connected account. Check sub-fields for more details.'\n },\n adyen_split_data: {\n type: 'object',\n description: 'Fee information for Split Payments to be charged on the payment being collected for Adyen',\n properties: {\n split_items: {\n type: 'array',\n description: 'Data for the split items',\n items: {\n type: 'object',\n description: 'Data for the split items',\n properties: {\n amount: {\n type: 'integer',\n description: 'The amount of the split item'\n },\n reference: {\n type: 'string',\n description: 'Unique Identifier for the split item'\n },\n split_type: {\n type: 'string',\n enum: [ 'BalanceAccount',\n 'AcquiringFees',\n 'PaymentFee',\n 'AdyenFees',\n 'AdyenCommission',\n 'AdyenMarkup',\n 'Interchange',\n 'SchemeFee',\n 'Commission',\n 'TopUp',\n 'Vat'\n ]\n },\n account: {\n type: 'string',\n description: 'The unique identifier of the account to which the split amount is allocated.'\n },\n description: {\n type: 'string',\n description: 'Description for the part of the payment that will be allocated to the specified account.'\n }\n },\n required: [ 'amount',\n 'reference',\n 'split_type'\n ]\n }\n },\n store: {\n type: 'string',\n description: 'The store identifier'\n }\n },\n required: [ 'split_items'\n ]\n },\n xendit_split_sub_merchant_data: {\n type: 'object',\n description: 'Fee information to be charged on the payment being collected for sub-merchant via xendit',\n properties: {\n for_user_id: {\n type: 'string',\n description: 'The sub-account user-id that you want to make this transaction for.'\n }\n },\n required: [ 'for_user_id'\n ]\n }\n }\n}\n```", inputSchema: { type: 'object', properties: { @@ -32,6 +32,7 @@ export const tool: Tool = { 'A jq filter to apply to the response to include certain fields. Consult the output schema in the tool description to see the fields that are available.\n\nFor example: to include only the `name` field in every object of a results array, you can provide ".results[].name".\n\nFor more information, see the [jq documentation](https://jqlang.org/manual/).', }, }, + required: ['refund_id'], }, }; diff --git a/packages/mcp-server/src/tools/refunds/update-refunds.ts b/packages/mcp-server/src/tools/refunds/update-refunds.ts index 464b178..27a01b0 100644 --- a/packages/mcp-server/src/tools/refunds/update-refunds.ts +++ b/packages/mcp-server/src/tools/refunds/update-refunds.ts @@ -18,7 +18,7 @@ export const metadata: Metadata = { export const tool: Tool = { name: 'update_refunds', description: - "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\nUpdates the properties of a Refund object. This API can be used to attach a reason for the refund or metadata fields\n\n# Response Schema\n```json\n{\n $ref: '#/$defs/refund_response',\n $defs: {\n refund_response: {\n type: 'object',\n properties: {\n amount: {\n type: 'integer',\n description: 'The refund amount, which should be less than or equal to the total payment amount. Amount for the payment in lowest denomination of the currency. (i.e) in cents for USD denomination, in paisa for INR denomination etc'\n },\n connector: {\n type: 'string',\n description: 'The connector used for the refund and the corresponding payment'\n },\n currency: {\n type: 'string',\n description: 'The three-letter ISO currency code'\n },\n payment_id: {\n type: 'string',\n description: 'The payment id against which refund is initiated'\n },\n refund_id: {\n type: 'string',\n description: 'Unique Identifier for the refund'\n },\n status: {\n $ref: '#/$defs/refund_status'\n },\n created_at: {\n type: 'string',\n description: 'The timestamp at which refund is created',\n format: 'date-time'\n },\n error_code: {\n type: 'string',\n description: 'The code for the error'\n },\n error_message: {\n type: 'string',\n description: 'The error message'\n },\n issuer_error_code: {\n type: 'string',\n description: 'Error code received from the issuer in case of failed refunds'\n },\n issuer_error_message: {\n type: 'string',\n description: 'Error message received from the issuer in case of failed refunds'\n },\n merchant_connector_id: {\n type: 'string',\n description: 'The merchant_connector_id of the processor through which this payment went through'\n },\n metadata: {\n type: 'object',\n description: 'You can specify up to 50 keys, with key names up to 40 characters long and values up to 500 characters long. Metadata is useful for storing additional, structured information on an object'\n },\n profile_id: {\n type: 'string',\n description: 'The id of business profile for this refund'\n },\n reason: {\n type: 'string',\n description: 'An arbitrary string attached to the object. Often useful for displaying to users and your customer support executive'\n },\n split_refunds: {\n $ref: '#/$defs/split_refund'\n },\n unified_code: {\n type: 'string',\n description: 'Error code unified across the connectors is received here if there was an error while calling connector'\n },\n unified_message: {\n type: 'string',\n description: 'Error message unified across the connectors is received here if there was an error while calling connector'\n },\n updated_at: {\n type: 'string',\n description: 'The timestamp at which refund is updated',\n format: 'date-time'\n }\n },\n required: [ 'amount',\n 'connector',\n 'currency',\n 'payment_id',\n 'refund_id',\n 'status'\n ]\n },\n refund_status: {\n type: 'string',\n description: 'The status for refunds',\n enum: [ 'succeeded',\n 'failed',\n 'pending',\n 'review'\n ]\n },\n split_refund: {\n anyOf: [ {\n type: 'object',\n properties: {\n stripe_split_refund: {\n type: 'object',\n description: 'Charge specific fields for controlling the revert of funds from either platform or connected account for Stripe. Check sub-fields for more details.',\n properties: {\n revert_platform_fee: {\n type: 'boolean',\n description: 'Toggle for reverting the application fee that was collected for the payment.\\nIf set to false, the funds are pulled from the destination account.'\n },\n revert_transfer: {\n type: 'boolean',\n description: 'Toggle for reverting the transfer that was made during the charge.\\nIf set to false, the funds are pulled from the main platform\\'s account.'\n }\n },\n required: []\n }\n },\n required: [ 'stripe_split_refund'\n ]\n },\n {\n type: 'object',\n properties: {\n adyen_split_refund: {\n $ref: '#/$defs/adyen_split_data'\n }\n },\n required: [ 'adyen_split_refund'\n ]\n },\n {\n type: 'object',\n properties: {\n xendit_split_refund: {\n $ref: '#/$defs/xendit_split_sub_merchant_data'\n }\n },\n required: [ 'xendit_split_refund'\n ]\n }\n ],\n description: 'Charge specific fields for controlling the revert of funds from either platform or connected account. Check sub-fields for more details.'\n },\n adyen_split_data: {\n type: 'object',\n description: 'Fee information for Split Payments to be charged on the payment being collected for Adyen',\n properties: {\n split_items: {\n type: 'array',\n description: 'Data for the split items',\n items: {\n type: 'object',\n description: 'Data for the split items',\n properties: {\n amount: {\n type: 'integer',\n description: 'The amount of the split item'\n },\n reference: {\n type: 'string',\n description: 'Unique Identifier for the split item'\n },\n split_type: {\n type: 'string',\n enum: [ 'BalanceAccount',\n 'AcquiringFees',\n 'PaymentFee',\n 'AdyenFees',\n 'AdyenCommission',\n 'AdyenMarkup',\n 'Interchange',\n 'SchemeFee',\n 'Commission',\n 'TopUp',\n 'Vat'\n ]\n },\n account: {\n type: 'string',\n description: 'The unique identifier of the account to which the split amount is allocated.'\n },\n description: {\n type: 'string',\n description: 'Description for the part of the payment that will be allocated to the specified account.'\n }\n },\n required: [ 'amount',\n 'reference',\n 'split_type'\n ]\n }\n },\n store: {\n type: 'string',\n description: 'The store identifier'\n }\n },\n required: [ 'split_items'\n ]\n },\n xendit_split_sub_merchant_data: {\n type: 'object',\n description: 'Fee information to be charged on the payment being collected for sub-merchant via xendit',\n properties: {\n for_user_id: {\n type: 'string',\n description: 'The sub-account user-id that you want to make this transaction for.'\n }\n },\n required: [ 'for_user_id'\n ]\n }\n }\n}\n```", + "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\nUpdates the properties of a Refund object. This API can be used to attach a reason for the refund or metadata fields\n\n# Response Schema\n```json\n{\n $ref: '#/$defs/refund_response',\n $defs: {\n refund_response: {\n type: 'object',\n properties: {\n amount: {\n type: 'integer',\n description: 'The refund amount, which should be less than or equal to the total payment amount. Amount for the payment in lowest denomination of the currency. (i.e) in cents for USD denomination, in paisa for INR denomination etc'\n },\n connector: {\n type: 'string',\n description: 'The connector used for the refund and the corresponding payment'\n },\n currency: {\n type: 'string',\n description: 'The three-letter ISO currency code'\n },\n payment_id: {\n type: 'string',\n description: 'The payment id against which refund is initiated'\n },\n refund_id: {\n type: 'string',\n description: 'Unique Identifier for the refund'\n },\n status: {\n $ref: '#/$defs/refund_status'\n },\n created_at: {\n type: 'string',\n description: 'The timestamp at which refund is created',\n format: 'date-time'\n },\n error_code: {\n type: 'string',\n description: 'The code for the error'\n },\n error_message: {\n type: 'string',\n description: 'The error message'\n },\n issuer_error_code: {\n type: 'string',\n description: 'Error code received from the issuer in case of failed refunds'\n },\n issuer_error_message: {\n type: 'string',\n description: 'Error message received from the issuer in case of failed refunds'\n },\n merchant_connector_id: {\n type: 'string',\n description: 'The merchant_connector_id of the processor through which this payment went through'\n },\n metadata: {\n type: 'object',\n description: 'You can specify up to 50 keys, with key names up to 40 characters long and values up to 500 characters long. Metadata is useful for storing additional, structured information on an object'\n },\n profile_id: {\n type: 'string',\n description: 'The id of business profile for this refund'\n },\n reason: {\n type: 'string',\n description: 'An arbitrary string attached to the object. Often useful for displaying to users and your customer support executive'\n },\n split_refunds: {\n $ref: '#/$defs/split_refund'\n },\n unified_code: {\n type: 'string',\n description: 'Error code unified across the connectors is received here if there was an error while calling connector'\n },\n unified_message: {\n type: 'string',\n description: 'Error message unified across the connectors is received here if there was an error while calling connector'\n },\n updated_at: {\n type: 'string',\n description: 'The timestamp at which refund is updated',\n format: 'date-time'\n }\n },\n required: [ 'amount',\n 'connector',\n 'currency',\n 'payment_id',\n 'refund_id',\n 'status'\n ]\n },\n refund_status: {\n type: 'string',\n description: 'The status for refunds',\n enum: [ 'succeeded',\n 'failed',\n 'pending',\n 'review'\n ]\n },\n split_refund: {\n anyOf: [ {\n type: 'object',\n properties: {\n stripe_split_refund: {\n type: 'object',\n description: 'Charge specific fields for controlling the revert of funds from either platform or connected account for Stripe. Check sub-fields for more details.',\n properties: {\n revert_platform_fee: {\n type: 'boolean',\n description: 'Toggle for reverting the application fee that was collected for the payment.\\nIf set to false, the funds are pulled from the destination account.'\n },\n revert_transfer: {\n type: 'boolean',\n description: 'Toggle for reverting the transfer that was made during the charge.\\nIf set to false, the funds are pulled from the main platform\\'s account.'\n }\n }\n }\n },\n required: [ 'stripe_split_refund'\n ]\n },\n {\n type: 'object',\n properties: {\n adyen_split_refund: {\n $ref: '#/$defs/adyen_split_data'\n }\n },\n required: [ 'adyen_split_refund'\n ]\n },\n {\n type: 'object',\n properties: {\n xendit_split_refund: {\n $ref: '#/$defs/xendit_split_sub_merchant_data'\n }\n },\n required: [ 'xendit_split_refund'\n ]\n }\n ],\n description: 'Charge specific fields for controlling the revert of funds from either platform or connected account. Check sub-fields for more details.'\n },\n adyen_split_data: {\n type: 'object',\n description: 'Fee information for Split Payments to be charged on the payment being collected for Adyen',\n properties: {\n split_items: {\n type: 'array',\n description: 'Data for the split items',\n items: {\n type: 'object',\n description: 'Data for the split items',\n properties: {\n amount: {\n type: 'integer',\n description: 'The amount of the split item'\n },\n reference: {\n type: 'string',\n description: 'Unique Identifier for the split item'\n },\n split_type: {\n type: 'string',\n enum: [ 'BalanceAccount',\n 'AcquiringFees',\n 'PaymentFee',\n 'AdyenFees',\n 'AdyenCommission',\n 'AdyenMarkup',\n 'Interchange',\n 'SchemeFee',\n 'Commission',\n 'TopUp',\n 'Vat'\n ]\n },\n account: {\n type: 'string',\n description: 'The unique identifier of the account to which the split amount is allocated.'\n },\n description: {\n type: 'string',\n description: 'Description for the part of the payment that will be allocated to the specified account.'\n }\n },\n required: [ 'amount',\n 'reference',\n 'split_type'\n ]\n }\n },\n store: {\n type: 'string',\n description: 'The store identifier'\n }\n },\n required: [ 'split_items'\n ]\n },\n xendit_split_sub_merchant_data: {\n type: 'object',\n description: 'Fee information to be charged on the payment being collected for sub-merchant via xendit',\n properties: {\n for_user_id: {\n type: 'string',\n description: 'The sub-account user-id that you want to make this transaction for.'\n }\n },\n required: [ 'for_user_id'\n ]\n }\n }\n}\n```", inputSchema: { type: 'object', properties: { @@ -42,6 +42,7 @@ export const tool: Tool = { 'A jq filter to apply to the response to include certain fields. Consult the output schema in the tool description to see the fields that are available.\n\nFor example: to include only the `name` field in every object of a results array, you can provide ".results[].name".\n\nFor more information, see the [jq documentation](https://jqlang.org/manual/).', }, }, + required: ['refund_id'], }, }; diff --git a/packages/mcp-server/src/tools/relay/create-relay.ts b/packages/mcp-server/src/tools/relay/create-relay.ts index f72f740..6e6b333 100644 --- a/packages/mcp-server/src/tools/relay/create-relay.ts +++ b/packages/mcp-server/src/tools/relay/create-relay.ts @@ -51,6 +51,7 @@ export const tool: Tool = { 'A jq filter to apply to the response to include certain fields. Consult the output schema in the tool description to see the fields that are available.\n\nFor example: to include only the `name` field in every object of a results array, you can provide ".results[].name".\n\nFor more information, see the [jq documentation](https://jqlang.org/manual/).', }, }, + required: ['connector_id', 'connector_resource_id', 'type', 'X-Idempotency-Key', 'X-Profile-Id'], $defs: { relay_type: { type: 'string', diff --git a/packages/mcp-server/src/tools/relay/retrieve-relay.ts b/packages/mcp-server/src/tools/relay/retrieve-relay.ts index 9401059..ca0b1c0 100644 --- a/packages/mcp-server/src/tools/relay/retrieve-relay.ts +++ b/packages/mcp-server/src/tools/relay/retrieve-relay.ts @@ -35,6 +35,7 @@ export const tool: Tool = { 'A jq filter to apply to the response to include certain fields. Consult the output schema in the tool description to see the fields that are available.\n\nFor example: to include only the `name` field in every object of a results array, you can provide ".results[].name".\n\nFor more information, see the [jq documentation](https://jqlang.org/manual/).', }, }, + required: ['relay_id', 'X-Profile-Id'], }, }; diff --git a/packages/mcp-server/src/tools/routing/activate-routing.ts b/packages/mcp-server/src/tools/routing/activate-routing.ts index 95caccd..bcdc23c 100644 --- a/packages/mcp-server/src/tools/routing/activate-routing.ts +++ b/packages/mcp-server/src/tools/routing/activate-routing.ts @@ -32,6 +32,7 @@ export const tool: Tool = { 'A jq filter to apply to the response to include certain fields. Consult the output schema in the tool description to see the fields that are available.\n\nFor example: to include only the `name` field in every object of a results array, you can provide ".results[].name".\n\nFor more information, see the [jq documentation](https://jqlang.org/manual/).', }, }, + required: ['routing_algorithm_id'], }, }; diff --git a/packages/mcp-server/src/tools/routing/create-routing.ts b/packages/mcp-server/src/tools/routing/create-routing.ts index d3914a1..9bdc794 100644 --- a/packages/mcp-server/src/tools/routing/create-routing.ts +++ b/packages/mcp-server/src/tools/routing/create-routing.ts @@ -37,6 +37,7 @@ export const tool: Tool = { $ref: '#/$defs/transaction_type', }, }, + required: [], $defs: { static_routing_algorithm: { anyOf: [ diff --git a/packages/mcp-server/src/tools/routing/deactivate-routing.ts b/packages/mcp-server/src/tools/routing/deactivate-routing.ts index 0c4c4a4..f150b0e 100644 --- a/packages/mcp-server/src/tools/routing/deactivate-routing.ts +++ b/packages/mcp-server/src/tools/routing/deactivate-routing.ts @@ -37,6 +37,7 @@ export const tool: Tool = { $ref: '#/$defs/transaction_type', }, }, + required: [], $defs: { static_routing_algorithm: { anyOf: [ diff --git a/packages/mcp-server/src/tools/routing/default/profile/retrieve-default-routing-profile.ts b/packages/mcp-server/src/tools/routing/default/profile/retrieve-default-routing-profile.ts index 0c4849e..bb9c4bb 100644 --- a/packages/mcp-server/src/tools/routing/default/profile/retrieve-default-routing-profile.ts +++ b/packages/mcp-server/src/tools/routing/default/profile/retrieve-default-routing-profile.ts @@ -29,6 +29,7 @@ export const tool: Tool = { 'A jq filter to apply to the response to include certain fields. Consult the output schema in the tool description to see the fields that are available.\n\nFor example: to include only the `name` field in every object of a results array, you can provide ".results[].name".\n\nFor more information, see the [jq documentation](https://jqlang.org/manual/).', }, }, + required: [], }, }; diff --git a/packages/mcp-server/src/tools/routing/default/profile/update-default-routing-profile.ts b/packages/mcp-server/src/tools/routing/default/profile/update-default-routing-profile.ts index 16f0be3..c971d73 100644 --- a/packages/mcp-server/src/tools/routing/default/profile/update-default-routing-profile.ts +++ b/packages/mcp-server/src/tools/routing/default/profile/update-default-routing-profile.ts @@ -38,6 +38,7 @@ export const tool: Tool = { 'A jq filter to apply to the response to include certain fields. Consult the output schema in the tool description to see the fields that are available.\n\nFor example: to include only the `name` field in every object of a results array, you can provide ".results[].name".\n\nFor more information, see the [jq documentation](https://jqlang.org/manual/).', }, }, + required: ['profile_id', 'body'], $defs: { routable_connector_choice: { type: 'object', diff --git a/packages/mcp-server/src/tools/routing/default/retrieve-routing-default.ts b/packages/mcp-server/src/tools/routing/default/retrieve-routing-default.ts index faa72ad..c933eb0 100644 --- a/packages/mcp-server/src/tools/routing/default/retrieve-routing-default.ts +++ b/packages/mcp-server/src/tools/routing/default/retrieve-routing-default.ts @@ -29,6 +29,7 @@ export const tool: Tool = { 'A jq filter to apply to the response to include certain fields. Consult the output schema in the tool description to see the fields that are available.\n\nFor example: to include only the `name` field in every object of a results array, you can provide ".results[].name".\n\nFor more information, see the [jq documentation](https://jqlang.org/manual/).', }, }, + required: [], }, }; diff --git a/packages/mcp-server/src/tools/routing/default/update-routing-default.ts b/packages/mcp-server/src/tools/routing/default/update-routing-default.ts index 14ff795..2dfba82 100644 --- a/packages/mcp-server/src/tools/routing/default/update-routing-default.ts +++ b/packages/mcp-server/src/tools/routing/default/update-routing-default.ts @@ -35,6 +35,7 @@ export const tool: Tool = { 'A jq filter to apply to the response to include certain fields. Consult the output schema in the tool description to see the fields that are available.\n\nFor example: to include only the `name` field in every object of a results array, you can provide ".results[].name".\n\nFor more information, see the [jq documentation](https://jqlang.org/manual/).', }, }, + required: ['body'], $defs: { routable_connector_choice: { type: 'object', diff --git a/packages/mcp-server/src/tools/routing/list-routing.ts b/packages/mcp-server/src/tools/routing/list-routing.ts index 60ca8bf..a827425 100644 --- a/packages/mcp-server/src/tools/routing/list-routing.ts +++ b/packages/mcp-server/src/tools/routing/list-routing.ts @@ -41,6 +41,7 @@ export const tool: Tool = { 'A jq filter to apply to the response to include certain fields. Consult the output schema in the tool description to see the fields that are available.\n\nFor example: to include only the `name` field in every object of a results array, you can provide ".results[].name".\n\nFor more information, see the [jq documentation](https://jqlang.org/manual/).', }, }, + required: [], }, }; diff --git a/packages/mcp-server/src/tools/routing/retrieve-active-routing.ts b/packages/mcp-server/src/tools/routing/retrieve-active-routing.ts index 613e5bd..50cb5b6 100644 --- a/packages/mcp-server/src/tools/routing/retrieve-active-routing.ts +++ b/packages/mcp-server/src/tools/routing/retrieve-active-routing.ts @@ -26,6 +26,7 @@ export const tool: Tool = { description: 'The unique identifier for a merchant profile', }, }, + required: [], }, }; diff --git a/packages/mcp-server/src/tools/routing/retrieve-routing.ts b/packages/mcp-server/src/tools/routing/retrieve-routing.ts index 1e5728b..24a75b3 100644 --- a/packages/mcp-server/src/tools/routing/retrieve-routing.ts +++ b/packages/mcp-server/src/tools/routing/retrieve-routing.ts @@ -25,6 +25,7 @@ export const tool: Tool = { type: 'string', }, }, + required: ['routing_algorithm_id'], }, }; diff --git a/packages/mcp-server/src/tools/three-ds-decision/execute-three-ds-decision.ts b/packages/mcp-server/src/tools/three-ds-decision/execute-three-ds-decision.ts index 5fea406..7e73781 100644 --- a/packages/mcp-server/src/tools/three-ds-decision/execute-three-ds-decision.ts +++ b/packages/mcp-server/src/tools/three-ds-decision/execute-three-ds-decision.ts @@ -91,7 +91,6 @@ export const tool: Tool = { enum: ['web', 'android', 'ios'], }, }, - required: [], }, issuer: { type: 'object', @@ -118,6 +117,7 @@ export const tool: Tool = { required: ['card_network'], }, }, + required: ['payment', 'routing_id'], $defs: { currency: { type: 'string', From e0977bea956db2822da1a4fa1585273e1bd99e77 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 24 Jul 2025 03:49:03 +0000 Subject: [PATCH 10/44] chore(internal): codegen related update --- .../business-profile/create-accounts-business-profile.ts | 1 + .../business-profile/delete-accounts-business-profile.ts | 3 +++ ...ggle-dynamic-routing-business-profile-accounts-contracts.ts | 1 + ...nfig-dynamic-routing-business-profile-accounts-contracts.ts | 1 + ...le-dynamic-routing-business-profile-accounts-elimination.ts | 1 + ...-dynamic-routing-business-profile-accounts-success-based.ts | 1 + ...-dynamic-routing-business-profile-accounts-success-based.ts | 1 + .../business-profile/list-accounts-business-profile.ts | 3 +++ .../business-profile/retrieve-accounts-business-profile.ts | 3 +++ .../business-profile/update-accounts-business-profile.ts | 1 + .../tools/accounts/connectors/create-accounts-connectors.ts | 1 + .../tools/accounts/connectors/delete-accounts-connectors.ts | 3 +++ .../src/tools/accounts/connectors/list-accounts-connectors.ts | 3 +++ .../tools/accounts/connectors/retrieve-accounts-connectors.ts | 3 +++ .../tools/accounts/connectors/update-accounts-connectors.ts | 1 + packages/mcp-server/src/tools/accounts/create-accounts.ts | 1 + packages/mcp-server/src/tools/accounts/delete-accounts.ts | 3 +++ packages/mcp-server/src/tools/accounts/kv-accounts.ts | 1 + .../src/tools/accounts/list-payment-methods-accounts.ts | 3 +++ packages/mcp-server/src/tools/accounts/retrieve-accounts.ts | 3 +++ packages/mcp-server/src/tools/accounts/update-accounts.ts | 1 + packages/mcp-server/src/tools/api-keys/create-api-keys.ts | 1 + packages/mcp-server/src/tools/api-keys/list-api-keys.ts | 3 +++ packages/mcp-server/src/tools/api-keys/retrieve-api-keys.ts | 3 +++ packages/mcp-server/src/tools/api-keys/revoke-api-keys.ts | 3 +++ packages/mcp-server/src/tools/api-keys/update-api-keys.ts | 1 + .../src/tools/authentication/create-authentication.ts | 1 + packages/mcp-server/src/tools/blocklist/create-blocklist.ts | 1 + packages/mcp-server/src/tools/blocklist/delete-blocklist.ts | 3 +++ packages/mcp-server/src/tools/blocklist/retrieve-blocklist.ts | 3 +++ packages/mcp-server/src/tools/blocklist/toggle-blocklist.ts | 1 + packages/mcp-server/src/tools/customers/create-customers.ts | 1 + packages/mcp-server/src/tools/customers/delete-customers.ts | 3 +++ packages/mcp-server/src/tools/customers/list-customers.ts | 3 +++ .../mcp-server/src/tools/customers/list-mandates-customers.ts | 3 +++ .../payment-methods/list-customers-payment-methods.ts | 3 +++ .../payment-methods/list-saved-customers-payment-methods.ts | 3 +++ packages/mcp-server/src/tools/customers/retrieve-customers.ts | 3 +++ packages/mcp-server/src/tools/customers/update-customers.ts | 1 + packages/mcp-server/src/tools/disputes/list-disputes.ts | 3 +++ packages/mcp-server/src/tools/disputes/retrieve-disputes.ts | 3 +++ .../mcp-server/src/tools/events/delivery-attempts-events.ts | 3 +++ packages/mcp-server/src/tools/events/list-events.ts | 1 + .../mcp-server/src/tools/events/profile/list-events-profile.ts | 1 + packages/mcp-server/src/tools/events/retry-events.ts | 1 + packages/mcp-server/src/tools/gsm/create-gsm.ts | 1 + packages/mcp-server/src/tools/gsm/delete-gsm.ts | 1 + packages/mcp-server/src/tools/gsm/retrieve-gsm.ts | 1 + packages/mcp-server/src/tools/gsm/update-gsm.ts | 1 + packages/mcp-server/src/tools/mandates/retrieve-mandates.ts | 3 +++ packages/mcp-server/src/tools/mandates/revoke-mandates.ts | 1 + .../mcp-server/src/tools/organization/create-organization.ts | 1 + .../mcp-server/src/tools/organization/retrieve-organization.ts | 3 +++ .../mcp-server/src/tools/organization/update-organization.ts | 3 +++ .../mcp-server/src/tools/payment-link/retrieve-payment-link.ts | 3 +++ .../src/tools/payment-methods/create-payment-methods.ts | 1 + .../src/tools/payment-methods/delete-payment-methods.ts | 3 +++ .../src/tools/payment-methods/retrieve-payment-methods.ts | 3 +++ .../src/tools/payment-methods/set-default-payment-methods.ts | 1 + .../src/tools/payment-methods/update-payment-methods.ts | 1 + packages/mcp-server/src/tools/payments/cancel-payments.ts | 1 + packages/mcp-server/src/tools/payments/capture-payments.ts | 1 + .../src/tools/payments/complete-authorize-payments.ts | 1 + packages/mcp-server/src/tools/payments/confirm-payments.ts | 1 + packages/mcp-server/src/tools/payments/create-payments.ts | 1 + .../src/tools/payments/create-session-token-payments.ts | 1 + .../src/tools/payments/incremental-authorization-payments.ts | 1 + packages/mcp-server/src/tools/payments/list-payments.ts | 3 +++ .../payments/number-3ds/authenticate-payments-number-3ds.ts | 1 + .../src/tools/payments/post-session-tokens-payments.ts | 1 + packages/mcp-server/src/tools/payments/retrieve-payments.ts | 3 +++ .../mcp-server/src/tools/payments/update-metadata-payments.ts | 1 + packages/mcp-server/src/tools/payments/update-payments.ts | 1 + packages/mcp-server/src/tools/payouts/cancel-payouts.ts | 1 + packages/mcp-server/src/tools/payouts/confirm-payouts.ts | 1 + packages/mcp-server/src/tools/payouts/create-payouts.ts | 1 + packages/mcp-server/src/tools/payouts/fulfill-payouts.ts | 1 + packages/mcp-server/src/tools/payouts/list-filters-payouts.ts | 1 + .../mcp-server/src/tools/payouts/list/retrieve-payouts-list.ts | 3 +++ .../src/tools/payouts/list/with-filters-payouts-list.ts | 1 + packages/mcp-server/src/tools/payouts/retrieve-payouts.ts | 3 +++ packages/mcp-server/src/tools/payouts/update-payouts.ts | 1 + packages/mcp-server/src/tools/poll/retrieve-status-poll.ts | 3 +++ .../src/tools/profile-acquirers/create-profile-acquirers.ts | 1 + .../src/tools/profile-acquirers/update-profile-acquirers.ts | 1 + packages/mcp-server/src/tools/refunds/create-refunds.ts | 1 + packages/mcp-server/src/tools/refunds/list-refunds.ts | 1 + packages/mcp-server/src/tools/refunds/retrieve-refunds.ts | 3 +++ packages/mcp-server/src/tools/refunds/update-refunds.ts | 1 + packages/mcp-server/src/tools/relay/create-relay.ts | 1 + packages/mcp-server/src/tools/relay/retrieve-relay.ts | 3 +++ packages/mcp-server/src/tools/routing/activate-routing.ts | 1 + packages/mcp-server/src/tools/routing/create-routing.ts | 1 + packages/mcp-server/src/tools/routing/deactivate-routing.ts | 1 + .../default/profile/retrieve-default-routing-profile.ts | 3 +++ .../routing/default/profile/update-default-routing-profile.ts | 1 + .../src/tools/routing/default/retrieve-routing-default.ts | 3 +++ .../src/tools/routing/default/update-routing-default.ts | 1 + packages/mcp-server/src/tools/routing/list-routing.ts | 3 +++ .../mcp-server/src/tools/routing/retrieve-active-routing.ts | 3 +++ packages/mcp-server/src/tools/routing/retrieve-routing.ts | 3 +++ .../src/tools/three-ds-decision/execute-three-ds-decision.ts | 1 + 102 files changed, 184 insertions(+) diff --git a/packages/mcp-server/src/tools/accounts/business-profile/create-accounts-business-profile.ts b/packages/mcp-server/src/tools/accounts/business-profile/create-accounts-business-profile.ts index e1ecb68..5731887 100644 --- a/packages/mcp-server/src/tools/accounts/business-profile/create-accounts-business-profile.ts +++ b/packages/mcp-server/src/tools/accounts/business-profile/create-accounts-business-profile.ts @@ -1357,6 +1357,7 @@ export const tool: Tool = { }, }, }, + annotations: {}, }; export const handler = async (client: Hyperswitch, args: Record | undefined) => { diff --git a/packages/mcp-server/src/tools/accounts/business-profile/delete-accounts-business-profile.ts b/packages/mcp-server/src/tools/accounts/business-profile/delete-accounts-business-profile.ts index bd5a0d7..cd268e8 100644 --- a/packages/mcp-server/src/tools/accounts/business-profile/delete-accounts-business-profile.ts +++ b/packages/mcp-server/src/tools/accounts/business-profile/delete-accounts-business-profile.ts @@ -37,6 +37,9 @@ export const tool: Tool = { }, required: ['account_id', 'profile_id'], }, + annotations: { + idempotentHint: true, + }, }; export const handler = async (client: Hyperswitch, args: Record | undefined) => { diff --git a/packages/mcp-server/src/tools/accounts/business-profile/dynamic-routing/contracts/toggle-dynamic-routing-business-profile-accounts-contracts.ts b/packages/mcp-server/src/tools/accounts/business-profile/dynamic-routing/contracts/toggle-dynamic-routing-business-profile-accounts-contracts.ts index 90c1371..f10877b 100644 --- a/packages/mcp-server/src/tools/accounts/business-profile/dynamic-routing/contracts/toggle-dynamic-routing-business-profile-accounts-contracts.ts +++ b/packages/mcp-server/src/tools/accounts/business-profile/dynamic-routing/contracts/toggle-dynamic-routing-business-profile-accounts-contracts.ts @@ -82,6 +82,7 @@ export const tool: Tool = { }, }, }, + annotations: {}, }; export const handler = async (client: Hyperswitch, args: Record | undefined) => { diff --git a/packages/mcp-server/src/tools/accounts/business-profile/dynamic-routing/contracts/update-config-dynamic-routing-business-profile-accounts-contracts.ts b/packages/mcp-server/src/tools/accounts/business-profile/dynamic-routing/contracts/update-config-dynamic-routing-business-profile-accounts-contracts.ts index ef3baaa..a245327 100644 --- a/packages/mcp-server/src/tools/accounts/business-profile/dynamic-routing/contracts/update-config-dynamic-routing-business-profile-accounts-contracts.ts +++ b/packages/mcp-server/src/tools/accounts/business-profile/dynamic-routing/contracts/update-config-dynamic-routing-business-profile-accounts-contracts.ts @@ -77,6 +77,7 @@ export const tool: Tool = { }, required: ['account_id', 'profile_id', 'algorithm_id'], }, + annotations: {}, }; export const handler = async (client: Hyperswitch, args: Record | undefined) => { diff --git a/packages/mcp-server/src/tools/accounts/business-profile/dynamic-routing/elimination/toggle-dynamic-routing-business-profile-accounts-elimination.ts b/packages/mcp-server/src/tools/accounts/business-profile/dynamic-routing/elimination/toggle-dynamic-routing-business-profile-accounts-elimination.ts index f3c0bfe..6cd4954 100644 --- a/packages/mcp-server/src/tools/accounts/business-profile/dynamic-routing/elimination/toggle-dynamic-routing-business-profile-accounts-elimination.ts +++ b/packages/mcp-server/src/tools/accounts/business-profile/dynamic-routing/elimination/toggle-dynamic-routing-business-profile-accounts-elimination.ts @@ -46,6 +46,7 @@ export const tool: Tool = { }, }, }, + annotations: {}, }; export const handler = async (client: Hyperswitch, args: Record | undefined) => { diff --git a/packages/mcp-server/src/tools/accounts/business-profile/dynamic-routing/success-based/toggle-dynamic-routing-business-profile-accounts-success-based.ts b/packages/mcp-server/src/tools/accounts/business-profile/dynamic-routing/success-based/toggle-dynamic-routing-business-profile-accounts-success-based.ts index 2086b0f..e7df1b9 100644 --- a/packages/mcp-server/src/tools/accounts/business-profile/dynamic-routing/success-based/toggle-dynamic-routing-business-profile-accounts-success-based.ts +++ b/packages/mcp-server/src/tools/accounts/business-profile/dynamic-routing/success-based/toggle-dynamic-routing-business-profile-accounts-success-based.ts @@ -46,6 +46,7 @@ export const tool: Tool = { }, }, }, + annotations: {}, }; export const handler = async (client: Hyperswitch, args: Record | undefined) => { diff --git a/packages/mcp-server/src/tools/accounts/business-profile/dynamic-routing/success-based/update-config-dynamic-routing-business-profile-accounts-success-based.ts b/packages/mcp-server/src/tools/accounts/business-profile/dynamic-routing/success-based/update-config-dynamic-routing-business-profile-accounts-success-based.ts index d7aee41..3f01721 100644 --- a/packages/mcp-server/src/tools/accounts/business-profile/dynamic-routing/success-based/update-config-dynamic-routing-business-profile-accounts-success-based.ts +++ b/packages/mcp-server/src/tools/accounts/business-profile/dynamic-routing/success-based/update-config-dynamic-routing-business-profile-accounts-success-based.ts @@ -169,6 +169,7 @@ export const tool: Tool = { }, }, }, + annotations: {}, }; export const handler = async (client: Hyperswitch, args: Record | undefined) => { diff --git a/packages/mcp-server/src/tools/accounts/business-profile/list-accounts-business-profile.ts b/packages/mcp-server/src/tools/accounts/business-profile/list-accounts-business-profile.ts index 0de3bfe..7be71b1 100644 --- a/packages/mcp-server/src/tools/accounts/business-profile/list-accounts-business-profile.ts +++ b/packages/mcp-server/src/tools/accounts/business-profile/list-accounts-business-profile.ts @@ -27,6 +27,9 @@ export const tool: Tool = { }, required: ['account_id'], }, + annotations: { + readOnlyHint: true, + }, }; export const handler = async (client: Hyperswitch, args: Record | undefined) => { diff --git a/packages/mcp-server/src/tools/accounts/business-profile/retrieve-accounts-business-profile.ts b/packages/mcp-server/src/tools/accounts/business-profile/retrieve-accounts-business-profile.ts index ab1fc40..9ca4584 100644 --- a/packages/mcp-server/src/tools/accounts/business-profile/retrieve-accounts-business-profile.ts +++ b/packages/mcp-server/src/tools/accounts/business-profile/retrieve-accounts-business-profile.ts @@ -30,6 +30,9 @@ export const tool: Tool = { }, required: ['account_id', 'profile_id'], }, + annotations: { + readOnlyHint: true, + }, }; export const handler = async (client: Hyperswitch, args: Record | undefined) => { diff --git a/packages/mcp-server/src/tools/accounts/business-profile/update-accounts-business-profile.ts b/packages/mcp-server/src/tools/accounts/business-profile/update-accounts-business-profile.ts index 8acce35..b9319e6 100644 --- a/packages/mcp-server/src/tools/accounts/business-profile/update-accounts-business-profile.ts +++ b/packages/mcp-server/src/tools/accounts/business-profile/update-accounts-business-profile.ts @@ -1360,6 +1360,7 @@ export const tool: Tool = { }, }, }, + annotations: {}, }; export const handler = async (client: Hyperswitch, args: Record | undefined) => { diff --git a/packages/mcp-server/src/tools/accounts/connectors/create-accounts-connectors.ts b/packages/mcp-server/src/tools/accounts/connectors/create-accounts-connectors.ts index 7a4b306..f6bb6b8 100644 --- a/packages/mcp-server/src/tools/accounts/connectors/create-accounts-connectors.ts +++ b/packages/mcp-server/src/tools/accounts/connectors/create-accounts-connectors.ts @@ -1343,6 +1343,7 @@ export const tool: Tool = { }, }, }, + annotations: {}, }; export const handler = async (client: Hyperswitch, args: Record | undefined) => { diff --git a/packages/mcp-server/src/tools/accounts/connectors/delete-accounts-connectors.ts b/packages/mcp-server/src/tools/accounts/connectors/delete-accounts-connectors.ts index aad1fec..c46b4bf 100644 --- a/packages/mcp-server/src/tools/accounts/connectors/delete-accounts-connectors.ts +++ b/packages/mcp-server/src/tools/accounts/connectors/delete-accounts-connectors.ts @@ -37,6 +37,9 @@ export const tool: Tool = { }, required: ['account_id', 'merchant_connector_id'], }, + annotations: { + idempotentHint: true, + }, }; export const handler = async (client: Hyperswitch, args: Record | undefined) => { diff --git a/packages/mcp-server/src/tools/accounts/connectors/list-accounts-connectors.ts b/packages/mcp-server/src/tools/accounts/connectors/list-accounts-connectors.ts index 69772db..6764a9c 100644 --- a/packages/mcp-server/src/tools/accounts/connectors/list-accounts-connectors.ts +++ b/packages/mcp-server/src/tools/accounts/connectors/list-accounts-connectors.ts @@ -27,6 +27,9 @@ export const tool: Tool = { }, required: ['account_id'], }, + annotations: { + readOnlyHint: true, + }, }; export const handler = async (client: Hyperswitch, args: Record | undefined) => { diff --git a/packages/mcp-server/src/tools/accounts/connectors/retrieve-accounts-connectors.ts b/packages/mcp-server/src/tools/accounts/connectors/retrieve-accounts-connectors.ts index ca4eac6..496ef29 100644 --- a/packages/mcp-server/src/tools/accounts/connectors/retrieve-accounts-connectors.ts +++ b/packages/mcp-server/src/tools/accounts/connectors/retrieve-accounts-connectors.ts @@ -30,6 +30,9 @@ export const tool: Tool = { }, required: ['account_id', 'merchant_connector_id'], }, + annotations: { + readOnlyHint: true, + }, }; export const handler = async (client: Hyperswitch, args: Record | undefined) => { diff --git a/packages/mcp-server/src/tools/accounts/connectors/update-accounts-connectors.ts b/packages/mcp-server/src/tools/accounts/connectors/update-accounts-connectors.ts index ffc599a..3a7762d 100644 --- a/packages/mcp-server/src/tools/accounts/connectors/update-accounts-connectors.ts +++ b/packages/mcp-server/src/tools/accounts/connectors/update-accounts-connectors.ts @@ -1211,6 +1211,7 @@ export const tool: Tool = { }, }, }, + annotations: {}, }; export const handler = async (client: Hyperswitch, args: Record | undefined) => { diff --git a/packages/mcp-server/src/tools/accounts/create-accounts.ts b/packages/mcp-server/src/tools/accounts/create-accounts.ts index 4fe9950..1a2cb16 100644 --- a/packages/mcp-server/src/tools/accounts/create-accounts.ts +++ b/packages/mcp-server/src/tools/accounts/create-accounts.ts @@ -1092,6 +1092,7 @@ export const tool: Tool = { }, }, }, + annotations: {}, }; export const handler = async (client: Hyperswitch, args: Record | undefined) => { diff --git a/packages/mcp-server/src/tools/accounts/delete-accounts.ts b/packages/mcp-server/src/tools/accounts/delete-accounts.ts index 85a5f92..0480214 100644 --- a/packages/mcp-server/src/tools/accounts/delete-accounts.ts +++ b/packages/mcp-server/src/tools/accounts/delete-accounts.ts @@ -34,6 +34,9 @@ export const tool: Tool = { }, required: ['account_id'], }, + annotations: { + idempotentHint: true, + }, }; export const handler = async (client: Hyperswitch, args: Record | undefined) => { diff --git a/packages/mcp-server/src/tools/accounts/kv-accounts.ts b/packages/mcp-server/src/tools/accounts/kv-accounts.ts index 5d03a97..e0e18aa 100644 --- a/packages/mcp-server/src/tools/accounts/kv-accounts.ts +++ b/packages/mcp-server/src/tools/accounts/kv-accounts.ts @@ -38,6 +38,7 @@ export const tool: Tool = { }, required: ['account_id', 'kv_enabled'], }, + annotations: {}, }; export const handler = async (client: Hyperswitch, args: Record | undefined) => { diff --git a/packages/mcp-server/src/tools/accounts/list-payment-methods-accounts.ts b/packages/mcp-server/src/tools/accounts/list-payment-methods-accounts.ts index 6eb455a..2a1de5f 100644 --- a/packages/mcp-server/src/tools/accounts/list-payment-methods-accounts.ts +++ b/packages/mcp-server/src/tools/accounts/list-payment-methods-accounts.ts @@ -510,6 +510,9 @@ export const tool: Tool = { }, }, }, + annotations: { + readOnlyHint: true, + }, }; export const handler = async (client: Hyperswitch, args: Record | undefined) => { diff --git a/packages/mcp-server/src/tools/accounts/retrieve-accounts.ts b/packages/mcp-server/src/tools/accounts/retrieve-accounts.ts index 090e54b..d3c5330 100644 --- a/packages/mcp-server/src/tools/accounts/retrieve-accounts.ts +++ b/packages/mcp-server/src/tools/accounts/retrieve-accounts.ts @@ -27,6 +27,9 @@ export const tool: Tool = { }, required: ['account_id'], }, + annotations: { + readOnlyHint: true, + }, }; export const handler = async (client: Hyperswitch, args: Record | undefined) => { diff --git a/packages/mcp-server/src/tools/accounts/update-accounts.ts b/packages/mcp-server/src/tools/accounts/update-accounts.ts index b55f20a..490e0af 100644 --- a/packages/mcp-server/src/tools/accounts/update-accounts.ts +++ b/packages/mcp-server/src/tools/accounts/update-accounts.ts @@ -1085,6 +1085,7 @@ export const tool: Tool = { }, }, }, + annotations: {}, }; export const handler = async (client: Hyperswitch, args: Record | undefined) => { diff --git a/packages/mcp-server/src/tools/api-keys/create-api-keys.ts b/packages/mcp-server/src/tools/api-keys/create-api-keys.ts index 9be5aa6..55078fe 100644 --- a/packages/mcp-server/src/tools/api-keys/create-api-keys.ts +++ b/packages/mcp-server/src/tools/api-keys/create-api-keys.ts @@ -59,6 +59,7 @@ export const tool: Tool = { }, }, }, + annotations: {}, }; export const handler = async (client: Hyperswitch, args: Record | undefined) => { diff --git a/packages/mcp-server/src/tools/api-keys/list-api-keys.ts b/packages/mcp-server/src/tools/api-keys/list-api-keys.ts index f1ebcbf..cd39e05 100644 --- a/packages/mcp-server/src/tools/api-keys/list-api-keys.ts +++ b/packages/mcp-server/src/tools/api-keys/list-api-keys.ts @@ -42,6 +42,9 @@ export const tool: Tool = { }, required: ['merchant_id'], }, + annotations: { + readOnlyHint: true, + }, }; export const handler = async (client: Hyperswitch, args: Record | undefined) => { diff --git a/packages/mcp-server/src/tools/api-keys/retrieve-api-keys.ts b/packages/mcp-server/src/tools/api-keys/retrieve-api-keys.ts index f43aa8a..31c1f28 100644 --- a/packages/mcp-server/src/tools/api-keys/retrieve-api-keys.ts +++ b/packages/mcp-server/src/tools/api-keys/retrieve-api-keys.ts @@ -37,6 +37,9 @@ export const tool: Tool = { }, required: ['merchant_id', 'key_id'], }, + annotations: { + readOnlyHint: true, + }, }; export const handler = async (client: Hyperswitch, args: Record | undefined) => { diff --git a/packages/mcp-server/src/tools/api-keys/revoke-api-keys.ts b/packages/mcp-server/src/tools/api-keys/revoke-api-keys.ts index 003106b..b5ca58a 100644 --- a/packages/mcp-server/src/tools/api-keys/revoke-api-keys.ts +++ b/packages/mcp-server/src/tools/api-keys/revoke-api-keys.ts @@ -37,6 +37,9 @@ export const tool: Tool = { }, required: ['merchant_id', 'key_id'], }, + annotations: { + idempotentHint: true, + }, }; export const handler = async (client: Hyperswitch, args: Record | undefined) => { diff --git a/packages/mcp-server/src/tools/api-keys/update-api-keys.ts b/packages/mcp-server/src/tools/api-keys/update-api-keys.ts index 919fda4..2dde50e 100644 --- a/packages/mcp-server/src/tools/api-keys/update-api-keys.ts +++ b/packages/mcp-server/src/tools/api-keys/update-api-keys.ts @@ -62,6 +62,7 @@ export const tool: Tool = { }, }, }, + annotations: {}, }; export const handler = async (client: Hyperswitch, args: Record | undefined) => { diff --git a/packages/mcp-server/src/tools/authentication/create-authentication.ts b/packages/mcp-server/src/tools/authentication/create-authentication.ts index 772a281..4f9faf1 100644 --- a/packages/mcp-server/src/tools/authentication/create-authentication.ts +++ b/packages/mcp-server/src/tools/authentication/create-authentication.ts @@ -290,6 +290,7 @@ export const tool: Tool = { }, }, }, + annotations: {}, }; export const handler = async (client: Hyperswitch, args: Record | undefined) => { diff --git a/packages/mcp-server/src/tools/blocklist/create-blocklist.ts b/packages/mcp-server/src/tools/blocklist/create-blocklist.ts index 22c1771..de066d7 100644 --- a/packages/mcp-server/src/tools/blocklist/create-blocklist.ts +++ b/packages/mcp-server/src/tools/blocklist/create-blocklist.ts @@ -71,6 +71,7 @@ export const tool: Tool = { }, }, }, + annotations: {}, }; export const handler = async (client: Hyperswitch, args: Record | undefined) => { diff --git a/packages/mcp-server/src/tools/blocklist/delete-blocklist.ts b/packages/mcp-server/src/tools/blocklist/delete-blocklist.ts index acfd22f..d295931 100644 --- a/packages/mcp-server/src/tools/blocklist/delete-blocklist.ts +++ b/packages/mcp-server/src/tools/blocklist/delete-blocklist.ts @@ -71,6 +71,9 @@ export const tool: Tool = { }, }, }, + annotations: { + idempotentHint: true, + }, }; export const handler = async (client: Hyperswitch, args: Record | undefined) => { diff --git a/packages/mcp-server/src/tools/blocklist/retrieve-blocklist.ts b/packages/mcp-server/src/tools/blocklist/retrieve-blocklist.ts index 12551cd..a246b3f 100644 --- a/packages/mcp-server/src/tools/blocklist/retrieve-blocklist.ts +++ b/packages/mcp-server/src/tools/blocklist/retrieve-blocklist.ts @@ -40,6 +40,9 @@ export const tool: Tool = { }, }, }, + annotations: { + readOnlyHint: true, + }, }; export const handler = async (client: Hyperswitch, args: Record | undefined) => { diff --git a/packages/mcp-server/src/tools/blocklist/toggle-blocklist.ts b/packages/mcp-server/src/tools/blocklist/toggle-blocklist.ts index f0d202b..fd453d4 100644 --- a/packages/mcp-server/src/tools/blocklist/toggle-blocklist.ts +++ b/packages/mcp-server/src/tools/blocklist/toggle-blocklist.ts @@ -35,6 +35,7 @@ export const tool: Tool = { }, required: ['status'], }, + annotations: {}, }; export const handler = async (client: Hyperswitch, args: Record | undefined) => { diff --git a/packages/mcp-server/src/tools/customers/create-customers.ts b/packages/mcp-server/src/tools/customers/create-customers.ts index 59087b7..c8331e9 100644 --- a/packages/mcp-server/src/tools/customers/create-customers.ts +++ b/packages/mcp-server/src/tools/customers/create-customers.ts @@ -355,6 +355,7 @@ export const tool: Tool = { }, }, }, + annotations: {}, }; export const handler = async (client: Hyperswitch, args: Record | undefined) => { diff --git a/packages/mcp-server/src/tools/customers/delete-customers.ts b/packages/mcp-server/src/tools/customers/delete-customers.ts index 13f923c..2b0e93a 100644 --- a/packages/mcp-server/src/tools/customers/delete-customers.ts +++ b/packages/mcp-server/src/tools/customers/delete-customers.ts @@ -34,6 +34,9 @@ export const tool: Tool = { }, required: ['customer_id'], }, + annotations: { + idempotentHint: true, + }, }; export const handler = async (client: Hyperswitch, args: Record | undefined) => { diff --git a/packages/mcp-server/src/tools/customers/list-customers.ts b/packages/mcp-server/src/tools/customers/list-customers.ts index a9d0f96..2102224 100644 --- a/packages/mcp-server/src/tools/customers/list-customers.ts +++ b/packages/mcp-server/src/tools/customers/list-customers.ts @@ -39,6 +39,9 @@ export const tool: Tool = { }, required: [], }, + annotations: { + readOnlyHint: true, + }, }; export const handler = async (client: Hyperswitch, args: Record | undefined) => { diff --git a/packages/mcp-server/src/tools/customers/list-mandates-customers.ts b/packages/mcp-server/src/tools/customers/list-mandates-customers.ts index c4d5031..7af262c 100644 --- a/packages/mcp-server/src/tools/customers/list-mandates-customers.ts +++ b/packages/mcp-server/src/tools/customers/list-mandates-customers.ts @@ -34,6 +34,9 @@ export const tool: Tool = { }, required: ['customer_id'], }, + annotations: { + readOnlyHint: true, + }, }; export const handler = async (client: Hyperswitch, args: Record | undefined) => { diff --git a/packages/mcp-server/src/tools/customers/payment-methods/list-customers-payment-methods.ts b/packages/mcp-server/src/tools/customers/payment-methods/list-customers-payment-methods.ts index e6f66cf..0628aaa 100644 --- a/packages/mcp-server/src/tools/customers/payment-methods/list-customers-payment-methods.ts +++ b/packages/mcp-server/src/tools/customers/payment-methods/list-customers-payment-methods.ts @@ -513,6 +513,9 @@ export const tool: Tool = { }, }, }, + annotations: { + readOnlyHint: true, + }, }; export const handler = async (client: Hyperswitch, args: Record | undefined) => { diff --git a/packages/mcp-server/src/tools/customers/payment-methods/list-saved-customers-payment-methods.ts b/packages/mcp-server/src/tools/customers/payment-methods/list-saved-customers-payment-methods.ts index 7b91257..4674a02 100644 --- a/packages/mcp-server/src/tools/customers/payment-methods/list-saved-customers-payment-methods.ts +++ b/packages/mcp-server/src/tools/customers/payment-methods/list-saved-customers-payment-methods.ts @@ -510,6 +510,9 @@ export const tool: Tool = { }, }, }, + annotations: { + readOnlyHint: true, + }, }; export const handler = async (client: Hyperswitch, args: Record | undefined) => { diff --git a/packages/mcp-server/src/tools/customers/retrieve-customers.ts b/packages/mcp-server/src/tools/customers/retrieve-customers.ts index d444d4c..067d81e 100644 --- a/packages/mcp-server/src/tools/customers/retrieve-customers.ts +++ b/packages/mcp-server/src/tools/customers/retrieve-customers.ts @@ -34,6 +34,9 @@ export const tool: Tool = { }, required: ['customer_id'], }, + annotations: { + readOnlyHint: true, + }, }; export const handler = async (client: Hyperswitch, args: Record | undefined) => { diff --git a/packages/mcp-server/src/tools/customers/update-customers.ts b/packages/mcp-server/src/tools/customers/update-customers.ts index 4e19c6c..c616a1f 100644 --- a/packages/mcp-server/src/tools/customers/update-customers.ts +++ b/packages/mcp-server/src/tools/customers/update-customers.ts @@ -353,6 +353,7 @@ export const tool: Tool = { }, }, }, + annotations: {}, }; export const handler = async (client: Hyperswitch, args: Record | undefined) => { diff --git a/packages/mcp-server/src/tools/disputes/list-disputes.ts b/packages/mcp-server/src/tools/disputes/list-disputes.ts index 7eeb688..43357c6 100644 --- a/packages/mcp-server/src/tools/disputes/list-disputes.ts +++ b/packages/mcp-server/src/tools/disputes/list-disputes.ts @@ -94,6 +94,9 @@ export const tool: Tool = { }, }, }, + annotations: { + readOnlyHint: true, + }, }; export const handler = async (client: Hyperswitch, args: Record | undefined) => { diff --git a/packages/mcp-server/src/tools/disputes/retrieve-disputes.ts b/packages/mcp-server/src/tools/disputes/retrieve-disputes.ts index a0af7b1..5ed45e6 100644 --- a/packages/mcp-server/src/tools/disputes/retrieve-disputes.ts +++ b/packages/mcp-server/src/tools/disputes/retrieve-disputes.ts @@ -34,6 +34,9 @@ export const tool: Tool = { }, required: ['dispute_id'], }, + annotations: { + readOnlyHint: true, + }, }; export const handler = async (client: Hyperswitch, args: Record | undefined) => { diff --git a/packages/mcp-server/src/tools/events/delivery-attempts-events.ts b/packages/mcp-server/src/tools/events/delivery-attempts-events.ts index 443f204..1d0c825 100644 --- a/packages/mcp-server/src/tools/events/delivery-attempts-events.ts +++ b/packages/mcp-server/src/tools/events/delivery-attempts-events.ts @@ -37,6 +37,9 @@ export const tool: Tool = { }, required: ['merchant_id', 'event_id'], }, + annotations: { + readOnlyHint: true, + }, }; export const handler = async (client: Hyperswitch, args: Record | undefined) => { diff --git a/packages/mcp-server/src/tools/events/list-events.ts b/packages/mcp-server/src/tools/events/list-events.ts index 0450d0f..18b9a06 100644 --- a/packages/mcp-server/src/tools/events/list-events.ts +++ b/packages/mcp-server/src/tools/events/list-events.ts @@ -115,6 +115,7 @@ export const tool: Tool = { }, }, }, + annotations: {}, }; export const handler = async (client: Hyperswitch, args: Record | undefined) => { diff --git a/packages/mcp-server/src/tools/events/profile/list-events-profile.ts b/packages/mcp-server/src/tools/events/profile/list-events-profile.ts index 37755a0..17b2a08 100644 --- a/packages/mcp-server/src/tools/events/profile/list-events-profile.ts +++ b/packages/mcp-server/src/tools/events/profile/list-events-profile.ts @@ -112,6 +112,7 @@ export const tool: Tool = { }, }, }, + annotations: {}, }; export const handler = async (client: Hyperswitch, args: Record | undefined) => { diff --git a/packages/mcp-server/src/tools/events/retry-events.ts b/packages/mcp-server/src/tools/events/retry-events.ts index 9fb8768..65b8487 100644 --- a/packages/mcp-server/src/tools/events/retry-events.ts +++ b/packages/mcp-server/src/tools/events/retry-events.ts @@ -37,6 +37,7 @@ export const tool: Tool = { }, required: ['merchant_id', 'event_id'], }, + annotations: {}, }; export const handler = async (client: Hyperswitch, args: Record | undefined) => { diff --git a/packages/mcp-server/src/tools/gsm/create-gsm.ts b/packages/mcp-server/src/tools/gsm/create-gsm.ts index 7e0e011..09643f1 100644 --- a/packages/mcp-server/src/tools/gsm/create-gsm.ts +++ b/packages/mcp-server/src/tools/gsm/create-gsm.ts @@ -218,6 +218,7 @@ export const tool: Tool = { }, }, }, + annotations: {}, }; export const handler = async (client: Hyperswitch, args: Record | undefined) => { diff --git a/packages/mcp-server/src/tools/gsm/delete-gsm.ts b/packages/mcp-server/src/tools/gsm/delete-gsm.ts index aa2d14e..dce5eb0 100644 --- a/packages/mcp-server/src/tools/gsm/delete-gsm.ts +++ b/packages/mcp-server/src/tools/gsm/delete-gsm.ts @@ -51,6 +51,7 @@ export const tool: Tool = { }, required: ['code', 'connector', 'flow', 'message', 'sub_flow'], }, + annotations: {}, }; export const handler = async (client: Hyperswitch, args: Record | undefined) => { diff --git a/packages/mcp-server/src/tools/gsm/retrieve-gsm.ts b/packages/mcp-server/src/tools/gsm/retrieve-gsm.ts index 9f9b1ee..045010f 100644 --- a/packages/mcp-server/src/tools/gsm/retrieve-gsm.ts +++ b/packages/mcp-server/src/tools/gsm/retrieve-gsm.ts @@ -164,6 +164,7 @@ export const tool: Tool = { }, }, }, + annotations: {}, }; export const handler = async (client: Hyperswitch, args: Record | undefined) => { diff --git a/packages/mcp-server/src/tools/gsm/update-gsm.ts b/packages/mcp-server/src/tools/gsm/update-gsm.ts index d17948e..a5bee4a 100644 --- a/packages/mcp-server/src/tools/gsm/update-gsm.ts +++ b/packages/mcp-server/src/tools/gsm/update-gsm.ts @@ -97,6 +97,7 @@ export const tool: Tool = { }, }, }, + annotations: {}, }; export const handler = async (client: Hyperswitch, args: Record | undefined) => { diff --git a/packages/mcp-server/src/tools/mandates/retrieve-mandates.ts b/packages/mcp-server/src/tools/mandates/retrieve-mandates.ts index 88002c7..6ebc248 100644 --- a/packages/mcp-server/src/tools/mandates/retrieve-mandates.ts +++ b/packages/mcp-server/src/tools/mandates/retrieve-mandates.ts @@ -34,6 +34,9 @@ export const tool: Tool = { }, required: ['mandate_id'], }, + annotations: { + readOnlyHint: true, + }, }; export const handler = async (client: Hyperswitch, args: Record | undefined) => { diff --git a/packages/mcp-server/src/tools/mandates/revoke-mandates.ts b/packages/mcp-server/src/tools/mandates/revoke-mandates.ts index 886bb20..a640f35 100644 --- a/packages/mcp-server/src/tools/mandates/revoke-mandates.ts +++ b/packages/mcp-server/src/tools/mandates/revoke-mandates.ts @@ -34,6 +34,7 @@ export const tool: Tool = { }, required: ['mandate_id'], }, + annotations: {}, }; export const handler = async (client: Hyperswitch, args: Record | undefined) => { diff --git a/packages/mcp-server/src/tools/organization/create-organization.ts b/packages/mcp-server/src/tools/organization/create-organization.ts index 3038a5b..f114c77 100644 --- a/packages/mcp-server/src/tools/organization/create-organization.ts +++ b/packages/mcp-server/src/tools/organization/create-organization.ts @@ -43,6 +43,7 @@ export const tool: Tool = { }, required: ['organization_name'], }, + annotations: {}, }; export const handler = async (client: Hyperswitch, args: Record | undefined) => { diff --git a/packages/mcp-server/src/tools/organization/retrieve-organization.ts b/packages/mcp-server/src/tools/organization/retrieve-organization.ts index 881e8c2..2cfb75a 100644 --- a/packages/mcp-server/src/tools/organization/retrieve-organization.ts +++ b/packages/mcp-server/src/tools/organization/retrieve-organization.ts @@ -34,6 +34,9 @@ export const tool: Tool = { }, required: ['id'], }, + annotations: { + readOnlyHint: true, + }, }; export const handler = async (client: Hyperswitch, args: Record | undefined) => { diff --git a/packages/mcp-server/src/tools/organization/update-organization.ts b/packages/mcp-server/src/tools/organization/update-organization.ts index 207b146..a4092c4 100644 --- a/packages/mcp-server/src/tools/organization/update-organization.ts +++ b/packages/mcp-server/src/tools/organization/update-organization.ts @@ -50,6 +50,9 @@ export const tool: Tool = { }, required: ['id', 'platform_merchant_id'], }, + annotations: { + idempotentHint: true, + }, }; export const handler = async (client: Hyperswitch, args: Record | undefined) => { diff --git a/packages/mcp-server/src/tools/payment-link/retrieve-payment-link.ts b/packages/mcp-server/src/tools/payment-link/retrieve-payment-link.ts index daf7633..9d41995 100644 --- a/packages/mcp-server/src/tools/payment-link/retrieve-payment-link.ts +++ b/packages/mcp-server/src/tools/payment-link/retrieve-payment-link.ts @@ -39,6 +39,9 @@ export const tool: Tool = { }, required: ['payment_link_id'], }, + annotations: { + readOnlyHint: true, + }, }; export const handler = async (client: Hyperswitch, args: Record | undefined) => { diff --git a/packages/mcp-server/src/tools/payment-methods/create-payment-methods.ts b/packages/mcp-server/src/tools/payment-methods/create-payment-methods.ts index 99fd010..6f7c253 100644 --- a/packages/mcp-server/src/tools/payment-methods/create-payment-methods.ts +++ b/packages/mcp-server/src/tools/payment-methods/create-payment-methods.ts @@ -753,6 +753,7 @@ export const tool: Tool = { }, }, }, + annotations: {}, }; export const handler = async (client: Hyperswitch, args: Record | undefined) => { diff --git a/packages/mcp-server/src/tools/payment-methods/delete-payment-methods.ts b/packages/mcp-server/src/tools/payment-methods/delete-payment-methods.ts index 55d5f83..b119a29 100644 --- a/packages/mcp-server/src/tools/payment-methods/delete-payment-methods.ts +++ b/packages/mcp-server/src/tools/payment-methods/delete-payment-methods.ts @@ -34,6 +34,9 @@ export const tool: Tool = { }, required: ['method_id'], }, + annotations: { + idempotentHint: true, + }, }; export const handler = async (client: Hyperswitch, args: Record | undefined) => { diff --git a/packages/mcp-server/src/tools/payment-methods/retrieve-payment-methods.ts b/packages/mcp-server/src/tools/payment-methods/retrieve-payment-methods.ts index 0474bbd..a989767 100644 --- a/packages/mcp-server/src/tools/payment-methods/retrieve-payment-methods.ts +++ b/packages/mcp-server/src/tools/payment-methods/retrieve-payment-methods.ts @@ -27,6 +27,9 @@ export const tool: Tool = { }, required: ['method_id'], }, + annotations: { + readOnlyHint: true, + }, }; export const handler = async (client: Hyperswitch, args: Record | undefined) => { diff --git a/packages/mcp-server/src/tools/payment-methods/set-default-payment-methods.ts b/packages/mcp-server/src/tools/payment-methods/set-default-payment-methods.ts index 8ef5d88..6f3fbcd 100644 --- a/packages/mcp-server/src/tools/payment-methods/set-default-payment-methods.ts +++ b/packages/mcp-server/src/tools/payment-methods/set-default-payment-methods.ts @@ -37,6 +37,7 @@ export const tool: Tool = { }, required: ['customer_id', 'payment_method_id'], }, + annotations: {}, }; export const handler = async (client: Hyperswitch, args: Record | undefined) => { diff --git a/packages/mcp-server/src/tools/payment-methods/update-payment-methods.ts b/packages/mcp-server/src/tools/payment-methods/update-payment-methods.ts index c46bb19..c2b3c33 100644 --- a/packages/mcp-server/src/tools/payment-methods/update-payment-methods.ts +++ b/packages/mcp-server/src/tools/payment-methods/update-payment-methods.ts @@ -54,6 +54,7 @@ export const tool: Tool = { }, required: ['method_id'], }, + annotations: {}, }; export const handler = async (client: Hyperswitch, args: Record | undefined) => { diff --git a/packages/mcp-server/src/tools/payments/cancel-payments.ts b/packages/mcp-server/src/tools/payments/cancel-payments.ts index 0f742f6..3bbc9dc 100644 --- a/packages/mcp-server/src/tools/payments/cancel-payments.ts +++ b/packages/mcp-server/src/tools/payments/cancel-payments.ts @@ -71,6 +71,7 @@ export const tool: Tool = { }, }, }, + annotations: {}, }; export const handler = async (client: Hyperswitch, args: Record | undefined) => { diff --git a/packages/mcp-server/src/tools/payments/capture-payments.ts b/packages/mcp-server/src/tools/payments/capture-payments.ts index de7b5b8..0774e01 100644 --- a/packages/mcp-server/src/tools/payments/capture-payments.ts +++ b/packages/mcp-server/src/tools/payments/capture-payments.ts @@ -85,6 +85,7 @@ export const tool: Tool = { }, }, }, + annotations: {}, }; export const handler = async (client: Hyperswitch, args: Record | undefined) => { diff --git a/packages/mcp-server/src/tools/payments/complete-authorize-payments.ts b/packages/mcp-server/src/tools/payments/complete-authorize-payments.ts index 56ddff5..ccee99d 100644 --- a/packages/mcp-server/src/tools/payments/complete-authorize-payments.ts +++ b/packages/mcp-server/src/tools/payments/complete-authorize-payments.ts @@ -364,6 +364,7 @@ export const tool: Tool = { }, }, }, + annotations: {}, }; export const handler = async (client: Hyperswitch, args: Record | undefined) => { diff --git a/packages/mcp-server/src/tools/payments/confirm-payments.ts b/packages/mcp-server/src/tools/payments/confirm-payments.ts index 3378331..f2a8f9c 100644 --- a/packages/mcp-server/src/tools/payments/confirm-payments.ts +++ b/packages/mcp-server/src/tools/payments/confirm-payments.ts @@ -4290,6 +4290,7 @@ export const tool: Tool = { }, }, }, + annotations: {}, }; export const handler = async (client: Hyperswitch, args: Record | undefined) => { diff --git a/packages/mcp-server/src/tools/payments/create-payments.ts b/packages/mcp-server/src/tools/payments/create-payments.ts index 980d792..feb0c96 100644 --- a/packages/mcp-server/src/tools/payments/create-payments.ts +++ b/packages/mcp-server/src/tools/payments/create-payments.ts @@ -4305,6 +4305,7 @@ export const tool: Tool = { }, }, }, + annotations: {}, }; export const handler = async (client: Hyperswitch, args: Record | undefined) => { diff --git a/packages/mcp-server/src/tools/payments/create-session-token-payments.ts b/packages/mcp-server/src/tools/payments/create-session-token-payments.ts index 2a6103a..c8b902e 100644 --- a/packages/mcp-server/src/tools/payments/create-session-token-payments.ts +++ b/packages/mcp-server/src/tools/payments/create-session-token-payments.ts @@ -182,6 +182,7 @@ export const tool: Tool = { }, }, }, + annotations: {}, }; export const handler = async (client: Hyperswitch, args: Record | undefined) => { diff --git a/packages/mcp-server/src/tools/payments/incremental-authorization-payments.ts b/packages/mcp-server/src/tools/payments/incremental-authorization-payments.ts index 18e5a72..bf7547c 100644 --- a/packages/mcp-server/src/tools/payments/incremental-authorization-payments.ts +++ b/packages/mcp-server/src/tools/payments/incremental-authorization-payments.ts @@ -35,6 +35,7 @@ export const tool: Tool = { }, required: ['payment_id', 'amount'], }, + annotations: {}, }; export const handler = async (client: Hyperswitch, args: Record | undefined) => { diff --git a/packages/mcp-server/src/tools/payments/list-payments.ts b/packages/mcp-server/src/tools/payments/list-payments.ts index fda29f9..f676213 100644 --- a/packages/mcp-server/src/tools/payments/list-payments.ts +++ b/packages/mcp-server/src/tools/payments/list-payments.ts @@ -65,6 +65,9 @@ export const tool: Tool = { }, required: [], }, + annotations: { + readOnlyHint: true, + }, }; export const handler = async (client: Hyperswitch, args: Record | undefined) => { diff --git a/packages/mcp-server/src/tools/payments/number-3ds/authenticate-payments-number-3ds.ts b/packages/mcp-server/src/tools/payments/number-3ds/authenticate-payments-number-3ds.ts index 903d94f..fca2f6e 100644 --- a/packages/mcp-server/src/tools/payments/number-3ds/authenticate-payments-number-3ds.ts +++ b/packages/mcp-server/src/tools/payments/number-3ds/authenticate-payments-number-3ds.ts @@ -97,6 +97,7 @@ export const tool: Tool = { }, }, }, + annotations: {}, }; export const handler = async (client: Hyperswitch, args: Record | undefined) => { diff --git a/packages/mcp-server/src/tools/payments/post-session-tokens-payments.ts b/packages/mcp-server/src/tools/payments/post-session-tokens-payments.ts index 0a50bfc..a9d8307 100644 --- a/packages/mcp-server/src/tools/payments/post-session-tokens-payments.ts +++ b/packages/mcp-server/src/tools/payments/post-session-tokens-payments.ts @@ -165,6 +165,7 @@ export const tool: Tool = { }, }, }, + annotations: {}, }; export const handler = async (client: Hyperswitch, args: Record | undefined) => { diff --git a/packages/mcp-server/src/tools/payments/retrieve-payments.ts b/packages/mcp-server/src/tools/payments/retrieve-payments.ts index 546332a..638d1b4 100644 --- a/packages/mcp-server/src/tools/payments/retrieve-payments.ts +++ b/packages/mcp-server/src/tools/payments/retrieve-payments.ts @@ -44,6 +44,9 @@ export const tool: Tool = { }, required: ['payment_id'], }, + annotations: { + readOnlyHint: true, + }, }; export const handler = async (client: Hyperswitch, args: Record | undefined) => { diff --git a/packages/mcp-server/src/tools/payments/update-metadata-payments.ts b/packages/mcp-server/src/tools/payments/update-metadata-payments.ts index 0f0cadd..9421263 100644 --- a/packages/mcp-server/src/tools/payments/update-metadata-payments.ts +++ b/packages/mcp-server/src/tools/payments/update-metadata-payments.ts @@ -38,6 +38,7 @@ export const tool: Tool = { }, required: ['payment_id', 'metadata'], }, + annotations: {}, }; export const handler = async (client: Hyperswitch, args: Record | undefined) => { diff --git a/packages/mcp-server/src/tools/payments/update-payments.ts b/packages/mcp-server/src/tools/payments/update-payments.ts index f1f380d..17898ce 100644 --- a/packages/mcp-server/src/tools/payments/update-payments.ts +++ b/packages/mcp-server/src/tools/payments/update-payments.ts @@ -4298,6 +4298,7 @@ export const tool: Tool = { }, }, }, + annotations: {}, }; export const handler = async (client: Hyperswitch, args: Record | undefined) => { diff --git a/packages/mcp-server/src/tools/payouts/cancel-payouts.ts b/packages/mcp-server/src/tools/payouts/cancel-payouts.ts index 3bcef53..d95f60e 100644 --- a/packages/mcp-server/src/tools/payouts/cancel-payouts.ts +++ b/packages/mcp-server/src/tools/payouts/cancel-payouts.ts @@ -32,6 +32,7 @@ export const tool: Tool = { }, required: ['path_payout_id', 'body_payout_id'], }, + annotations: {}, }; export const handler = async (client: Hyperswitch, args: Record | undefined) => { diff --git a/packages/mcp-server/src/tools/payouts/confirm-payouts.ts b/packages/mcp-server/src/tools/payouts/confirm-payouts.ts index fedec97..54eb747 100644 --- a/packages/mcp-server/src/tools/payouts/confirm-payouts.ts +++ b/packages/mcp-server/src/tools/payouts/confirm-payouts.ts @@ -1437,6 +1437,7 @@ export const tool: Tool = { }, }, }, + annotations: {}, }; export const handler = async (client: Hyperswitch, args: Record | undefined) => { diff --git a/packages/mcp-server/src/tools/payouts/create-payouts.ts b/packages/mcp-server/src/tools/payouts/create-payouts.ts index d413a2a..a2a89cf 100644 --- a/packages/mcp-server/src/tools/payouts/create-payouts.ts +++ b/packages/mcp-server/src/tools/payouts/create-payouts.ts @@ -1435,6 +1435,7 @@ export const tool: Tool = { }, }, }, + annotations: {}, }; export const handler = async (client: Hyperswitch, args: Record | undefined) => { diff --git a/packages/mcp-server/src/tools/payouts/fulfill-payouts.ts b/packages/mcp-server/src/tools/payouts/fulfill-payouts.ts index abe5cf1..8beb779 100644 --- a/packages/mcp-server/src/tools/payouts/fulfill-payouts.ts +++ b/packages/mcp-server/src/tools/payouts/fulfill-payouts.ts @@ -32,6 +32,7 @@ export const tool: Tool = { }, required: ['path_payout_id', 'body_payout_id'], }, + annotations: {}, }; export const handler = async (client: Hyperswitch, args: Record | undefined) => { diff --git a/packages/mcp-server/src/tools/payouts/list-filters-payouts.ts b/packages/mcp-server/src/tools/payouts/list-filters-payouts.ts index a18963d..70b9725 100644 --- a/packages/mcp-server/src/tools/payouts/list-filters-payouts.ts +++ b/packages/mcp-server/src/tools/payouts/list-filters-payouts.ts @@ -43,6 +43,7 @@ export const tool: Tool = { }, required: ['start_time'], }, + annotations: {}, }; export const handler = async (client: Hyperswitch, args: Record | undefined) => { diff --git a/packages/mcp-server/src/tools/payouts/list/retrieve-payouts-list.ts b/packages/mcp-server/src/tools/payouts/list/retrieve-payouts-list.ts index 4cf3d05..10f5021 100644 --- a/packages/mcp-server/src/tools/payouts/list/retrieve-payouts-list.ts +++ b/packages/mcp-server/src/tools/payouts/list/retrieve-payouts-list.ts @@ -49,6 +49,9 @@ export const tool: Tool = { }, required: ['created', 'customer_id', 'ending_before', 'limit', 'starting_after', 'time_range'], }, + annotations: { + readOnlyHint: true, + }, }; export const handler = async (client: Hyperswitch, args: Record | undefined) => { diff --git a/packages/mcp-server/src/tools/payouts/list/with-filters-payouts-list.ts b/packages/mcp-server/src/tools/payouts/list/with-filters-payouts-list.ts index 8ccd51b..039b864 100644 --- a/packages/mcp-server/src/tools/payouts/list/with-filters-payouts-list.ts +++ b/packages/mcp-server/src/tools/payouts/list/with-filters-payouts-list.ts @@ -304,6 +304,7 @@ export const tool: Tool = { }, }, }, + annotations: {}, }; export const handler = async (client: Hyperswitch, args: Record | undefined) => { diff --git a/packages/mcp-server/src/tools/payouts/retrieve-payouts.ts b/packages/mcp-server/src/tools/payouts/retrieve-payouts.ts index 7d00fa0..9874878 100644 --- a/packages/mcp-server/src/tools/payouts/retrieve-payouts.ts +++ b/packages/mcp-server/src/tools/payouts/retrieve-payouts.ts @@ -31,6 +31,9 @@ export const tool: Tool = { }, required: ['payout_id'], }, + annotations: { + readOnlyHint: true, + }, }; export const handler = async (client: Hyperswitch, args: Record | undefined) => { diff --git a/packages/mcp-server/src/tools/payouts/update-payouts.ts b/packages/mcp-server/src/tools/payouts/update-payouts.ts index 5eb307f..b6ec075 100644 --- a/packages/mcp-server/src/tools/payouts/update-payouts.ts +++ b/packages/mcp-server/src/tools/payouts/update-payouts.ts @@ -1442,6 +1442,7 @@ export const tool: Tool = { }, }, }, + annotations: {}, }; export const handler = async (client: Hyperswitch, args: Record | undefined) => { diff --git a/packages/mcp-server/src/tools/poll/retrieve-status-poll.ts b/packages/mcp-server/src/tools/poll/retrieve-status-poll.ts index 293bbb1..c689dfa 100644 --- a/packages/mcp-server/src/tools/poll/retrieve-status-poll.ts +++ b/packages/mcp-server/src/tools/poll/retrieve-status-poll.ts @@ -34,6 +34,9 @@ export const tool: Tool = { }, required: ['poll_id'], }, + annotations: { + readOnlyHint: true, + }, }; export const handler = async (client: Hyperswitch, args: Record | undefined) => { diff --git a/packages/mcp-server/src/tools/profile-acquirers/create-profile-acquirers.ts b/packages/mcp-server/src/tools/profile-acquirers/create-profile-acquirers.ts index 7deea61..207cac8 100644 --- a/packages/mcp-server/src/tools/profile-acquirers/create-profile-acquirers.ts +++ b/packages/mcp-server/src/tools/profile-acquirers/create-profile-acquirers.ts @@ -71,6 +71,7 @@ export const tool: Tool = { 'profile_id', ], }, + annotations: {}, }; export const handler = async (client: Hyperswitch, args: Record | undefined) => { diff --git a/packages/mcp-server/src/tools/profile-acquirers/update-profile-acquirers.ts b/packages/mcp-server/src/tools/profile-acquirers/update-profile-acquirers.ts index 194911e..24fd16a 100644 --- a/packages/mcp-server/src/tools/profile-acquirers/update-profile-acquirers.ts +++ b/packages/mcp-server/src/tools/profile-acquirers/update-profile-acquirers.ts @@ -58,6 +58,7 @@ export const tool: Tool = { }, required: ['profile_id', 'profile_acquirer_id'], }, + annotations: {}, }; export const handler = async (client: Hyperswitch, args: Record | undefined) => { diff --git a/packages/mcp-server/src/tools/refunds/create-refunds.ts b/packages/mcp-server/src/tools/refunds/create-refunds.ts index 8bb98c6..4c175bf 100644 --- a/packages/mcp-server/src/tools/refunds/create-refunds.ts +++ b/packages/mcp-server/src/tools/refunds/create-refunds.ts @@ -209,6 +209,7 @@ export const tool: Tool = { }, }, }, + annotations: {}, }; export const handler = async (client: Hyperswitch, args: Record | undefined) => { diff --git a/packages/mcp-server/src/tools/refunds/list-refunds.ts b/packages/mcp-server/src/tools/refunds/list-refunds.ts index b914355..cfb0592 100644 --- a/packages/mcp-server/src/tools/refunds/list-refunds.ts +++ b/packages/mcp-server/src/tools/refunds/list-refunds.ts @@ -273,6 +273,7 @@ export const tool: Tool = { }, }, }, + annotations: {}, }; export const handler = async (client: Hyperswitch, args: Record | undefined) => { diff --git a/packages/mcp-server/src/tools/refunds/retrieve-refunds.ts b/packages/mcp-server/src/tools/refunds/retrieve-refunds.ts index 1dd6bdc..8102f7a 100644 --- a/packages/mcp-server/src/tools/refunds/retrieve-refunds.ts +++ b/packages/mcp-server/src/tools/refunds/retrieve-refunds.ts @@ -34,6 +34,9 @@ export const tool: Tool = { }, required: ['refund_id'], }, + annotations: { + readOnlyHint: true, + }, }; export const handler = async (client: Hyperswitch, args: Record | undefined) => { diff --git a/packages/mcp-server/src/tools/refunds/update-refunds.ts b/packages/mcp-server/src/tools/refunds/update-refunds.ts index 27a01b0..3ed67a9 100644 --- a/packages/mcp-server/src/tools/refunds/update-refunds.ts +++ b/packages/mcp-server/src/tools/refunds/update-refunds.ts @@ -44,6 +44,7 @@ export const tool: Tool = { }, required: ['refund_id'], }, + annotations: {}, }; export const handler = async (client: Hyperswitch, args: Record | undefined) => { diff --git a/packages/mcp-server/src/tools/relay/create-relay.ts b/packages/mcp-server/src/tools/relay/create-relay.ts index 6e6b333..60d834b 100644 --- a/packages/mcp-server/src/tools/relay/create-relay.ts +++ b/packages/mcp-server/src/tools/relay/create-relay.ts @@ -249,6 +249,7 @@ export const tool: Tool = { }, }, }, + annotations: {}, }; export const handler = async (client: Hyperswitch, args: Record | undefined) => { diff --git a/packages/mcp-server/src/tools/relay/retrieve-relay.ts b/packages/mcp-server/src/tools/relay/retrieve-relay.ts index ca0b1c0..b27c7bb 100644 --- a/packages/mcp-server/src/tools/relay/retrieve-relay.ts +++ b/packages/mcp-server/src/tools/relay/retrieve-relay.ts @@ -37,6 +37,9 @@ export const tool: Tool = { }, required: ['relay_id', 'X-Profile-Id'], }, + annotations: { + readOnlyHint: true, + }, }; export const handler = async (client: Hyperswitch, args: Record | undefined) => { diff --git a/packages/mcp-server/src/tools/routing/activate-routing.ts b/packages/mcp-server/src/tools/routing/activate-routing.ts index bcdc23c..a929f90 100644 --- a/packages/mcp-server/src/tools/routing/activate-routing.ts +++ b/packages/mcp-server/src/tools/routing/activate-routing.ts @@ -34,6 +34,7 @@ export const tool: Tool = { }, required: ['routing_algorithm_id'], }, + annotations: {}, }; export const handler = async (client: Hyperswitch, args: Record | undefined) => { diff --git a/packages/mcp-server/src/tools/routing/create-routing.ts b/packages/mcp-server/src/tools/routing/create-routing.ts index 9bdc794..141ec16 100644 --- a/packages/mcp-server/src/tools/routing/create-routing.ts +++ b/packages/mcp-server/src/tools/routing/create-routing.ts @@ -552,6 +552,7 @@ export const tool: Tool = { }, }, }, + annotations: {}, }; export const handler = async (client: Hyperswitch, args: Record | undefined) => { diff --git a/packages/mcp-server/src/tools/routing/deactivate-routing.ts b/packages/mcp-server/src/tools/routing/deactivate-routing.ts index f150b0e..180af02 100644 --- a/packages/mcp-server/src/tools/routing/deactivate-routing.ts +++ b/packages/mcp-server/src/tools/routing/deactivate-routing.ts @@ -552,6 +552,7 @@ export const tool: Tool = { }, }, }, + annotations: {}, }; export const handler = async (client: Hyperswitch, args: Record | undefined) => { diff --git a/packages/mcp-server/src/tools/routing/default/profile/retrieve-default-routing-profile.ts b/packages/mcp-server/src/tools/routing/default/profile/retrieve-default-routing-profile.ts index bb9c4bb..d13f332 100644 --- a/packages/mcp-server/src/tools/routing/default/profile/retrieve-default-routing-profile.ts +++ b/packages/mcp-server/src/tools/routing/default/profile/retrieve-default-routing-profile.ts @@ -31,6 +31,9 @@ export const tool: Tool = { }, required: [], }, + annotations: { + readOnlyHint: true, + }, }; export const handler = async (client: Hyperswitch, args: Record | undefined) => { diff --git a/packages/mcp-server/src/tools/routing/default/profile/update-default-routing-profile.ts b/packages/mcp-server/src/tools/routing/default/profile/update-default-routing-profile.ts index c971d73..d18fc29 100644 --- a/packages/mcp-server/src/tools/routing/default/profile/update-default-routing-profile.ts +++ b/packages/mcp-server/src/tools/routing/default/profile/update-default-routing-profile.ts @@ -157,6 +157,7 @@ export const tool: Tool = { }, }, }, + annotations: {}, }; export const handler = async (client: Hyperswitch, args: Record | undefined) => { diff --git a/packages/mcp-server/src/tools/routing/default/retrieve-routing-default.ts b/packages/mcp-server/src/tools/routing/default/retrieve-routing-default.ts index c933eb0..a06d824 100644 --- a/packages/mcp-server/src/tools/routing/default/retrieve-routing-default.ts +++ b/packages/mcp-server/src/tools/routing/default/retrieve-routing-default.ts @@ -31,6 +31,9 @@ export const tool: Tool = { }, required: [], }, + annotations: { + readOnlyHint: true, + }, }; export const handler = async (client: Hyperswitch, args: Record | undefined) => { diff --git a/packages/mcp-server/src/tools/routing/default/update-routing-default.ts b/packages/mcp-server/src/tools/routing/default/update-routing-default.ts index 2dfba82..0843ab9 100644 --- a/packages/mcp-server/src/tools/routing/default/update-routing-default.ts +++ b/packages/mcp-server/src/tools/routing/default/update-routing-default.ts @@ -154,6 +154,7 @@ export const tool: Tool = { }, }, }, + annotations: {}, }; export const handler = async (client: Hyperswitch, args: Record | undefined) => { diff --git a/packages/mcp-server/src/tools/routing/list-routing.ts b/packages/mcp-server/src/tools/routing/list-routing.ts index a827425..594d82b 100644 --- a/packages/mcp-server/src/tools/routing/list-routing.ts +++ b/packages/mcp-server/src/tools/routing/list-routing.ts @@ -43,6 +43,9 @@ export const tool: Tool = { }, required: [], }, + annotations: { + readOnlyHint: true, + }, }; export const handler = async (client: Hyperswitch, args: Record | undefined) => { diff --git a/packages/mcp-server/src/tools/routing/retrieve-active-routing.ts b/packages/mcp-server/src/tools/routing/retrieve-active-routing.ts index 50cb5b6..4d389ce 100644 --- a/packages/mcp-server/src/tools/routing/retrieve-active-routing.ts +++ b/packages/mcp-server/src/tools/routing/retrieve-active-routing.ts @@ -28,6 +28,9 @@ export const tool: Tool = { }, required: [], }, + annotations: { + readOnlyHint: true, + }, }; export const handler = async (client: Hyperswitch, args: Record | undefined) => { diff --git a/packages/mcp-server/src/tools/routing/retrieve-routing.ts b/packages/mcp-server/src/tools/routing/retrieve-routing.ts index 24a75b3..2002f4d 100644 --- a/packages/mcp-server/src/tools/routing/retrieve-routing.ts +++ b/packages/mcp-server/src/tools/routing/retrieve-routing.ts @@ -27,6 +27,9 @@ export const tool: Tool = { }, required: ['routing_algorithm_id'], }, + annotations: { + readOnlyHint: true, + }, }; export const handler = async (client: Hyperswitch, args: Record | undefined) => { diff --git a/packages/mcp-server/src/tools/three-ds-decision/execute-three-ds-decision.ts b/packages/mcp-server/src/tools/three-ds-decision/execute-three-ds-decision.ts index 7e73781..90d9a1c 100644 --- a/packages/mcp-server/src/tools/three-ds-decision/execute-three-ds-decision.ts +++ b/packages/mcp-server/src/tools/three-ds-decision/execute-three-ds-decision.ts @@ -563,6 +563,7 @@ export const tool: Tool = { }, }, }, + annotations: {}, }; export const handler = async (client: Hyperswitch, args: Record | undefined) => { From a1e0b4a0cccd7fd08cf779e0a889a4a5ece9201c Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 30 Jul 2025 04:16:50 +0000 Subject: [PATCH 11/44] chore(internal): remove redundant imports config --- package.json | 4 ---- 1 file changed, 4 deletions(-) diff --git a/package.json b/package.json index 25c749d..fccbba8 100644 --- a/package.json +++ b/package.json @@ -46,10 +46,6 @@ "typescript": "5.8.3", "typescript-eslint": "8.31.1" }, - "imports": { - "hyperswitch": ".", - "hyperswitch/*": "./src/*" - }, "exports": { ".": { "import": "./dist/index.mjs", From 93d9fc6e4c0b78d09ccebc5f43723a5b280f209e Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 31 Jul 2025 05:53:11 +0000 Subject: [PATCH 12/44] fix(mcp): fix tool description of jq_filter --- .../business-profile/create-accounts-business-profile.ts | 3 +-- .../business-profile/list-accounts-business-profile.ts | 3 +-- .../business-profile/retrieve-accounts-business-profile.ts | 3 +-- .../business-profile/update-accounts-business-profile.ts | 3 +-- .../tools/accounts/connectors/create-accounts-connectors.ts | 2 +- .../src/tools/accounts/connectors/list-accounts-connectors.ts | 3 +-- .../tools/accounts/connectors/retrieve-accounts-connectors.ts | 3 +-- .../tools/accounts/connectors/update-accounts-connectors.ts | 2 +- packages/mcp-server/src/tools/accounts/create-accounts.ts | 2 +- .../src/tools/accounts/list-payment-methods-accounts.ts | 2 +- packages/mcp-server/src/tools/accounts/retrieve-accounts.ts | 3 +-- packages/mcp-server/src/tools/accounts/update-accounts.ts | 2 +- .../src/tools/authentication/create-authentication.ts | 3 +-- packages/mcp-server/src/tools/customers/create-customers.ts | 2 +- .../payment-methods/list-customers-payment-methods.ts | 3 +-- .../payment-methods/list-saved-customers-payment-methods.ts | 2 +- packages/mcp-server/src/tools/customers/update-customers.ts | 3 +-- .../src/tools/payment-methods/create-payment-methods.ts | 2 +- .../src/tools/payment-methods/retrieve-payment-methods.ts | 3 +-- .../src/tools/payment-methods/update-payment-methods.ts | 2 +- packages/mcp-server/src/tools/payments/capture-payments.ts | 2 +- .../src/tools/payments/complete-authorize-payments.ts | 3 +-- packages/mcp-server/src/tools/payments/confirm-payments.ts | 2 +- packages/mcp-server/src/tools/payments/create-payments.ts | 2 +- .../src/tools/payments/create-session-token-payments.ts | 2 +- .../src/tools/payments/incremental-authorization-payments.ts | 3 +-- packages/mcp-server/src/tools/payments/list-payments.ts | 3 +-- .../src/tools/payments/post-session-tokens-payments.ts | 3 +-- packages/mcp-server/src/tools/payments/retrieve-payments.ts | 2 +- packages/mcp-server/src/tools/payments/update-payments.ts | 2 +- packages/mcp-server/src/tools/payouts/cancel-payouts.ts | 3 +-- packages/mcp-server/src/tools/payouts/confirm-payouts.ts | 3 +-- packages/mcp-server/src/tools/payouts/create-payouts.ts | 3 +-- packages/mcp-server/src/tools/payouts/fulfill-payouts.ts | 3 +-- .../mcp-server/src/tools/payouts/list/retrieve-payouts-list.ts | 3 +-- .../src/tools/payouts/list/with-filters-payouts-list.ts | 3 +-- packages/mcp-server/src/tools/payouts/retrieve-payouts.ts | 3 +-- packages/mcp-server/src/tools/payouts/update-payouts.ts | 3 +-- packages/mcp-server/src/tools/refunds/create-refunds.ts | 2 +- packages/mcp-server/src/tools/refunds/list-refunds.ts | 2 +- packages/mcp-server/src/tools/routing/create-routing.ts | 3 +-- packages/mcp-server/src/tools/routing/deactivate-routing.ts | 3 +-- .../mcp-server/src/tools/routing/retrieve-active-routing.ts | 3 +-- packages/mcp-server/src/tools/routing/retrieve-routing.ts | 3 +-- .../src/tools/three-ds-decision/execute-three-ds-decision.ts | 3 +-- 45 files changed, 45 insertions(+), 73 deletions(-) diff --git a/packages/mcp-server/src/tools/accounts/business-profile/create-accounts-business-profile.ts b/packages/mcp-server/src/tools/accounts/business-profile/create-accounts-business-profile.ts index 5731887..26e1d18 100644 --- a/packages/mcp-server/src/tools/accounts/business-profile/create-accounts-business-profile.ts +++ b/packages/mcp-server/src/tools/accounts/business-profile/create-accounts-business-profile.ts @@ -16,8 +16,7 @@ export const metadata: Metadata = { export const tool: Tool = { name: 'create_accounts_business_profile', - description: - "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\nCreates a new *profile* for a merchant", + description: 'Creates a new *profile* for a merchant', inputSchema: { type: 'object', properties: { diff --git a/packages/mcp-server/src/tools/accounts/business-profile/list-accounts-business-profile.ts b/packages/mcp-server/src/tools/accounts/business-profile/list-accounts-business-profile.ts index 7be71b1..4a6a5f1 100644 --- a/packages/mcp-server/src/tools/accounts/business-profile/list-accounts-business-profile.ts +++ b/packages/mcp-server/src/tools/accounts/business-profile/list-accounts-business-profile.ts @@ -16,8 +16,7 @@ export const metadata: Metadata = { export const tool: Tool = { name: 'list_accounts_business_profile', - description: - "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\nLists all the *profiles* under a merchant", + description: 'Lists all the *profiles* under a merchant', inputSchema: { type: 'object', properties: { diff --git a/packages/mcp-server/src/tools/accounts/business-profile/retrieve-accounts-business-profile.ts b/packages/mcp-server/src/tools/accounts/business-profile/retrieve-accounts-business-profile.ts index 9ca4584..3d53199 100644 --- a/packages/mcp-server/src/tools/accounts/business-profile/retrieve-accounts-business-profile.ts +++ b/packages/mcp-server/src/tools/accounts/business-profile/retrieve-accounts-business-profile.ts @@ -16,8 +16,7 @@ export const metadata: Metadata = { export const tool: Tool = { name: 'retrieve_accounts_business_profile', - description: - "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\nRetrieve existing *profile*", + description: 'Retrieve existing *profile*', inputSchema: { type: 'object', properties: { diff --git a/packages/mcp-server/src/tools/accounts/business-profile/update-accounts-business-profile.ts b/packages/mcp-server/src/tools/accounts/business-profile/update-accounts-business-profile.ts index b9319e6..23b074d 100644 --- a/packages/mcp-server/src/tools/accounts/business-profile/update-accounts-business-profile.ts +++ b/packages/mcp-server/src/tools/accounts/business-profile/update-accounts-business-profile.ts @@ -16,8 +16,7 @@ export const metadata: Metadata = { export const tool: Tool = { name: 'update_accounts_business_profile', - description: - "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\nUpdate the *profile*", + description: 'Update the *profile*', inputSchema: { type: 'object', properties: { diff --git a/packages/mcp-server/src/tools/accounts/connectors/create-accounts-connectors.ts b/packages/mcp-server/src/tools/accounts/connectors/create-accounts-connectors.ts index f6bb6b8..197a6dc 100644 --- a/packages/mcp-server/src/tools/accounts/connectors/create-accounts-connectors.ts +++ b/packages/mcp-server/src/tools/accounts/connectors/create-accounts-connectors.ts @@ -17,7 +17,7 @@ export const metadata: Metadata = { export const tool: Tool = { name: 'create_accounts_connectors', description: - "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\nCreates a new Merchant Connector for the merchant account. The connector could be a payment processor/facilitator/acquirer or a provider of specialized services like Fraud/Accounting etc.", + 'Creates a new Merchant Connector for the merchant account. The connector could be a payment processor/facilitator/acquirer or a provider of specialized services like Fraud/Accounting etc.', inputSchema: { type: 'object', properties: { diff --git a/packages/mcp-server/src/tools/accounts/connectors/list-accounts-connectors.ts b/packages/mcp-server/src/tools/accounts/connectors/list-accounts-connectors.ts index 6764a9c..97ab42d 100644 --- a/packages/mcp-server/src/tools/accounts/connectors/list-accounts-connectors.ts +++ b/packages/mcp-server/src/tools/accounts/connectors/list-accounts-connectors.ts @@ -16,8 +16,7 @@ export const metadata: Metadata = { export const tool: Tool = { name: 'list_accounts_connectors', - description: - "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 Merchant Connector Details for the merchant", + description: 'List Merchant Connector Details for the merchant', inputSchema: { type: 'object', properties: { diff --git a/packages/mcp-server/src/tools/accounts/connectors/retrieve-accounts-connectors.ts b/packages/mcp-server/src/tools/accounts/connectors/retrieve-accounts-connectors.ts index 496ef29..d6bd9d0 100644 --- a/packages/mcp-server/src/tools/accounts/connectors/retrieve-accounts-connectors.ts +++ b/packages/mcp-server/src/tools/accounts/connectors/retrieve-accounts-connectors.ts @@ -16,8 +16,7 @@ export const metadata: Metadata = { export const tool: Tool = { name: 'retrieve_accounts_connectors', - description: - "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\nRetrieves details of a Connector account", + description: 'Retrieves details of a Connector account', inputSchema: { type: 'object', properties: { diff --git a/packages/mcp-server/src/tools/accounts/connectors/update-accounts-connectors.ts b/packages/mcp-server/src/tools/accounts/connectors/update-accounts-connectors.ts index 3a7762d..3666d99 100644 --- a/packages/mcp-server/src/tools/accounts/connectors/update-accounts-connectors.ts +++ b/packages/mcp-server/src/tools/accounts/connectors/update-accounts-connectors.ts @@ -17,7 +17,7 @@ export const metadata: Metadata = { export const tool: Tool = { name: 'update_accounts_connectors', description: - "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\nTo update an existing Merchant Connector account. Helpful in enabling/disabling different payment methods and other settings for the connector", + 'To update an existing Merchant Connector account. Helpful in enabling/disabling different payment methods and other settings for the connector', inputSchema: { type: 'object', properties: { diff --git a/packages/mcp-server/src/tools/accounts/create-accounts.ts b/packages/mcp-server/src/tools/accounts/create-accounts.ts index 1a2cb16..c289ea1 100644 --- a/packages/mcp-server/src/tools/accounts/create-accounts.ts +++ b/packages/mcp-server/src/tools/accounts/create-accounts.ts @@ -17,7 +17,7 @@ export const metadata: Metadata = { export const tool: Tool = { name: 'create_accounts', description: - "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\nCreate a new account for a *merchant* and the *merchant* could be a seller or retailer or client who likes to receive and send payments.", + 'Create a new account for a *merchant* and the *merchant* could be a seller or retailer or client who likes to receive and send payments.', inputSchema: { type: 'object', properties: { diff --git a/packages/mcp-server/src/tools/accounts/list-payment-methods-accounts.ts b/packages/mcp-server/src/tools/accounts/list-payment-methods-accounts.ts index 2a1de5f..e3e7060 100644 --- a/packages/mcp-server/src/tools/accounts/list-payment-methods-accounts.ts +++ b/packages/mcp-server/src/tools/accounts/list-payment-methods-accounts.ts @@ -17,7 +17,7 @@ export const metadata: Metadata = { export const tool: Tool = { name: 'list_payment_methods_accounts', description: - "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\nLists the applicable payment methods for a particular Merchant ID.\nUse the client secret and publishable key authorization to list all relevant payment methods of the merchant for the payment corresponding to the client secret.", + 'Lists the applicable payment methods for a particular Merchant ID.\nUse the client secret and publishable key authorization to list all relevant payment methods of the merchant for the payment corresponding to the client secret.', inputSchema: { type: 'object', properties: { diff --git a/packages/mcp-server/src/tools/accounts/retrieve-accounts.ts b/packages/mcp-server/src/tools/accounts/retrieve-accounts.ts index d3c5330..5f847d3 100644 --- a/packages/mcp-server/src/tools/accounts/retrieve-accounts.ts +++ b/packages/mcp-server/src/tools/accounts/retrieve-accounts.ts @@ -16,8 +16,7 @@ export const metadata: Metadata = { export const tool: Tool = { name: 'retrieve_accounts', - description: - "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\nRetrieve a *merchant* account details.", + description: 'Retrieve a *merchant* account details.', inputSchema: { type: 'object', properties: { diff --git a/packages/mcp-server/src/tools/accounts/update-accounts.ts b/packages/mcp-server/src/tools/accounts/update-accounts.ts index 490e0af..e1fa43c 100644 --- a/packages/mcp-server/src/tools/accounts/update-accounts.ts +++ b/packages/mcp-server/src/tools/accounts/update-accounts.ts @@ -17,7 +17,7 @@ export const metadata: Metadata = { export const tool: Tool = { name: 'update_accounts', description: - "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\nUpdates details of an existing merchant account. Helpful in updating merchant details such as email, contact details, or other configuration details like webhook, routing algorithm etc", + 'Updates details of an existing merchant account. Helpful in updating merchant details such as email, contact details, or other configuration details like webhook, routing algorithm etc', inputSchema: { type: 'object', properties: { diff --git a/packages/mcp-server/src/tools/authentication/create-authentication.ts b/packages/mcp-server/src/tools/authentication/create-authentication.ts index 4f9faf1..f92e33a 100644 --- a/packages/mcp-server/src/tools/authentication/create-authentication.ts +++ b/packages/mcp-server/src/tools/authentication/create-authentication.ts @@ -16,8 +16,7 @@ export const metadata: Metadata = { export const tool: Tool = { name: 'create_authentication', - description: - "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\nCreate a new authentication for accessing our APIs from your servers.\n", + description: 'Create a new authentication for accessing our APIs from your servers.\n', inputSchema: { type: 'object', properties: { diff --git a/packages/mcp-server/src/tools/customers/create-customers.ts b/packages/mcp-server/src/tools/customers/create-customers.ts index c8331e9..e3bbf2d 100644 --- a/packages/mcp-server/src/tools/customers/create-customers.ts +++ b/packages/mcp-server/src/tools/customers/create-customers.ts @@ -17,7 +17,7 @@ export const metadata: Metadata = { export const tool: Tool = { name: 'create_customers', description: - "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\nCreates a customer object and stores the customer details to be reused for future payments.\nIncase the customer already exists in the system, this API will respond with the customer details.", + 'Creates a customer object and stores the customer details to be reused for future payments.\nIncase the customer already exists in the system, this API will respond with the customer details.', inputSchema: { type: 'object', properties: { diff --git a/packages/mcp-server/src/tools/customers/payment-methods/list-customers-payment-methods.ts b/packages/mcp-server/src/tools/customers/payment-methods/list-customers-payment-methods.ts index 0628aaa..b327c05 100644 --- a/packages/mcp-server/src/tools/customers/payment-methods/list-customers-payment-methods.ts +++ b/packages/mcp-server/src/tools/customers/payment-methods/list-customers-payment-methods.ts @@ -16,8 +16,7 @@ export const metadata: Metadata = { export const tool: Tool = { name: 'list_customers_payment_methods', - description: - "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\nLists all the applicable payment methods for a particular Customer ID.", + description: 'Lists all the applicable payment methods for a particular Customer ID.', inputSchema: { type: 'object', properties: { diff --git a/packages/mcp-server/src/tools/customers/payment-methods/list-saved-customers-payment-methods.ts b/packages/mcp-server/src/tools/customers/payment-methods/list-saved-customers-payment-methods.ts index 4674a02..a495170 100644 --- a/packages/mcp-server/src/tools/customers/payment-methods/list-saved-customers-payment-methods.ts +++ b/packages/mcp-server/src/tools/customers/payment-methods/list-saved-customers-payment-methods.ts @@ -17,7 +17,7 @@ export const metadata: Metadata = { export const tool: Tool = { name: 'list_saved_customers_payment_methods', description: - "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\nLists all the applicable payment methods for a particular payment tied to the `client_secret`.", + 'Lists all the applicable payment methods for a particular payment tied to the `client_secret`.', inputSchema: { type: 'object', properties: { diff --git a/packages/mcp-server/src/tools/customers/update-customers.ts b/packages/mcp-server/src/tools/customers/update-customers.ts index c616a1f..b4f196a 100644 --- a/packages/mcp-server/src/tools/customers/update-customers.ts +++ b/packages/mcp-server/src/tools/customers/update-customers.ts @@ -16,8 +16,7 @@ export const metadata: Metadata = { export const tool: Tool = { name: 'update_customers', - description: - "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\nUpdates the customer's details in a customer object.", + description: "Updates the customer's details in a customer object.", inputSchema: { type: 'object', properties: { diff --git a/packages/mcp-server/src/tools/payment-methods/create-payment-methods.ts b/packages/mcp-server/src/tools/payment-methods/create-payment-methods.ts index 6f7c253..08c99d0 100644 --- a/packages/mcp-server/src/tools/payment-methods/create-payment-methods.ts +++ b/packages/mcp-server/src/tools/payment-methods/create-payment-methods.ts @@ -17,7 +17,7 @@ export const metadata: Metadata = { export const tool: Tool = { name: 'create_payment_methods', description: - "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\nCreates and stores a payment method against a customer.\nIn case of cards, this API should be used only by PCI compliant merchants.", + 'Creates and stores a payment method against a customer.\nIn case of cards, this API should be used only by PCI compliant merchants.', inputSchema: { type: 'object', properties: { diff --git a/packages/mcp-server/src/tools/payment-methods/retrieve-payment-methods.ts b/packages/mcp-server/src/tools/payment-methods/retrieve-payment-methods.ts index a989767..c23847c 100644 --- a/packages/mcp-server/src/tools/payment-methods/retrieve-payment-methods.ts +++ b/packages/mcp-server/src/tools/payment-methods/retrieve-payment-methods.ts @@ -16,8 +16,7 @@ export const metadata: Metadata = { export const tool: Tool = { name: 'retrieve_payment_methods', - description: - "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\nRetrieves a payment method of a customer.", + description: 'Retrieves a payment method of a customer.', inputSchema: { type: 'object', properties: { diff --git a/packages/mcp-server/src/tools/payment-methods/update-payment-methods.ts b/packages/mcp-server/src/tools/payment-methods/update-payment-methods.ts index c2b3c33..8ef85ee 100644 --- a/packages/mcp-server/src/tools/payment-methods/update-payment-methods.ts +++ b/packages/mcp-server/src/tools/payment-methods/update-payment-methods.ts @@ -17,7 +17,7 @@ export const metadata: Metadata = { export const tool: Tool = { name: 'update_payment_methods', description: - "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\nUpdate an existing payment method of a customer.\nThis API is useful for use cases such as updating the card number for expired cards to prevent discontinuity in recurring payments.", + 'Update an existing payment method of a customer.\nThis API is useful for use cases such as updating the card number for expired cards to prevent discontinuity in recurring payments.', inputSchema: { type: 'object', properties: { diff --git a/packages/mcp-server/src/tools/payments/capture-payments.ts b/packages/mcp-server/src/tools/payments/capture-payments.ts index 0774e01..1445efa 100644 --- a/packages/mcp-server/src/tools/payments/capture-payments.ts +++ b/packages/mcp-server/src/tools/payments/capture-payments.ts @@ -17,7 +17,7 @@ export const metadata: Metadata = { export const tool: Tool = { name: 'capture_payments', description: - "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\nCaptures the funds for a previously authorized payment intent where `capture_method` was set to `manual` and the payment is in a `requires_capture` state.\n\nUpon successful capture, the payment status usually transitions to `succeeded`.\nThe `amount_to_capture` can be specified in the request body; it must be less than or equal to the payment's `amount_capturable`. If omitted, the full capturable amount is captured.\n\nA payment must be in a capturable state (e.g., `requires_capture`). Attempting to capture an already `succeeded` (and fully captured) payment or one in an invalid state will lead to an error.\n", + "Captures the funds for a previously authorized payment intent where `capture_method` was set to `manual` and the payment is in a `requires_capture` state.\n\nUpon successful capture, the payment status usually transitions to `succeeded`.\nThe `amount_to_capture` can be specified in the request body; it must be less than or equal to the payment's `amount_capturable`. If omitted, the full capturable amount is captured.\n\nA payment must be in a capturable state (e.g., `requires_capture`). Attempting to capture an already `succeeded` (and fully captured) payment or one in an invalid state will lead to an error.\n", inputSchema: { type: 'object', properties: { diff --git a/packages/mcp-server/src/tools/payments/complete-authorize-payments.ts b/packages/mcp-server/src/tools/payments/complete-authorize-payments.ts index ccee99d..a7ea90d 100644 --- a/packages/mcp-server/src/tools/payments/complete-authorize-payments.ts +++ b/packages/mcp-server/src/tools/payments/complete-authorize-payments.ts @@ -16,8 +16,7 @@ export const metadata: Metadata = { export const tool: Tool = { name: 'complete_authorize_payments', - description: - "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\nPayments - Complete Authorize", + description: 'Payments - Complete Authorize', inputSchema: { type: 'object', properties: { diff --git a/packages/mcp-server/src/tools/payments/confirm-payments.ts b/packages/mcp-server/src/tools/payments/confirm-payments.ts index f2a8f9c..2d14dbb 100644 --- a/packages/mcp-server/src/tools/payments/confirm-payments.ts +++ b/packages/mcp-server/src/tools/payments/confirm-payments.ts @@ -17,7 +17,7 @@ export const metadata: Metadata = { export const tool: Tool = { name: 'confirm_payments', description: - "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\nConfirms a payment intent that was previously created with `confirm: false`. This action attempts to authorize the payment with the payment processor.\n\nExpected status transitions after confirmation:\n- `succeeded`: If authorization is successful and `capture_method` is `automatic`.\n- `requires_capture`: If authorization is successful and `capture_method` is `manual`.\n- `failed`: If authorization fails.", + 'Confirms a payment intent that was previously created with `confirm: false`. This action attempts to authorize the payment with the payment processor.\n\nExpected status transitions after confirmation:\n- `succeeded`: If authorization is successful and `capture_method` is `automatic`.\n- `requires_capture`: If authorization is successful and `capture_method` is `manual`.\n- `failed`: If authorization fails.', inputSchema: { type: 'object', properties: { diff --git a/packages/mcp-server/src/tools/payments/create-payments.ts b/packages/mcp-server/src/tools/payments/create-payments.ts index feb0c96..7d038a6 100644 --- a/packages/mcp-server/src/tools/payments/create-payments.ts +++ b/packages/mcp-server/src/tools/payments/create-payments.ts @@ -17,7 +17,7 @@ export const metadata: Metadata = { export const tool: Tool = { name: 'create_payments', description: - "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\nCreates a payment resource, which represents a customer's intent to pay.\nThis endpoint is the starting point for various payment flows:\n", + "Creates a payment resource, which represents a customer's intent to pay.\nThis endpoint is the starting point for various payment flows:\n", inputSchema: { type: 'object', properties: { diff --git a/packages/mcp-server/src/tools/payments/create-session-token-payments.ts b/packages/mcp-server/src/tools/payments/create-session-token-payments.ts index c8b902e..ccf6741 100644 --- a/packages/mcp-server/src/tools/payments/create-session-token-payments.ts +++ b/packages/mcp-server/src/tools/payments/create-session-token-payments.ts @@ -17,7 +17,7 @@ export const metadata: Metadata = { export const tool: Tool = { name: 'create_session_token_payments', description: - "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\nCreates a session object or a session token for wallets like Apple Pay, Google Pay, etc. These tokens are used by Hyperswitch's SDK to initiate these wallets' SDK.", + "Creates a session object or a session token for wallets like Apple Pay, Google Pay, etc. These tokens are used by Hyperswitch's SDK to initiate these wallets' SDK.", inputSchema: { type: 'object', properties: { diff --git a/packages/mcp-server/src/tools/payments/incremental-authorization-payments.ts b/packages/mcp-server/src/tools/payments/incremental-authorization-payments.ts index bf7547c..3212186 100644 --- a/packages/mcp-server/src/tools/payments/incremental-authorization-payments.ts +++ b/packages/mcp-server/src/tools/payments/incremental-authorization-payments.ts @@ -16,8 +16,7 @@ export const metadata: Metadata = { export const tool: Tool = { name: 'incremental_authorization_payments', - description: - "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\nAuthorized amount for a payment can be incremented if it is in status: requires_capture", + description: 'Authorized amount for a payment can be incremented if it is in status: requires_capture', inputSchema: { type: 'object', properties: { diff --git a/packages/mcp-server/src/tools/payments/list-payments.ts b/packages/mcp-server/src/tools/payments/list-payments.ts index f676213..5d763db 100644 --- a/packages/mcp-server/src/tools/payments/list-payments.ts +++ b/packages/mcp-server/src/tools/payments/list-payments.ts @@ -16,8 +16,7 @@ export const metadata: Metadata = { export const tool: Tool = { name: 'list_payments', - description: - "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\nTo list the *payments*", + description: 'To list the *payments*', inputSchema: { type: 'object', properties: { diff --git a/packages/mcp-server/src/tools/payments/post-session-tokens-payments.ts b/packages/mcp-server/src/tools/payments/post-session-tokens-payments.ts index a9d8307..3b9e3a1 100644 --- a/packages/mcp-server/src/tools/payments/post-session-tokens-payments.ts +++ b/packages/mcp-server/src/tools/payments/post-session-tokens-payments.ts @@ -16,8 +16,7 @@ export const metadata: Metadata = { export const tool: Tool = { name: 'post_session_tokens_payments', - description: - "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\nPayments - Post Session Tokens", + description: 'Payments - Post Session Tokens', inputSchema: { type: 'object', properties: { diff --git a/packages/mcp-server/src/tools/payments/retrieve-payments.ts b/packages/mcp-server/src/tools/payments/retrieve-payments.ts index 638d1b4..4b615b3 100644 --- a/packages/mcp-server/src/tools/payments/retrieve-payments.ts +++ b/packages/mcp-server/src/tools/payments/retrieve-payments.ts @@ -17,7 +17,7 @@ export const metadata: Metadata = { export const tool: Tool = { name: 'retrieve_payments', description: - "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\nRetrieves a Payment. This API can also be used to get the status of a previously initiated payment or next action for an ongoing payment", + 'Retrieves a Payment. This API can also be used to get the status of a previously initiated payment or next action for an ongoing payment', inputSchema: { type: 'object', properties: { diff --git a/packages/mcp-server/src/tools/payments/update-payments.ts b/packages/mcp-server/src/tools/payments/update-payments.ts index 17898ce..e9418ad 100644 --- a/packages/mcp-server/src/tools/payments/update-payments.ts +++ b/packages/mcp-server/src/tools/payments/update-payments.ts @@ -17,7 +17,7 @@ export const metadata: Metadata = { export const tool: Tool = { name: 'update_payments', description: - "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\nTo update the properties of a *PaymentIntent* object. This may include attaching a payment method, or attaching customer object or metadata fields after the Payment is created", + 'To update the properties of a *PaymentIntent* object. This may include attaching a payment method, or attaching customer object or metadata fields after the Payment is created', inputSchema: { type: 'object', properties: { diff --git a/packages/mcp-server/src/tools/payouts/cancel-payouts.ts b/packages/mcp-server/src/tools/payouts/cancel-payouts.ts index d95f60e..b760f88 100644 --- a/packages/mcp-server/src/tools/payouts/cancel-payouts.ts +++ b/packages/mcp-server/src/tools/payouts/cancel-payouts.ts @@ -16,8 +16,7 @@ export const metadata: Metadata = { export const tool: Tool = { name: 'cancel_payouts', - description: - "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\nPayouts - Cancel", + description: 'Payouts - Cancel', inputSchema: { type: 'object', properties: { diff --git a/packages/mcp-server/src/tools/payouts/confirm-payouts.ts b/packages/mcp-server/src/tools/payouts/confirm-payouts.ts index 54eb747..37927d5 100644 --- a/packages/mcp-server/src/tools/payouts/confirm-payouts.ts +++ b/packages/mcp-server/src/tools/payouts/confirm-payouts.ts @@ -16,8 +16,7 @@ export const metadata: Metadata = { export const tool: Tool = { name: 'confirm_payouts', - description: - "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\nPayouts - Confirm", + description: 'Payouts - Confirm', inputSchema: { type: 'object', properties: { diff --git a/packages/mcp-server/src/tools/payouts/create-payouts.ts b/packages/mcp-server/src/tools/payouts/create-payouts.ts index a2a89cf..3472276 100644 --- a/packages/mcp-server/src/tools/payouts/create-payouts.ts +++ b/packages/mcp-server/src/tools/payouts/create-payouts.ts @@ -16,8 +16,7 @@ export const metadata: Metadata = { export const tool: Tool = { name: 'create_payouts', - description: - "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\nPayouts - Create", + description: 'Payouts - Create', inputSchema: { type: 'object', properties: { diff --git a/packages/mcp-server/src/tools/payouts/fulfill-payouts.ts b/packages/mcp-server/src/tools/payouts/fulfill-payouts.ts index 8beb779..287246d 100644 --- a/packages/mcp-server/src/tools/payouts/fulfill-payouts.ts +++ b/packages/mcp-server/src/tools/payouts/fulfill-payouts.ts @@ -16,8 +16,7 @@ export const metadata: Metadata = { export const tool: Tool = { name: 'fulfill_payouts', - description: - "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\nPayouts - Fulfill", + description: 'Payouts - Fulfill', inputSchema: { type: 'object', properties: { diff --git a/packages/mcp-server/src/tools/payouts/list/retrieve-payouts-list.ts b/packages/mcp-server/src/tools/payouts/list/retrieve-payouts-list.ts index 10f5021..89db116 100644 --- a/packages/mcp-server/src/tools/payouts/list/retrieve-payouts-list.ts +++ b/packages/mcp-server/src/tools/payouts/list/retrieve-payouts-list.ts @@ -16,8 +16,7 @@ export const metadata: Metadata = { export const tool: Tool = { name: 'retrieve_payouts_list', - description: - "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\nPayouts - List", + description: 'Payouts - List', inputSchema: { type: 'object', properties: { diff --git a/packages/mcp-server/src/tools/payouts/list/with-filters-payouts-list.ts b/packages/mcp-server/src/tools/payouts/list/with-filters-payouts-list.ts index 039b864..eec2a33 100644 --- a/packages/mcp-server/src/tools/payouts/list/with-filters-payouts-list.ts +++ b/packages/mcp-server/src/tools/payouts/list/with-filters-payouts-list.ts @@ -16,8 +16,7 @@ export const metadata: Metadata = { export const tool: Tool = { name: 'with_filters_payouts_list', - description: - "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\nPayouts - List using filters", + description: 'Payouts - List using filters', inputSchema: { type: 'object', properties: { diff --git a/packages/mcp-server/src/tools/payouts/retrieve-payouts.ts b/packages/mcp-server/src/tools/payouts/retrieve-payouts.ts index 9874878..94b6eda 100644 --- a/packages/mcp-server/src/tools/payouts/retrieve-payouts.ts +++ b/packages/mcp-server/src/tools/payouts/retrieve-payouts.ts @@ -16,8 +16,7 @@ export const metadata: Metadata = { export const tool: Tool = { name: 'retrieve_payouts', - description: - "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\nPayouts - Retrieve", + description: 'Payouts - Retrieve', inputSchema: { type: 'object', properties: { diff --git a/packages/mcp-server/src/tools/payouts/update-payouts.ts b/packages/mcp-server/src/tools/payouts/update-payouts.ts index b6ec075..d2c65e1 100644 --- a/packages/mcp-server/src/tools/payouts/update-payouts.ts +++ b/packages/mcp-server/src/tools/payouts/update-payouts.ts @@ -16,8 +16,7 @@ export const metadata: Metadata = { export const tool: Tool = { name: 'update_payouts', - description: - "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\nPayouts - Update", + description: 'Payouts - Update', inputSchema: { type: 'object', properties: { diff --git a/packages/mcp-server/src/tools/refunds/create-refunds.ts b/packages/mcp-server/src/tools/refunds/create-refunds.ts index 4c175bf..89b60f2 100644 --- a/packages/mcp-server/src/tools/refunds/create-refunds.ts +++ b/packages/mcp-server/src/tools/refunds/create-refunds.ts @@ -17,7 +17,7 @@ export const metadata: Metadata = { export const tool: Tool = { name: 'create_refunds', description: - "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\nCreates a refund against an already processed payment. In case of some processors, you can even opt to refund only a partial amount multiple times until the original charge amount has been refunded", + 'Creates a refund against an already processed payment. In case of some processors, you can even opt to refund only a partial amount multiple times until the original charge amount has been refunded', inputSchema: { type: 'object', properties: { diff --git a/packages/mcp-server/src/tools/refunds/list-refunds.ts b/packages/mcp-server/src/tools/refunds/list-refunds.ts index cfb0592..4ba1a4a 100644 --- a/packages/mcp-server/src/tools/refunds/list-refunds.ts +++ b/packages/mcp-server/src/tools/refunds/list-refunds.ts @@ -17,7 +17,7 @@ export const metadata: Metadata = { export const tool: Tool = { name: 'list_refunds', description: - "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\nLists all the refunds associated with the merchant, or for a specific payment if payment_id is provided", + 'Lists all the refunds associated with the merchant, or for a specific payment if payment_id is provided', inputSchema: { type: 'object', properties: { diff --git a/packages/mcp-server/src/tools/routing/create-routing.ts b/packages/mcp-server/src/tools/routing/create-routing.ts index 141ec16..997b2e4 100644 --- a/packages/mcp-server/src/tools/routing/create-routing.ts +++ b/packages/mcp-server/src/tools/routing/create-routing.ts @@ -16,8 +16,7 @@ export const metadata: Metadata = { export const tool: Tool = { name: 'create_routing', - description: - "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\nCreate a routing config", + description: 'Create a routing config', inputSchema: { type: 'object', properties: { diff --git a/packages/mcp-server/src/tools/routing/deactivate-routing.ts b/packages/mcp-server/src/tools/routing/deactivate-routing.ts index 180af02..bc4d2a9 100644 --- a/packages/mcp-server/src/tools/routing/deactivate-routing.ts +++ b/packages/mcp-server/src/tools/routing/deactivate-routing.ts @@ -16,8 +16,7 @@ export const metadata: Metadata = { export const tool: Tool = { name: 'deactivate_routing', - description: - "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\nDeactivates a routing config", + description: 'Deactivates a routing config', inputSchema: { type: 'object', properties: { diff --git a/packages/mcp-server/src/tools/routing/retrieve-active-routing.ts b/packages/mcp-server/src/tools/routing/retrieve-active-routing.ts index 4d389ce..1dd426d 100644 --- a/packages/mcp-server/src/tools/routing/retrieve-active-routing.ts +++ b/packages/mcp-server/src/tools/routing/retrieve-active-routing.ts @@ -16,8 +16,7 @@ export const metadata: Metadata = { export const tool: Tool = { name: 'retrieve_active_routing', - description: - "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\nRetrieve active config", + description: 'Retrieve active config', inputSchema: { type: 'object', properties: { diff --git a/packages/mcp-server/src/tools/routing/retrieve-routing.ts b/packages/mcp-server/src/tools/routing/retrieve-routing.ts index 2002f4d..3a58aa7 100644 --- a/packages/mcp-server/src/tools/routing/retrieve-routing.ts +++ b/packages/mcp-server/src/tools/routing/retrieve-routing.ts @@ -16,8 +16,7 @@ export const metadata: Metadata = { export const tool: Tool = { name: 'retrieve_routing', - description: - "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\nRetrieve a routing algorithm", + description: 'Retrieve a routing algorithm', inputSchema: { type: 'object', properties: { diff --git a/packages/mcp-server/src/tools/three-ds-decision/execute-three-ds-decision.ts b/packages/mcp-server/src/tools/three-ds-decision/execute-three-ds-decision.ts index 90d9a1c..7784492 100644 --- a/packages/mcp-server/src/tools/three-ds-decision/execute-three-ds-decision.ts +++ b/packages/mcp-server/src/tools/three-ds-decision/execute-three-ds-decision.ts @@ -16,8 +16,7 @@ export const metadata: Metadata = { export const tool: Tool = { name: 'execute_three_ds_decision', - description: - "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\n3DS Decision - Execute", + description: '3DS Decision - Execute', inputSchema: { type: 'object', properties: { From 7524d520dcbaaaed1d6cf8bcb2c15ab0276e8783 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 1 Aug 2025 04:25:05 +0000 Subject: [PATCH 13/44] fix(mcp): reverse validJson capability option and limit scope --- packages/mcp-server/src/compat.ts | 7 +- packages/mcp-server/src/server.ts | 2 +- packages/mcp-server/tests/options.test.ts | 133 ++++++++++++++++++++++ 3 files changed, 139 insertions(+), 3 deletions(-) diff --git a/packages/mcp-server/src/compat.ts b/packages/mcp-server/src/compat.ts index ff0d6d4..7afd77f 100644 --- a/packages/mcp-server/src/compat.ts +++ b/packages/mcp-server/src/compat.ts @@ -70,8 +70,11 @@ export function parseEmbeddedJSON(args: Record, schema: Record< if (typeof value === 'string') { try { const parsed = JSON.parse(value); - newArgs[key] = parsed; - updated = true; + // Only parse if result is a plain object (not array, null, or primitive) + if (parsed && typeof parsed === 'object' && !Array.isArray(parsed)) { + newArgs[key] = parsed; + updated = true; + } } catch (e) { // Not valid JSON, leave as is } diff --git a/packages/mcp-server/src/server.ts b/packages/mcp-server/src/server.ts index 0818c5c..43a3af8 100644 --- a/packages/mcp-server/src/server.ts +++ b/packages/mcp-server/src/server.ts @@ -117,7 +117,7 @@ export async function executeHandler( compatibilityOptions?: Partial, ) { const options = { ...defaultClientCapabilities, ...compatibilityOptions }; - if (options.validJson && args) { + if (!options.validJson && args) { args = parseEmbeddedJSON(args, tool.inputSchema); } return await handler(client, args || {}); diff --git a/packages/mcp-server/tests/options.test.ts b/packages/mcp-server/tests/options.test.ts index f7661d6..264aca5 100644 --- a/packages/mcp-server/tests/options.test.ts +++ b/packages/mcp-server/tests/options.test.ts @@ -1,5 +1,6 @@ import { parseOptions } from '../src/options'; import { Filter } from '../src/tools'; +import { parseEmbeddedJSON } from '../src/compat'; // Mock process.argv const mockArgv = (args: string[]) => { @@ -184,3 +185,135 @@ describe('parseOptions', () => { cleanup(); }); }); + +describe('parseEmbeddedJSON', () => { + it('should not change non-string values', () => { + const args = { + numberProp: 42, + booleanProp: true, + objectProp: { nested: 'value' }, + arrayProp: [1, 2, 3], + nullProp: null, + undefinedProp: undefined, + }; + const schema = {}; + + const result = parseEmbeddedJSON(args, schema); + + expect(result).toBe(args); // Should return original object since no changes made + expect(result['numberProp']).toBe(42); + expect(result['booleanProp']).toBe(true); + expect(result['objectProp']).toEqual({ nested: 'value' }); + expect(result['arrayProp']).toEqual([1, 2, 3]); + expect(result['nullProp']).toBe(null); + expect(result['undefinedProp']).toBe(undefined); + }); + + it('should parse valid JSON objects in string properties', () => { + const args = { + jsonObjectString: '{"key": "value", "number": 123}', + regularString: 'not json', + }; + const schema = {}; + + const result = parseEmbeddedJSON(args, schema); + + expect(result).not.toBe(args); // Should return new object since changes were made + expect(result['jsonObjectString']).toEqual({ key: 'value', number: 123 }); + expect(result['regularString']).toBe('not json'); + }); + + it('should leave invalid JSON in string properties unchanged', () => { + const args = { + invalidJson1: '{"key": value}', // Missing quotes around value + invalidJson2: '{key: "value"}', // Missing quotes around key + invalidJson3: '{"key": "value",}', // Trailing comma + invalidJson4: 'just a regular string', + emptyString: '', + }; + const schema = {}; + + const result = parseEmbeddedJSON(args, schema); + + expect(result).toBe(args); // Should return original object since no changes made + expect(result['invalidJson1']).toBe('{"key": value}'); + expect(result['invalidJson2']).toBe('{key: "value"}'); + expect(result['invalidJson3']).toBe('{"key": "value",}'); + expect(result['invalidJson4']).toBe('just a regular string'); + expect(result['emptyString']).toBe(''); + }); + + it('should not parse JSON primitives in string properties', () => { + const args = { + numberString: '123', + floatString: '45.67', + negativeNumberString: '-89', + booleanTrueString: 'true', + booleanFalseString: 'false', + nullString: 'null', + jsonArrayString: '[1, 2, 3, "test"]', + regularString: 'not json', + }; + const schema = {}; + + const result = parseEmbeddedJSON(args, schema); + + expect(result).toBe(args); // Should return original object since no changes made + expect(result['numberString']).toBe('123'); + expect(result['floatString']).toBe('45.67'); + expect(result['negativeNumberString']).toBe('-89'); + expect(result['booleanTrueString']).toBe('true'); + expect(result['booleanFalseString']).toBe('false'); + expect(result['nullString']).toBe('null'); + expect(result['jsonArrayString']).toBe('[1, 2, 3, "test"]'); + expect(result['regularString']).toBe('not json'); + }); + + it('should handle mixed valid objects and other JSON types', () => { + const args = { + validObject: '{"success": true}', + invalidObject: '{"missing": quote}', + validNumber: '42', + validArray: '[1, 2, 3]', + keepAsString: 'hello world', + nonString: 123, + }; + const schema = {}; + + const result = parseEmbeddedJSON(args, schema); + + expect(result).not.toBe(args); // Should return new object since some changes were made + expect(result['validObject']).toEqual({ success: true }); + expect(result['invalidObject']).toBe('{"missing": quote}'); + expect(result['validNumber']).toBe('42'); // Not parsed, remains string + expect(result['validArray']).toBe('[1, 2, 3]'); // Not parsed, remains string + expect(result['keepAsString']).toBe('hello world'); + expect(result['nonString']).toBe(123); + }); + + it('should return original object when no strings are present', () => { + const args = { + number: 42, + boolean: true, + object: { key: 'value' }, + }; + const schema = {}; + + const result = parseEmbeddedJSON(args, schema); + + expect(result).toBe(args); // Should return original object since no changes made + }); + + it('should return original object when all strings are invalid JSON', () => { + const args = { + string1: 'hello', + string2: 'world', + string3: 'not json at all', + }; + const schema = {}; + + const result = parseEmbeddedJSON(args, schema); + + expect(result).toBe(args); // Should return original object since no changes made + }); +}); From 5d9293ae60f78233ec2f879ac873299eb69fcec3 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 1 Aug 2025 04:26:02 +0000 Subject: [PATCH 14/44] fix(mcp): avoid sending `jq_filter` to base API --- .../business-profile/delete-accounts-business-profile.ts | 4 ++-- ...dynamic-routing-business-profile-accounts-contracts.ts | 4 ++-- ...dynamic-routing-business-profile-accounts-contracts.ts | 4 ++-- ...namic-routing-business-profile-accounts-elimination.ts | 4 ++-- ...mic-routing-business-profile-accounts-success-based.ts | 4 ++-- ...mic-routing-business-profile-accounts-success-based.ts | 4 ++-- .../accounts/connectors/delete-accounts-connectors.ts | 4 ++-- packages/mcp-server/src/tools/accounts/delete-accounts.ts | 4 ++-- packages/mcp-server/src/tools/accounts/kv-accounts.ts | 4 ++-- packages/mcp-server/src/tools/api-keys/create-api-keys.ts | 4 ++-- packages/mcp-server/src/tools/api-keys/list-api-keys.ts | 4 ++-- .../mcp-server/src/tools/api-keys/retrieve-api-keys.ts | 4 ++-- packages/mcp-server/src/tools/api-keys/revoke-api-keys.ts | 4 ++-- packages/mcp-server/src/tools/api-keys/update-api-keys.ts | 4 ++-- .../mcp-server/src/tools/blocklist/create-blocklist.ts | 4 ++-- .../mcp-server/src/tools/blocklist/delete-blocklist.ts | 4 ++-- .../mcp-server/src/tools/blocklist/retrieve-blocklist.ts | 4 ++-- .../mcp-server/src/tools/blocklist/toggle-blocklist.ts | 4 ++-- .../mcp-server/src/tools/customers/delete-customers.ts | 4 ++-- packages/mcp-server/src/tools/customers/list-customers.ts | 4 ++-- .../src/tools/customers/list-mandates-customers.ts | 4 ++-- .../mcp-server/src/tools/customers/retrieve-customers.ts | 4 ++-- packages/mcp-server/src/tools/disputes/list-disputes.ts | 4 ++-- .../mcp-server/src/tools/disputes/retrieve-disputes.ts | 4 ++-- .../src/tools/events/delivery-attempts-events.ts | 6 ++++-- packages/mcp-server/src/tools/events/list-events.ts | 4 ++-- .../src/tools/events/profile/list-events-profile.ts | 4 ++-- packages/mcp-server/src/tools/events/retry-events.ts | 4 ++-- packages/mcp-server/src/tools/gsm/create-gsm.ts | 4 ++-- packages/mcp-server/src/tools/gsm/delete-gsm.ts | 4 ++-- packages/mcp-server/src/tools/gsm/retrieve-gsm.ts | 4 ++-- packages/mcp-server/src/tools/gsm/update-gsm.ts | 4 ++-- .../mcp-server/src/tools/mandates/retrieve-mandates.ts | 4 ++-- packages/mcp-server/src/tools/mandates/revoke-mandates.ts | 4 ++-- .../src/tools/organization/create-organization.ts | 4 ++-- .../src/tools/organization/retrieve-organization.ts | 4 ++-- .../src/tools/organization/update-organization.ts | 4 ++-- .../src/tools/payment-link/retrieve-payment-link.ts | 4 ++-- .../src/tools/payment-methods/delete-payment-methods.ts | 4 ++-- .../tools/payment-methods/set-default-payment-methods.ts | 4 ++-- packages/mcp-server/src/tools/payments/cancel-payments.ts | 8 +------- .../number-3ds/authenticate-payments-number-3ds.ts | 4 ++-- .../src/tools/payments/update-metadata-payments.ts | 6 ++++-- .../mcp-server/src/tools/payouts/list-filters-payouts.ts | 4 ++-- .../mcp-server/src/tools/poll/retrieve-status-poll.ts | 4 ++-- .../tools/profile-acquirers/create-profile-acquirers.ts | 4 ++-- .../tools/profile-acquirers/update-profile-acquirers.ts | 4 ++-- packages/mcp-server/src/tools/refunds/retrieve-refunds.ts | 4 ++-- packages/mcp-server/src/tools/refunds/update-refunds.ts | 4 ++-- packages/mcp-server/src/tools/relay/create-relay.ts | 4 ++-- packages/mcp-server/src/tools/relay/retrieve-relay.ts | 4 ++-- packages/mcp-server/src/tools/routing/activate-routing.ts | 6 ++++-- .../default/profile/retrieve-default-routing-profile.ts | 3 ++- .../default/profile/update-default-routing-profile.ts | 4 ++-- .../src/tools/routing/default/retrieve-routing-default.ts | 3 ++- .../src/tools/routing/default/update-routing-default.ts | 4 ++-- packages/mcp-server/src/tools/routing/list-routing.ts | 4 ++-- 57 files changed, 119 insertions(+), 117 deletions(-) diff --git a/packages/mcp-server/src/tools/accounts/business-profile/delete-accounts-business-profile.ts b/packages/mcp-server/src/tools/accounts/business-profile/delete-accounts-business-profile.ts index cd268e8..9bf3099 100644 --- a/packages/mcp-server/src/tools/accounts/business-profile/delete-accounts-business-profile.ts +++ b/packages/mcp-server/src/tools/accounts/business-profile/delete-accounts-business-profile.ts @@ -43,9 +43,9 @@ export const tool: Tool = { }; export const handler = async (client: Hyperswitch, args: Record | undefined) => { - const { profile_id, ...body } = args as any; + const { profile_id, jq_filter, ...body } = args as any; return asTextContentResult( - await maybeFilter(args, await client.accounts.businessProfile.delete(profile_id, body)), + await maybeFilter(jq_filter, await client.accounts.businessProfile.delete(profile_id, body)), ); }; diff --git a/packages/mcp-server/src/tools/accounts/business-profile/dynamic-routing/contracts/toggle-dynamic-routing-business-profile-accounts-contracts.ts b/packages/mcp-server/src/tools/accounts/business-profile/dynamic-routing/contracts/toggle-dynamic-routing-business-profile-accounts-contracts.ts index f10877b..521cef5 100644 --- a/packages/mcp-server/src/tools/accounts/business-profile/dynamic-routing/contracts/toggle-dynamic-routing-business-profile-accounts-contracts.ts +++ b/packages/mcp-server/src/tools/accounts/business-profile/dynamic-routing/contracts/toggle-dynamic-routing-business-profile-accounts-contracts.ts @@ -86,10 +86,10 @@ export const tool: Tool = { }; export const handler = async (client: Hyperswitch, args: Record | undefined) => { - const { profile_id, ...body } = args as any; + const { profile_id, jq_filter, ...body } = args as any; return asTextContentResult( await maybeFilter( - args, + jq_filter, await client.accounts.businessProfile.dynamicRouting.contracts.toggle(profile_id, body), ), ); diff --git a/packages/mcp-server/src/tools/accounts/business-profile/dynamic-routing/contracts/update-config-dynamic-routing-business-profile-accounts-contracts.ts b/packages/mcp-server/src/tools/accounts/business-profile/dynamic-routing/contracts/update-config-dynamic-routing-business-profile-accounts-contracts.ts index a245327..2e3c77d 100644 --- a/packages/mcp-server/src/tools/accounts/business-profile/dynamic-routing/contracts/update-config-dynamic-routing-business-profile-accounts-contracts.ts +++ b/packages/mcp-server/src/tools/accounts/business-profile/dynamic-routing/contracts/update-config-dynamic-routing-business-profile-accounts-contracts.ts @@ -81,10 +81,10 @@ export const tool: Tool = { }; export const handler = async (client: Hyperswitch, args: Record | undefined) => { - const { algorithm_id, ...body } = args as any; + const { algorithm_id, jq_filter, ...body } = args as any; return asTextContentResult( await maybeFilter( - args, + jq_filter, await client.accounts.businessProfile.dynamicRouting.contracts.updateConfig(algorithm_id, body), ), ); diff --git a/packages/mcp-server/src/tools/accounts/business-profile/dynamic-routing/elimination/toggle-dynamic-routing-business-profile-accounts-elimination.ts b/packages/mcp-server/src/tools/accounts/business-profile/dynamic-routing/elimination/toggle-dynamic-routing-business-profile-accounts-elimination.ts index 6cd4954..e2402c7 100644 --- a/packages/mcp-server/src/tools/accounts/business-profile/dynamic-routing/elimination/toggle-dynamic-routing-business-profile-accounts-elimination.ts +++ b/packages/mcp-server/src/tools/accounts/business-profile/dynamic-routing/elimination/toggle-dynamic-routing-business-profile-accounts-elimination.ts @@ -50,10 +50,10 @@ export const tool: Tool = { }; export const handler = async (client: Hyperswitch, args: Record | undefined) => { - const { profile_id, ...body } = args as any; + const { profile_id, jq_filter, ...body } = args as any; return asTextContentResult( await maybeFilter( - args, + jq_filter, await client.accounts.businessProfile.dynamicRouting.elimination.toggle(profile_id, body), ), ); diff --git a/packages/mcp-server/src/tools/accounts/business-profile/dynamic-routing/success-based/toggle-dynamic-routing-business-profile-accounts-success-based.ts b/packages/mcp-server/src/tools/accounts/business-profile/dynamic-routing/success-based/toggle-dynamic-routing-business-profile-accounts-success-based.ts index e7df1b9..ae0a798 100644 --- a/packages/mcp-server/src/tools/accounts/business-profile/dynamic-routing/success-based/toggle-dynamic-routing-business-profile-accounts-success-based.ts +++ b/packages/mcp-server/src/tools/accounts/business-profile/dynamic-routing/success-based/toggle-dynamic-routing-business-profile-accounts-success-based.ts @@ -50,10 +50,10 @@ export const tool: Tool = { }; export const handler = async (client: Hyperswitch, args: Record | undefined) => { - const { profile_id, ...body } = args as any; + const { profile_id, jq_filter, ...body } = args as any; return asTextContentResult( await maybeFilter( - args, + jq_filter, await client.accounts.businessProfile.dynamicRouting.successBased.toggle(profile_id, body), ), ); diff --git a/packages/mcp-server/src/tools/accounts/business-profile/dynamic-routing/success-based/update-config-dynamic-routing-business-profile-accounts-success-based.ts b/packages/mcp-server/src/tools/accounts/business-profile/dynamic-routing/success-based/update-config-dynamic-routing-business-profile-accounts-success-based.ts index 3f01721..24dbc09 100644 --- a/packages/mcp-server/src/tools/accounts/business-profile/dynamic-routing/success-based/update-config-dynamic-routing-business-profile-accounts-success-based.ts +++ b/packages/mcp-server/src/tools/accounts/business-profile/dynamic-routing/success-based/update-config-dynamic-routing-business-profile-accounts-success-based.ts @@ -173,10 +173,10 @@ export const tool: Tool = { }; export const handler = async (client: Hyperswitch, args: Record | undefined) => { - const { algorithm_id, ...body } = args as any; + const { algorithm_id, jq_filter, ...body } = args as any; return asTextContentResult( await maybeFilter( - args, + jq_filter, await client.accounts.businessProfile.dynamicRouting.successBased.updateConfig(algorithm_id, body), ), ); diff --git a/packages/mcp-server/src/tools/accounts/connectors/delete-accounts-connectors.ts b/packages/mcp-server/src/tools/accounts/connectors/delete-accounts-connectors.ts index c46b4bf..44e8ffc 100644 --- a/packages/mcp-server/src/tools/accounts/connectors/delete-accounts-connectors.ts +++ b/packages/mcp-server/src/tools/accounts/connectors/delete-accounts-connectors.ts @@ -43,9 +43,9 @@ export const tool: Tool = { }; export const handler = async (client: Hyperswitch, args: Record | undefined) => { - const { merchant_connector_id, ...body } = args as any; + const { merchant_connector_id, jq_filter, ...body } = args as any; return asTextContentResult( - await maybeFilter(args, await client.accounts.connectors.delete(merchant_connector_id, body)), + await maybeFilter(jq_filter, await client.accounts.connectors.delete(merchant_connector_id, body)), ); }; diff --git a/packages/mcp-server/src/tools/accounts/delete-accounts.ts b/packages/mcp-server/src/tools/accounts/delete-accounts.ts index 0480214..8397ff0 100644 --- a/packages/mcp-server/src/tools/accounts/delete-accounts.ts +++ b/packages/mcp-server/src/tools/accounts/delete-accounts.ts @@ -40,8 +40,8 @@ export const tool: Tool = { }; export const handler = async (client: Hyperswitch, args: Record | undefined) => { - const { account_id, ...body } = args as any; - return asTextContentResult(await maybeFilter(args, await client.accounts.delete(account_id))); + const { account_id, jq_filter, ...body } = args as any; + return asTextContentResult(await maybeFilter(jq_filter, await client.accounts.delete(account_id))); }; export default { metadata, tool, handler }; diff --git a/packages/mcp-server/src/tools/accounts/kv-accounts.ts b/packages/mcp-server/src/tools/accounts/kv-accounts.ts index e0e18aa..672189e 100644 --- a/packages/mcp-server/src/tools/accounts/kv-accounts.ts +++ b/packages/mcp-server/src/tools/accounts/kv-accounts.ts @@ -42,8 +42,8 @@ export const tool: Tool = { }; export const handler = async (client: Hyperswitch, args: Record | undefined) => { - const { account_id, ...body } = args as any; - return asTextContentResult(await maybeFilter(args, await client.accounts.kv(account_id, body))); + const { account_id, jq_filter, ...body } = args as any; + return asTextContentResult(await maybeFilter(jq_filter, await client.accounts.kv(account_id, body))); }; export default { metadata, tool, handler }; diff --git a/packages/mcp-server/src/tools/api-keys/create-api-keys.ts b/packages/mcp-server/src/tools/api-keys/create-api-keys.ts index 55078fe..fc6a767 100644 --- a/packages/mcp-server/src/tools/api-keys/create-api-keys.ts +++ b/packages/mcp-server/src/tools/api-keys/create-api-keys.ts @@ -63,8 +63,8 @@ export const tool: Tool = { }; export const handler = async (client: Hyperswitch, args: Record | undefined) => { - const { merchant_id, ...body } = args as any; - return asTextContentResult(await maybeFilter(args, await client.apiKeys.create(merchant_id, body))); + const { merchant_id, jq_filter, ...body } = args as any; + return asTextContentResult(await maybeFilter(jq_filter, await client.apiKeys.create(merchant_id, body))); }; export default { metadata, tool, handler }; diff --git a/packages/mcp-server/src/tools/api-keys/list-api-keys.ts b/packages/mcp-server/src/tools/api-keys/list-api-keys.ts index cd39e05..a5714c3 100644 --- a/packages/mcp-server/src/tools/api-keys/list-api-keys.ts +++ b/packages/mcp-server/src/tools/api-keys/list-api-keys.ts @@ -48,8 +48,8 @@ export const tool: Tool = { }; export const handler = async (client: Hyperswitch, args: Record | undefined) => { - const { merchant_id, ...body } = args as any; - return asTextContentResult(await maybeFilter(args, await client.apiKeys.list(merchant_id, body))); + const { merchant_id, jq_filter, ...body } = args as any; + return asTextContentResult(await maybeFilter(jq_filter, await client.apiKeys.list(merchant_id, body))); }; export default { metadata, tool, handler }; diff --git a/packages/mcp-server/src/tools/api-keys/retrieve-api-keys.ts b/packages/mcp-server/src/tools/api-keys/retrieve-api-keys.ts index 31c1f28..6a3d858 100644 --- a/packages/mcp-server/src/tools/api-keys/retrieve-api-keys.ts +++ b/packages/mcp-server/src/tools/api-keys/retrieve-api-keys.ts @@ -43,8 +43,8 @@ export const tool: Tool = { }; export const handler = async (client: Hyperswitch, args: Record | undefined) => { - const { key_id, ...body } = args as any; - return asTextContentResult(await maybeFilter(args, await client.apiKeys.retrieve(key_id, body))); + const { key_id, jq_filter, ...body } = args as any; + return asTextContentResult(await maybeFilter(jq_filter, await client.apiKeys.retrieve(key_id, body))); }; export default { metadata, tool, handler }; diff --git a/packages/mcp-server/src/tools/api-keys/revoke-api-keys.ts b/packages/mcp-server/src/tools/api-keys/revoke-api-keys.ts index b5ca58a..db60f9f 100644 --- a/packages/mcp-server/src/tools/api-keys/revoke-api-keys.ts +++ b/packages/mcp-server/src/tools/api-keys/revoke-api-keys.ts @@ -43,8 +43,8 @@ export const tool: Tool = { }; export const handler = async (client: Hyperswitch, args: Record | undefined) => { - const { key_id, ...body } = args as any; - return asTextContentResult(await maybeFilter(args, await client.apiKeys.revoke(key_id, body))); + const { key_id, jq_filter, ...body } = args as any; + return asTextContentResult(await maybeFilter(jq_filter, await client.apiKeys.revoke(key_id, body))); }; export default { metadata, tool, handler }; diff --git a/packages/mcp-server/src/tools/api-keys/update-api-keys.ts b/packages/mcp-server/src/tools/api-keys/update-api-keys.ts index 2dde50e..7b02869 100644 --- a/packages/mcp-server/src/tools/api-keys/update-api-keys.ts +++ b/packages/mcp-server/src/tools/api-keys/update-api-keys.ts @@ -66,8 +66,8 @@ export const tool: Tool = { }; export const handler = async (client: Hyperswitch, args: Record | undefined) => { - const { key_id, ...body } = args as any; - return asTextContentResult(await maybeFilter(args, await client.apiKeys.update(key_id, body))); + const { key_id, jq_filter, ...body } = args as any; + return asTextContentResult(await maybeFilter(jq_filter, await client.apiKeys.update(key_id, body))); }; export default { metadata, tool, handler }; diff --git a/packages/mcp-server/src/tools/blocklist/create-blocklist.ts b/packages/mcp-server/src/tools/blocklist/create-blocklist.ts index de066d7..3650ba1 100644 --- a/packages/mcp-server/src/tools/blocklist/create-blocklist.ts +++ b/packages/mcp-server/src/tools/blocklist/create-blocklist.ts @@ -75,8 +75,8 @@ export const tool: Tool = { }; export const handler = async (client: Hyperswitch, args: Record | undefined) => { - const body = args as any; - return asTextContentResult(await maybeFilter(args, await client.blocklist.create(body))); + const { jq_filter, ...body } = args as any; + return asTextContentResult(await maybeFilter(jq_filter, await client.blocklist.create(body))); }; export default { metadata, tool, handler }; diff --git a/packages/mcp-server/src/tools/blocklist/delete-blocklist.ts b/packages/mcp-server/src/tools/blocklist/delete-blocklist.ts index d295931..cb5ead6 100644 --- a/packages/mcp-server/src/tools/blocklist/delete-blocklist.ts +++ b/packages/mcp-server/src/tools/blocklist/delete-blocklist.ts @@ -77,8 +77,8 @@ export const tool: Tool = { }; export const handler = async (client: Hyperswitch, args: Record | undefined) => { - const body = args as any; - return asTextContentResult(await maybeFilter(args, await client.blocklist.delete(body))); + const { jq_filter, ...body } = args as any; + return asTextContentResult(await maybeFilter(jq_filter, await client.blocklist.delete(body))); }; export default { metadata, tool, handler }; diff --git a/packages/mcp-server/src/tools/blocklist/retrieve-blocklist.ts b/packages/mcp-server/src/tools/blocklist/retrieve-blocklist.ts index a246b3f..a5272bc 100644 --- a/packages/mcp-server/src/tools/blocklist/retrieve-blocklist.ts +++ b/packages/mcp-server/src/tools/blocklist/retrieve-blocklist.ts @@ -46,8 +46,8 @@ export const tool: Tool = { }; export const handler = async (client: Hyperswitch, args: Record | undefined) => { - const body = args as any; - return asTextContentResult(await maybeFilter(args, await client.blocklist.retrieve(body))); + const { jq_filter, ...body } = args as any; + return asTextContentResult(await maybeFilter(jq_filter, await client.blocklist.retrieve(body))); }; export default { metadata, tool, handler }; diff --git a/packages/mcp-server/src/tools/blocklist/toggle-blocklist.ts b/packages/mcp-server/src/tools/blocklist/toggle-blocklist.ts index fd453d4..349ff4d 100644 --- a/packages/mcp-server/src/tools/blocklist/toggle-blocklist.ts +++ b/packages/mcp-server/src/tools/blocklist/toggle-blocklist.ts @@ -39,8 +39,8 @@ export const tool: Tool = { }; export const handler = async (client: Hyperswitch, args: Record | undefined) => { - const body = args as any; - return asTextContentResult(await maybeFilter(args, await client.blocklist.toggle(body))); + const { jq_filter, ...body } = args as any; + return asTextContentResult(await maybeFilter(jq_filter, await client.blocklist.toggle(body))); }; export default { metadata, tool, handler }; diff --git a/packages/mcp-server/src/tools/customers/delete-customers.ts b/packages/mcp-server/src/tools/customers/delete-customers.ts index 2b0e93a..1ae8156 100644 --- a/packages/mcp-server/src/tools/customers/delete-customers.ts +++ b/packages/mcp-server/src/tools/customers/delete-customers.ts @@ -40,8 +40,8 @@ export const tool: Tool = { }; export const handler = async (client: Hyperswitch, args: Record | undefined) => { - const { customer_id, ...body } = args as any; - return asTextContentResult(await maybeFilter(args, await client.customers.delete(customer_id))); + const { customer_id, jq_filter, ...body } = args as any; + return asTextContentResult(await maybeFilter(jq_filter, await client.customers.delete(customer_id))); }; export default { metadata, tool, handler }; diff --git a/packages/mcp-server/src/tools/customers/list-customers.ts b/packages/mcp-server/src/tools/customers/list-customers.ts index 2102224..8cc490b 100644 --- a/packages/mcp-server/src/tools/customers/list-customers.ts +++ b/packages/mcp-server/src/tools/customers/list-customers.ts @@ -45,8 +45,8 @@ export const tool: Tool = { }; export const handler = async (client: Hyperswitch, args: Record | undefined) => { - const body = args as any; - return asTextContentResult(await maybeFilter(args, await client.customers.list(body))); + const { jq_filter, ...body } = args as any; + return asTextContentResult(await maybeFilter(jq_filter, await client.customers.list(body))); }; export default { metadata, tool, handler }; diff --git a/packages/mcp-server/src/tools/customers/list-mandates-customers.ts b/packages/mcp-server/src/tools/customers/list-mandates-customers.ts index 7af262c..06046d4 100644 --- a/packages/mcp-server/src/tools/customers/list-mandates-customers.ts +++ b/packages/mcp-server/src/tools/customers/list-mandates-customers.ts @@ -40,8 +40,8 @@ export const tool: Tool = { }; export const handler = async (client: Hyperswitch, args: Record | undefined) => { - const { customer_id, ...body } = args as any; - return asTextContentResult(await maybeFilter(args, await client.customers.listMandates(customer_id))); + const { customer_id, jq_filter, ...body } = args as any; + return asTextContentResult(await maybeFilter(jq_filter, await client.customers.listMandates(customer_id))); }; export default { metadata, tool, handler }; diff --git a/packages/mcp-server/src/tools/customers/retrieve-customers.ts b/packages/mcp-server/src/tools/customers/retrieve-customers.ts index 067d81e..36b5cef 100644 --- a/packages/mcp-server/src/tools/customers/retrieve-customers.ts +++ b/packages/mcp-server/src/tools/customers/retrieve-customers.ts @@ -40,8 +40,8 @@ export const tool: Tool = { }; export const handler = async (client: Hyperswitch, args: Record | undefined) => { - const { customer_id, ...body } = args as any; - return asTextContentResult(await maybeFilter(args, await client.customers.retrieve(customer_id))); + const { customer_id, jq_filter, ...body } = args as any; + return asTextContentResult(await maybeFilter(jq_filter, await client.customers.retrieve(customer_id))); }; export default { metadata, tool, handler }; diff --git a/packages/mcp-server/src/tools/disputes/list-disputes.ts b/packages/mcp-server/src/tools/disputes/list-disputes.ts index 43357c6..18d9932 100644 --- a/packages/mcp-server/src/tools/disputes/list-disputes.ts +++ b/packages/mcp-server/src/tools/disputes/list-disputes.ts @@ -100,8 +100,8 @@ export const tool: Tool = { }; export const handler = async (client: Hyperswitch, args: Record | undefined) => { - const body = args as any; - return asTextContentResult(await maybeFilter(args, await client.disputes.list(body))); + const { jq_filter, ...body } = args as any; + return asTextContentResult(await maybeFilter(jq_filter, await client.disputes.list(body))); }; export default { metadata, tool, handler }; diff --git a/packages/mcp-server/src/tools/disputes/retrieve-disputes.ts b/packages/mcp-server/src/tools/disputes/retrieve-disputes.ts index 5ed45e6..5662c9f 100644 --- a/packages/mcp-server/src/tools/disputes/retrieve-disputes.ts +++ b/packages/mcp-server/src/tools/disputes/retrieve-disputes.ts @@ -40,8 +40,8 @@ export const tool: Tool = { }; export const handler = async (client: Hyperswitch, args: Record | undefined) => { - const { dispute_id, ...body } = args as any; - return asTextContentResult(await maybeFilter(args, await client.disputes.retrieve(dispute_id))); + const { dispute_id, jq_filter, ...body } = args as any; + return asTextContentResult(await maybeFilter(jq_filter, await client.disputes.retrieve(dispute_id))); }; export default { metadata, tool, handler }; diff --git a/packages/mcp-server/src/tools/events/delivery-attempts-events.ts b/packages/mcp-server/src/tools/events/delivery-attempts-events.ts index 1d0c825..0574881 100644 --- a/packages/mcp-server/src/tools/events/delivery-attempts-events.ts +++ b/packages/mcp-server/src/tools/events/delivery-attempts-events.ts @@ -43,8 +43,10 @@ export const tool: Tool = { }; export const handler = async (client: Hyperswitch, args: Record | undefined) => { - const { event_id, ...body } = args as any; - return asTextContentResult(await maybeFilter(args, await client.events.deliveryAttempts(event_id, body))); + const { event_id, jq_filter, ...body } = args as any; + return asTextContentResult( + await maybeFilter(jq_filter, await client.events.deliveryAttempts(event_id, body)), + ); }; export default { metadata, tool, handler }; diff --git a/packages/mcp-server/src/tools/events/list-events.ts b/packages/mcp-server/src/tools/events/list-events.ts index 18b9a06..3ec5569 100644 --- a/packages/mcp-server/src/tools/events/list-events.ts +++ b/packages/mcp-server/src/tools/events/list-events.ts @@ -119,8 +119,8 @@ export const tool: Tool = { }; export const handler = async (client: Hyperswitch, args: Record | undefined) => { - const { merchant_id, ...body } = args as any; - return asTextContentResult(await maybeFilter(args, await client.events.list(merchant_id, body))); + const { merchant_id, jq_filter, ...body } = args as any; + return asTextContentResult(await maybeFilter(jq_filter, await client.events.list(merchant_id, body))); }; export default { metadata, tool, handler }; diff --git a/packages/mcp-server/src/tools/events/profile/list-events-profile.ts b/packages/mcp-server/src/tools/events/profile/list-events-profile.ts index 17b2a08..ef2390f 100644 --- a/packages/mcp-server/src/tools/events/profile/list-events-profile.ts +++ b/packages/mcp-server/src/tools/events/profile/list-events-profile.ts @@ -116,8 +116,8 @@ export const tool: Tool = { }; export const handler = async (client: Hyperswitch, args: Record | undefined) => { - const body = args as any; - return asTextContentResult(await maybeFilter(args, await client.events.profile.list(body))); + const { jq_filter, ...body } = args as any; + return asTextContentResult(await maybeFilter(jq_filter, await client.events.profile.list(body))); }; export default { metadata, tool, handler }; diff --git a/packages/mcp-server/src/tools/events/retry-events.ts b/packages/mcp-server/src/tools/events/retry-events.ts index 65b8487..f8dd9d1 100644 --- a/packages/mcp-server/src/tools/events/retry-events.ts +++ b/packages/mcp-server/src/tools/events/retry-events.ts @@ -41,8 +41,8 @@ export const tool: Tool = { }; export const handler = async (client: Hyperswitch, args: Record | undefined) => { - const { event_id, ...body } = args as any; - return asTextContentResult(await maybeFilter(args, await client.events.retry(event_id, body))); + const { event_id, jq_filter, ...body } = args as any; + return asTextContentResult(await maybeFilter(jq_filter, await client.events.retry(event_id, body))); }; export default { metadata, tool, handler }; diff --git a/packages/mcp-server/src/tools/gsm/create-gsm.ts b/packages/mcp-server/src/tools/gsm/create-gsm.ts index 09643f1..866d4ef 100644 --- a/packages/mcp-server/src/tools/gsm/create-gsm.ts +++ b/packages/mcp-server/src/tools/gsm/create-gsm.ts @@ -222,8 +222,8 @@ export const tool: Tool = { }; export const handler = async (client: Hyperswitch, args: Record | undefined) => { - const body = args as any; - return asTextContentResult(await maybeFilter(args, await client.gsm.create(body))); + const { jq_filter, ...body } = args as any; + return asTextContentResult(await maybeFilter(jq_filter, await client.gsm.create(body))); }; export default { metadata, tool, handler }; diff --git a/packages/mcp-server/src/tools/gsm/delete-gsm.ts b/packages/mcp-server/src/tools/gsm/delete-gsm.ts index dce5eb0..0fe14aa 100644 --- a/packages/mcp-server/src/tools/gsm/delete-gsm.ts +++ b/packages/mcp-server/src/tools/gsm/delete-gsm.ts @@ -55,8 +55,8 @@ export const tool: Tool = { }; export const handler = async (client: Hyperswitch, args: Record | undefined) => { - const body = args as any; - return asTextContentResult(await maybeFilter(args, await client.gsm.delete(body))); + const { jq_filter, ...body } = args as any; + return asTextContentResult(await maybeFilter(jq_filter, await client.gsm.delete(body))); }; export default { metadata, tool, handler }; diff --git a/packages/mcp-server/src/tools/gsm/retrieve-gsm.ts b/packages/mcp-server/src/tools/gsm/retrieve-gsm.ts index 045010f..0cb9c05 100644 --- a/packages/mcp-server/src/tools/gsm/retrieve-gsm.ts +++ b/packages/mcp-server/src/tools/gsm/retrieve-gsm.ts @@ -168,8 +168,8 @@ export const tool: Tool = { }; export const handler = async (client: Hyperswitch, args: Record | undefined) => { - const body = args as any; - return asTextContentResult(await maybeFilter(args, await client.gsm.retrieve(body))); + const { jq_filter, ...body } = args as any; + return asTextContentResult(await maybeFilter(jq_filter, await client.gsm.retrieve(body))); }; export default { metadata, tool, handler }; diff --git a/packages/mcp-server/src/tools/gsm/update-gsm.ts b/packages/mcp-server/src/tools/gsm/update-gsm.ts index a5bee4a..eccec09 100644 --- a/packages/mcp-server/src/tools/gsm/update-gsm.ts +++ b/packages/mcp-server/src/tools/gsm/update-gsm.ts @@ -101,8 +101,8 @@ export const tool: Tool = { }; export const handler = async (client: Hyperswitch, args: Record | undefined) => { - const body = args as any; - return asTextContentResult(await maybeFilter(args, await client.gsm.update(body))); + const { jq_filter, ...body } = args as any; + return asTextContentResult(await maybeFilter(jq_filter, await client.gsm.update(body))); }; export default { metadata, tool, handler }; diff --git a/packages/mcp-server/src/tools/mandates/retrieve-mandates.ts b/packages/mcp-server/src/tools/mandates/retrieve-mandates.ts index 6ebc248..dae6cac 100644 --- a/packages/mcp-server/src/tools/mandates/retrieve-mandates.ts +++ b/packages/mcp-server/src/tools/mandates/retrieve-mandates.ts @@ -40,8 +40,8 @@ export const tool: Tool = { }; export const handler = async (client: Hyperswitch, args: Record | undefined) => { - const { mandate_id, ...body } = args as any; - return asTextContentResult(await maybeFilter(args, await client.mandates.retrieve(mandate_id))); + const { mandate_id, jq_filter, ...body } = args as any; + return asTextContentResult(await maybeFilter(jq_filter, await client.mandates.retrieve(mandate_id))); }; export default { metadata, tool, handler }; diff --git a/packages/mcp-server/src/tools/mandates/revoke-mandates.ts b/packages/mcp-server/src/tools/mandates/revoke-mandates.ts index a640f35..6540882 100644 --- a/packages/mcp-server/src/tools/mandates/revoke-mandates.ts +++ b/packages/mcp-server/src/tools/mandates/revoke-mandates.ts @@ -38,8 +38,8 @@ export const tool: Tool = { }; export const handler = async (client: Hyperswitch, args: Record | undefined) => { - const { mandate_id, ...body } = args as any; - return asTextContentResult(await maybeFilter(args, await client.mandates.revoke(mandate_id))); + const { mandate_id, jq_filter, ...body } = args as any; + return asTextContentResult(await maybeFilter(jq_filter, await client.mandates.revoke(mandate_id))); }; export default { metadata, tool, handler }; diff --git a/packages/mcp-server/src/tools/organization/create-organization.ts b/packages/mcp-server/src/tools/organization/create-organization.ts index f114c77..36cfe06 100644 --- a/packages/mcp-server/src/tools/organization/create-organization.ts +++ b/packages/mcp-server/src/tools/organization/create-organization.ts @@ -47,8 +47,8 @@ export const tool: Tool = { }; export const handler = async (client: Hyperswitch, args: Record | undefined) => { - const body = args as any; - return asTextContentResult(await maybeFilter(args, await client.organization.create(body))); + const { jq_filter, ...body } = args as any; + return asTextContentResult(await maybeFilter(jq_filter, await client.organization.create(body))); }; export default { metadata, tool, handler }; diff --git a/packages/mcp-server/src/tools/organization/retrieve-organization.ts b/packages/mcp-server/src/tools/organization/retrieve-organization.ts index 2cfb75a..e5edf38 100644 --- a/packages/mcp-server/src/tools/organization/retrieve-organization.ts +++ b/packages/mcp-server/src/tools/organization/retrieve-organization.ts @@ -40,8 +40,8 @@ export const tool: Tool = { }; export const handler = async (client: Hyperswitch, args: Record | undefined) => { - const { id, ...body } = args as any; - return asTextContentResult(await maybeFilter(args, await client.organization.retrieve(id))); + const { id, jq_filter, ...body } = args as any; + return asTextContentResult(await maybeFilter(jq_filter, await client.organization.retrieve(id))); }; export default { metadata, tool, handler }; diff --git a/packages/mcp-server/src/tools/organization/update-organization.ts b/packages/mcp-server/src/tools/organization/update-organization.ts index a4092c4..0b2a3d2 100644 --- a/packages/mcp-server/src/tools/organization/update-organization.ts +++ b/packages/mcp-server/src/tools/organization/update-organization.ts @@ -56,8 +56,8 @@ export const tool: Tool = { }; export const handler = async (client: Hyperswitch, args: Record | undefined) => { - const { id, ...body } = args as any; - return asTextContentResult(await maybeFilter(args, await client.organization.update(id, body))); + const { id, jq_filter, ...body } = args as any; + return asTextContentResult(await maybeFilter(jq_filter, await client.organization.update(id, body))); }; export default { metadata, tool, handler }; diff --git a/packages/mcp-server/src/tools/payment-link/retrieve-payment-link.ts b/packages/mcp-server/src/tools/payment-link/retrieve-payment-link.ts index 9d41995..61125bc 100644 --- a/packages/mcp-server/src/tools/payment-link/retrieve-payment-link.ts +++ b/packages/mcp-server/src/tools/payment-link/retrieve-payment-link.ts @@ -45,9 +45,9 @@ export const tool: Tool = { }; export const handler = async (client: Hyperswitch, args: Record | undefined) => { - const { payment_link_id, ...body } = args as any; + const { payment_link_id, jq_filter, ...body } = args as any; return asTextContentResult( - await maybeFilter(args, await client.paymentLink.retrieve(payment_link_id, body)), + await maybeFilter(jq_filter, await client.paymentLink.retrieve(payment_link_id, body)), ); }; diff --git a/packages/mcp-server/src/tools/payment-methods/delete-payment-methods.ts b/packages/mcp-server/src/tools/payment-methods/delete-payment-methods.ts index b119a29..ad49b1d 100644 --- a/packages/mcp-server/src/tools/payment-methods/delete-payment-methods.ts +++ b/packages/mcp-server/src/tools/payment-methods/delete-payment-methods.ts @@ -40,8 +40,8 @@ export const tool: Tool = { }; export const handler = async (client: Hyperswitch, args: Record | undefined) => { - const { method_id, ...body } = args as any; - return asTextContentResult(await maybeFilter(args, await client.paymentMethods.delete(method_id))); + const { method_id, jq_filter, ...body } = args as any; + return asTextContentResult(await maybeFilter(jq_filter, await client.paymentMethods.delete(method_id))); }; export default { metadata, tool, handler }; diff --git a/packages/mcp-server/src/tools/payment-methods/set-default-payment-methods.ts b/packages/mcp-server/src/tools/payment-methods/set-default-payment-methods.ts index 6f3fbcd..c7479cc 100644 --- a/packages/mcp-server/src/tools/payment-methods/set-default-payment-methods.ts +++ b/packages/mcp-server/src/tools/payment-methods/set-default-payment-methods.ts @@ -41,9 +41,9 @@ export const tool: Tool = { }; export const handler = async (client: Hyperswitch, args: Record | undefined) => { - const { payment_method_id, ...body } = args as any; + const { payment_method_id, jq_filter, ...body } = args as any; return asTextContentResult( - await maybeFilter(args, await client.paymentMethods.setDefault(payment_method_id, body)), + await maybeFilter(jq_filter, await client.paymentMethods.setDefault(payment_method_id, body)), ); }; diff --git a/packages/mcp-server/src/tools/payments/cancel-payments.ts b/packages/mcp-server/src/tools/payments/cancel-payments.ts index 3bbc9dc..02cda8a 100644 --- a/packages/mcp-server/src/tools/payments/cancel-payments.ts +++ b/packages/mcp-server/src/tools/payments/cancel-payments.ts @@ -17,7 +17,7 @@ export const metadata: Metadata = { export const tool: Tool = { name: 'cancel_payments', description: - "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\nA Payment could can be cancelled when it is in one of these statuses: `requires_payment_method`, `requires_capture`, `requires_confirmation`, `requires_customer_action`.\n\n# Response Schema\n```json\n{\n type: 'object',\n properties: {}\n}\n```", + 'A Payment could can be cancelled when it is in one of these statuses: `requires_payment_method`, `requires_capture`, `requires_confirmation`, `requires_customer_action`.', inputSchema: { type: 'object', properties: { @@ -31,12 +31,6 @@ export const tool: Tool = { merchant_connector_details: { $ref: '#/$defs/merchant_connector_details_wrap', }, - jq_filter: { - type: 'string', - title: 'jq Filter', - description: - 'A jq filter to apply to the response to include certain fields. Consult the output schema in the tool description to see the fields that are available.\n\nFor example: to include only the `name` field in every object of a results array, you can provide ".results[].name".\n\nFor more information, see the [jq documentation](https://jqlang.org/manual/).', - }, }, required: ['payment_id'], $defs: { diff --git a/packages/mcp-server/src/tools/payments/number-3ds/authenticate-payments-number-3ds.ts b/packages/mcp-server/src/tools/payments/number-3ds/authenticate-payments-number-3ds.ts index fca2f6e..c01de5b 100644 --- a/packages/mcp-server/src/tools/payments/number-3ds/authenticate-payments-number-3ds.ts +++ b/packages/mcp-server/src/tools/payments/number-3ds/authenticate-payments-number-3ds.ts @@ -101,9 +101,9 @@ export const tool: Tool = { }; export const handler = async (client: Hyperswitch, args: Record | undefined) => { - const { payment_id, ...body } = args as any; + const { payment_id, jq_filter, ...body } = args as any; return asTextContentResult( - await maybeFilter(args, await client.payments.number3DS.authenticate(payment_id, body)), + await maybeFilter(jq_filter, await client.payments.number3DS.authenticate(payment_id, body)), ); }; diff --git a/packages/mcp-server/src/tools/payments/update-metadata-payments.ts b/packages/mcp-server/src/tools/payments/update-metadata-payments.ts index 9421263..7fb6233 100644 --- a/packages/mcp-server/src/tools/payments/update-metadata-payments.ts +++ b/packages/mcp-server/src/tools/payments/update-metadata-payments.ts @@ -42,8 +42,10 @@ export const tool: Tool = { }; export const handler = async (client: Hyperswitch, args: Record | undefined) => { - const { payment_id, ...body } = args as any; - return asTextContentResult(await maybeFilter(args, await client.payments.updateMetadata(payment_id, body))); + const { payment_id, jq_filter, ...body } = args as any; + return asTextContentResult( + await maybeFilter(jq_filter, await client.payments.updateMetadata(payment_id, body)), + ); }; export default { metadata, tool, handler }; diff --git a/packages/mcp-server/src/tools/payouts/list-filters-payouts.ts b/packages/mcp-server/src/tools/payouts/list-filters-payouts.ts index 70b9725..c95ae24 100644 --- a/packages/mcp-server/src/tools/payouts/list-filters-payouts.ts +++ b/packages/mcp-server/src/tools/payouts/list-filters-payouts.ts @@ -47,8 +47,8 @@ export const tool: Tool = { }; export const handler = async (client: Hyperswitch, args: Record | undefined) => { - const body = args as any; - return asTextContentResult(await maybeFilter(args, await client.payouts.listFilters(body))); + const { jq_filter, ...body } = args as any; + return asTextContentResult(await maybeFilter(jq_filter, await client.payouts.listFilters(body))); }; export default { metadata, tool, handler }; diff --git a/packages/mcp-server/src/tools/poll/retrieve-status-poll.ts b/packages/mcp-server/src/tools/poll/retrieve-status-poll.ts index c689dfa..ec2eb5e 100644 --- a/packages/mcp-server/src/tools/poll/retrieve-status-poll.ts +++ b/packages/mcp-server/src/tools/poll/retrieve-status-poll.ts @@ -40,8 +40,8 @@ export const tool: Tool = { }; export const handler = async (client: Hyperswitch, args: Record | undefined) => { - const { poll_id, ...body } = args as any; - return asTextContentResult(await maybeFilter(args, await client.poll.retrieveStatus(poll_id))); + const { poll_id, jq_filter, ...body } = args as any; + return asTextContentResult(await maybeFilter(jq_filter, await client.poll.retrieveStatus(poll_id))); }; export default { metadata, tool, handler }; diff --git a/packages/mcp-server/src/tools/profile-acquirers/create-profile-acquirers.ts b/packages/mcp-server/src/tools/profile-acquirers/create-profile-acquirers.ts index 207cac8..e2e2862 100644 --- a/packages/mcp-server/src/tools/profile-acquirers/create-profile-acquirers.ts +++ b/packages/mcp-server/src/tools/profile-acquirers/create-profile-acquirers.ts @@ -75,8 +75,8 @@ export const tool: Tool = { }; export const handler = async (client: Hyperswitch, args: Record | undefined) => { - const body = args as any; - return asTextContentResult(await maybeFilter(args, await client.profileAcquirers.create(body))); + const { jq_filter, ...body } = args as any; + return asTextContentResult(await maybeFilter(jq_filter, await client.profileAcquirers.create(body))); }; export default { metadata, tool, handler }; diff --git a/packages/mcp-server/src/tools/profile-acquirers/update-profile-acquirers.ts b/packages/mcp-server/src/tools/profile-acquirers/update-profile-acquirers.ts index 24fd16a..85e6ca4 100644 --- a/packages/mcp-server/src/tools/profile-acquirers/update-profile-acquirers.ts +++ b/packages/mcp-server/src/tools/profile-acquirers/update-profile-acquirers.ts @@ -62,9 +62,9 @@ export const tool: Tool = { }; export const handler = async (client: Hyperswitch, args: Record | undefined) => { - const { profile_acquirer_id, ...body } = args as any; + const { profile_acquirer_id, jq_filter, ...body } = args as any; return asTextContentResult( - await maybeFilter(args, await client.profileAcquirers.update(profile_acquirer_id, body)), + await maybeFilter(jq_filter, await client.profileAcquirers.update(profile_acquirer_id, body)), ); }; diff --git a/packages/mcp-server/src/tools/refunds/retrieve-refunds.ts b/packages/mcp-server/src/tools/refunds/retrieve-refunds.ts index 8102f7a..b7f720c 100644 --- a/packages/mcp-server/src/tools/refunds/retrieve-refunds.ts +++ b/packages/mcp-server/src/tools/refunds/retrieve-refunds.ts @@ -40,8 +40,8 @@ export const tool: Tool = { }; export const handler = async (client: Hyperswitch, args: Record | undefined) => { - const { refund_id, ...body } = args as any; - return asTextContentResult(await maybeFilter(args, await client.refunds.retrieve(refund_id))); + const { refund_id, jq_filter, ...body } = args as any; + return asTextContentResult(await maybeFilter(jq_filter, await client.refunds.retrieve(refund_id))); }; export default { metadata, tool, handler }; diff --git a/packages/mcp-server/src/tools/refunds/update-refunds.ts b/packages/mcp-server/src/tools/refunds/update-refunds.ts index 3ed67a9..67f74f2 100644 --- a/packages/mcp-server/src/tools/refunds/update-refunds.ts +++ b/packages/mcp-server/src/tools/refunds/update-refunds.ts @@ -48,8 +48,8 @@ export const tool: Tool = { }; export const handler = async (client: Hyperswitch, args: Record | undefined) => { - const { refund_id, ...body } = args as any; - return asTextContentResult(await maybeFilter(args, await client.refunds.update(refund_id, body))); + const { refund_id, jq_filter, ...body } = args as any; + return asTextContentResult(await maybeFilter(jq_filter, await client.refunds.update(refund_id, body))); }; export default { metadata, tool, handler }; diff --git a/packages/mcp-server/src/tools/relay/create-relay.ts b/packages/mcp-server/src/tools/relay/create-relay.ts index 60d834b..03f8a8d 100644 --- a/packages/mcp-server/src/tools/relay/create-relay.ts +++ b/packages/mcp-server/src/tools/relay/create-relay.ts @@ -253,8 +253,8 @@ export const tool: Tool = { }; export const handler = async (client: Hyperswitch, args: Record | undefined) => { - const body = args as any; - return asTextContentResult(await maybeFilter(args, await client.relay.create(body))); + const { jq_filter, ...body } = args as any; + return asTextContentResult(await maybeFilter(jq_filter, await client.relay.create(body))); }; export default { metadata, tool, handler }; diff --git a/packages/mcp-server/src/tools/relay/retrieve-relay.ts b/packages/mcp-server/src/tools/relay/retrieve-relay.ts index b27c7bb..a105733 100644 --- a/packages/mcp-server/src/tools/relay/retrieve-relay.ts +++ b/packages/mcp-server/src/tools/relay/retrieve-relay.ts @@ -43,8 +43,8 @@ export const tool: Tool = { }; export const handler = async (client: Hyperswitch, args: Record | undefined) => { - const { relay_id, ...body } = args as any; - return asTextContentResult(await maybeFilter(args, await client.relay.retrieve(relay_id, body))); + const { relay_id, jq_filter, ...body } = args as any; + return asTextContentResult(await maybeFilter(jq_filter, await client.relay.retrieve(relay_id, body))); }; export default { metadata, tool, handler }; diff --git a/packages/mcp-server/src/tools/routing/activate-routing.ts b/packages/mcp-server/src/tools/routing/activate-routing.ts index a929f90..70470e3 100644 --- a/packages/mcp-server/src/tools/routing/activate-routing.ts +++ b/packages/mcp-server/src/tools/routing/activate-routing.ts @@ -38,8 +38,10 @@ export const tool: Tool = { }; export const handler = async (client: Hyperswitch, args: Record | undefined) => { - const { routing_algorithm_id, ...body } = args as any; - return asTextContentResult(await maybeFilter(args, await client.routing.activate(routing_algorithm_id))); + const { routing_algorithm_id, jq_filter, ...body } = args as any; + return asTextContentResult( + await maybeFilter(jq_filter, await client.routing.activate(routing_algorithm_id)), + ); }; export default { metadata, tool, handler }; diff --git a/packages/mcp-server/src/tools/routing/default/profile/retrieve-default-routing-profile.ts b/packages/mcp-server/src/tools/routing/default/profile/retrieve-default-routing-profile.ts index d13f332..c90cf5e 100644 --- a/packages/mcp-server/src/tools/routing/default/profile/retrieve-default-routing-profile.ts +++ b/packages/mcp-server/src/tools/routing/default/profile/retrieve-default-routing-profile.ts @@ -37,7 +37,8 @@ export const tool: Tool = { }; export const handler = async (client: Hyperswitch, args: Record | undefined) => { - return asTextContentResult(await maybeFilter(args, await client.routing.default.profile.retrieve())); + const { jq_filter } = args as any; + return asTextContentResult(await maybeFilter(jq_filter, await client.routing.default.profile.retrieve())); }; export default { metadata, tool, handler }; diff --git a/packages/mcp-server/src/tools/routing/default/profile/update-default-routing-profile.ts b/packages/mcp-server/src/tools/routing/default/profile/update-default-routing-profile.ts index d18fc29..b61dea7 100644 --- a/packages/mcp-server/src/tools/routing/default/profile/update-default-routing-profile.ts +++ b/packages/mcp-server/src/tools/routing/default/profile/update-default-routing-profile.ts @@ -161,9 +161,9 @@ export const tool: Tool = { }; export const handler = async (client: Hyperswitch, args: Record | undefined) => { - const { profile_id, ...body } = args as any; + const { profile_id, jq_filter, ...body } = args as any; return asTextContentResult( - await maybeFilter(args, await client.routing.default.profile.update(profile_id, body)), + await maybeFilter(jq_filter, await client.routing.default.profile.update(profile_id, body)), ); }; diff --git a/packages/mcp-server/src/tools/routing/default/retrieve-routing-default.ts b/packages/mcp-server/src/tools/routing/default/retrieve-routing-default.ts index a06d824..66a4e5a 100644 --- a/packages/mcp-server/src/tools/routing/default/retrieve-routing-default.ts +++ b/packages/mcp-server/src/tools/routing/default/retrieve-routing-default.ts @@ -37,7 +37,8 @@ export const tool: Tool = { }; export const handler = async (client: Hyperswitch, args: Record | undefined) => { - return asTextContentResult(await maybeFilter(args, await client.routing.default.retrieve())); + const { jq_filter } = args as any; + return asTextContentResult(await maybeFilter(jq_filter, await client.routing.default.retrieve())); }; export default { metadata, tool, handler }; diff --git a/packages/mcp-server/src/tools/routing/default/update-routing-default.ts b/packages/mcp-server/src/tools/routing/default/update-routing-default.ts index 0843ab9..a9ec24e 100644 --- a/packages/mcp-server/src/tools/routing/default/update-routing-default.ts +++ b/packages/mcp-server/src/tools/routing/default/update-routing-default.ts @@ -158,8 +158,8 @@ export const tool: Tool = { }; export const handler = async (client: Hyperswitch, args: Record | undefined) => { - const body = args as any; - return asTextContentResult(await maybeFilter(args, await client.routing.default.update(body))); + const { jq_filter, ...body } = args as any; + return asTextContentResult(await maybeFilter(jq_filter, await client.routing.default.update(body))); }; export default { metadata, tool, handler }; diff --git a/packages/mcp-server/src/tools/routing/list-routing.ts b/packages/mcp-server/src/tools/routing/list-routing.ts index 594d82b..3c1af9c 100644 --- a/packages/mcp-server/src/tools/routing/list-routing.ts +++ b/packages/mcp-server/src/tools/routing/list-routing.ts @@ -49,8 +49,8 @@ export const tool: Tool = { }; export const handler = async (client: Hyperswitch, args: Record | undefined) => { - const body = args as any; - return asTextContentResult(await maybeFilter(args, await client.routing.list(body))); + const { jq_filter, ...body } = args as any; + return asTextContentResult(await maybeFilter(jq_filter, await client.routing.list(body))); }; export default { metadata, tool, handler }; From 3f111e072ea107f1a95355e4be21eb12be1286fd Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Sat, 2 Aug 2025 05:14:12 +0000 Subject: [PATCH 15/44] feat(mcp): add logging when environment variable is set --- packages/mcp-server/src/server.ts | 21 +++++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) diff --git a/packages/mcp-server/src/server.ts b/packages/mcp-server/src/server.ts index 43a3af8..b274135 100644 --- a/packages/mcp-server/src/server.ts +++ b/packages/mcp-server/src/server.ts @@ -28,7 +28,7 @@ export const server = new McpServer( name: 'hyperswitch_api', version: '0.0.1-alpha.1', }, - { capabilities: { tools: {} } }, + { capabilities: { tools: {}, logging: {} } }, ); /** @@ -61,7 +61,24 @@ export function init(params: { const endpointMap = Object.fromEntries(providedEndpoints.map((endpoint) => [endpoint.tool.name, endpoint])); - const client = params.client || new Hyperswitch({ defaultHeaders: { 'X-Stainless-MCP': 'true' } }); + const logAtLevel = + (level: 'debug' | 'info' | 'warning' | 'error') => + (message: string, ...rest: unknown[]) => { + console.error(message, ...rest); + void server.sendLoggingMessage({ + level, + data: { message, rest }, + }); + }; + const logger = { + debug: logAtLevel('debug'), + info: logAtLevel('info'), + warn: logAtLevel('warning'), + error: logAtLevel('error'), + }; + + const client = + params.client || new Hyperswitch({ defaultHeaders: { 'X-Stainless-MCP': 'true' }, logger: logger }); server.setRequestHandler(ListToolsRequestSchema, async () => { return { From 3e8772b34da07e178818095c96c1439ba4f859b2 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 5 Aug 2025 06:51:54 +0000 Subject: [PATCH 16/44] feat(mcp): remote server with passthru auth --- packages/mcp-server/package.json | 2 + packages/mcp-server/src/headers.ts | 29 ++++++++++ packages/mcp-server/src/http.ts | 85 ++++++++++++++++++++++++++++++ packages/mcp-server/src/index.ts | 26 +++++---- packages/mcp-server/src/options.ts | 16 ++++++ packages/mcp-server/src/server.ts | 19 ++++--- packages/mcp-server/src/stdio.ts | 14 +++++ 7 files changed, 172 insertions(+), 19 deletions(-) create mode 100644 packages/mcp-server/src/headers.ts create mode 100644 packages/mcp-server/src/http.ts create mode 100644 packages/mcp-server/src/stdio.ts diff --git a/packages/mcp-server/package.json b/packages/mcp-server/package.json index 1720816..5986a03 100644 --- a/packages/mcp-server/package.json +++ b/packages/mcp-server/package.json @@ -29,6 +29,7 @@ "dependencies": { "hyperswitch": "file:../../dist/", "@modelcontextprotocol/sdk": "^1.11.5", + "express": "^5.1.0", "jq-web": "https://github.com/stainless-api/jq-web/releases/download/v0.8.2/jq-web.tar.gz", "yargs": "^17.7.2", "@cloudflare/cabidela": "^0.2.4", @@ -40,6 +41,7 @@ }, "devDependencies": { "@types/jest": "^29.4.0", + "@types/express": "^5.0.3", "@typescript-eslint/eslint-plugin": "8.31.1", "@typescript-eslint/parser": "8.31.1", "eslint": "^8.49.0", diff --git a/packages/mcp-server/src/headers.ts b/packages/mcp-server/src/headers.ts new file mode 100644 index 0000000..d8daeea --- /dev/null +++ b/packages/mcp-server/src/headers.ts @@ -0,0 +1,29 @@ +// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +import { type ClientOptions } from 'hyperswitch/client'; + +import { IncomingMessage } from 'node:http'; + +export const parseAuthHeaders = (req: IncomingMessage): Partial => { + if (req.headers.authorization) { + const scheme = req.headers.authorization.slice(req.headers.authorization.search(' ')); + const value = req.headers.authorization.slice(scheme.length + 1); + switch (scheme) { + case 'Bearer': + return { jwtKey: req.headers.authorization.slice('Bearer '.length) }; + default: + throw new Error(`Unsupported authorization scheme`); + } + } + + const apiKey = req.headers['api-key'] instanceof Array ? req.headers['api-key'][0] : req.headers['api-key']; + const ephemeralKey = + req.headers['api-key'] instanceof Array ? req.headers['api-key'][0] : req.headers['api-key']; + const jwtKey = + req.headers['x-hyperswitch-jwt-key'] instanceof Array ? + req.headers['x-hyperswitch-jwt-key'][0] + : req.headers['x-hyperswitch-jwt-key']; + const publishableKey = + req.headers['api-key'] instanceof Array ? req.headers['api-key'][0] : req.headers['api-key']; + return { apiKey, ephemeralKey, jwtKey, publishableKey }; +}; diff --git a/packages/mcp-server/src/http.ts b/packages/mcp-server/src/http.ts new file mode 100644 index 0000000..be3864c --- /dev/null +++ b/packages/mcp-server/src/http.ts @@ -0,0 +1,85 @@ +import { McpServer } from '@modelcontextprotocol/sdk/server/mcp'; +import { StreamableHTTPServerTransport } from '@modelcontextprotocol/sdk/server/streamableHttp.js'; + +import express from 'express'; +import { McpOptions } from './options'; +import { initMcpServer, newMcpServer } from './server'; +import { parseAuthHeaders } from './headers'; +import { Endpoint } from './tools'; + +const newServer = (mcpOptions: McpOptions, req: express.Request, res: express.Response): McpServer | null => { + const server = newMcpServer(); + try { + const authOptions = parseAuthHeaders(req); + initMcpServer({ + server: server, + clientOptions: { + ...authOptions, + defaultHeaders: { + 'X-Stainless-MCP': 'true', + }, + }, + mcpOptions, + }); + } catch { + res.status(401).json({ + jsonrpc: '2.0', + error: { + code: -32000, + message: 'Unauthorized', + }, + }); + return null; + } + + return server; +}; + +const post = (defaultOptions: McpOptions) => async (req: express.Request, res: express.Response) => { + const server = newServer(defaultOptions, req, res); + // If we return null, we already set the authorization error. + if (server === null) return; + const transport = new StreamableHTTPServerTransport({ + // Stateless server + sessionIdGenerator: undefined, + }); + await server.connect(transport); + await transport.handleRequest(req, res, req.body); +}; + +const get = async (req: express.Request, res: express.Response) => { + res.status(405).json({ + jsonrpc: '2.0', + error: { + code: -32000, + message: 'Method not supported', + }, + }); +}; + +const del = async (req: express.Request, res: express.Response) => { + res.status(405).json({ + jsonrpc: '2.0', + error: { + code: -32000, + message: 'Method not supported', + }, + }); +}; + +export const launchStreamableHTTPServer = async ( + options: McpOptions, + endpoints: Endpoint[], + port: number | undefined, +) => { + const app = express(); + app.use(express.json()); + + app.get('/', get); + app.post('/', post(options)); + app.delete('/', del); + + console.error(`MCP Server running on streamable HTTP on port ${port}`); + + app.listen(port); +}; diff --git a/packages/mcp-server/src/index.ts b/packages/mcp-server/src/index.ts index 0621357..7a4f138 100644 --- a/packages/mcp-server/src/index.ts +++ b/packages/mcp-server/src/index.ts @@ -1,9 +1,10 @@ #!/usr/bin/env node -import { StdioServerTransport } from '@modelcontextprotocol/sdk/server/stdio.js'; -import { init, selectTools, server } from './server'; +import { selectTools } from './server'; import { Endpoint, endpoints } from './tools'; import { McpOptions, parseOptions } from './options'; +import { launchStdioServer } from './stdio'; +import { launchStreamableHTTPServer } from './http'; async function main() { const options = parseOptionsOrError(); @@ -13,18 +14,21 @@ async function main() { return; } - const includedTools = selectToolsOrError(endpoints, options); + const selectedTools = selectToolsOrError(endpoints, options); console.error( - `MCP Server starting with ${includedTools.length} tools:`, - includedTools.map((e) => e.tool.name), + `MCP Server starting with ${selectedTools.length} tools:`, + selectedTools.map((e) => e.tool.name), ); - init({ server, endpoints: includedTools }); - - const transport = new StdioServerTransport(); - await server.connect(transport); - console.error('MCP Server running on stdio'); + switch (options.transport) { + case 'stdio': + await launchStdioServer(options, selectedTools); + break; + case 'http': + await launchStreamableHTTPServer(options, selectedTools, options.port); + break; + } } if (require.main === module) { @@ -43,7 +47,7 @@ function parseOptionsOrError() { } } -function selectToolsOrError(endpoints: Endpoint[], options: McpOptions) { +function selectToolsOrError(endpoints: Endpoint[], options: McpOptions): Endpoint[] { try { const includedTools = selectTools(endpoints, options); if (includedTools.length === 0) { diff --git a/packages/mcp-server/src/options.ts b/packages/mcp-server/src/options.ts index c075101..daf5838 100644 --- a/packages/mcp-server/src/options.ts +++ b/packages/mcp-server/src/options.ts @@ -5,6 +5,8 @@ import { ClientCapabilities, knownClients, ClientType } from './compat'; export type CLIOptions = McpOptions & { list: boolean; + transport: 'stdio' | 'http'; + port: number | undefined; }; export type McpOptions = { @@ -129,6 +131,16 @@ export function parseOptions(): CLIOptions { type: 'boolean', description: 'Print detailed explanation of client capabilities and exit', }) + .option('transport', { + type: 'string', + choices: ['stdio', 'http'], + default: 'stdio', + description: 'What transport to use; stdio for local servers or http for remote servers', + }) + .option('port', { + type: 'number', + description: 'Port to serve on if using http transport', + }) .help(); for (const [command, desc] of examples()) { @@ -238,6 +250,8 @@ export function parseOptions(): CLIOptions { const includeAllTools = explicitTools ? argv.tools?.includes('all') && !argv.noTools?.includes('all') : undefined; + const transport = argv.transport as 'stdio' | 'http'; + const client = argv.client as ClientType; return { client: client && knownClients[client] ? client : undefined, @@ -246,6 +260,8 @@ export function parseOptions(): CLIOptions { filters, capabilities: clientCapabilities, list: argv.list || false, + transport, + port: argv.port, }; } diff --git a/packages/mcp-server/src/server.ts b/packages/mcp-server/src/server.ts index b274135..8b24899 100644 --- a/packages/mcp-server/src/server.ts +++ b/packages/mcp-server/src/server.ts @@ -22,14 +22,17 @@ export { Filter } from './tools'; export { ClientOptions } from 'hyperswitch'; export { endpoints } from './tools'; +export const newMcpServer = () => + new McpServer( + { + name: 'hyperswitch_api', + version: '0.0.1-alpha.1', + }, + { capabilities: { tools: {}, logging: {} } }, + ); + // Create server instance -export const server = new McpServer( - { - name: 'hyperswitch_api', - version: '0.0.1-alpha.1', - }, - { capabilities: { tools: {}, logging: {} } }, -); +export const server = newMcpServer(); /** * Initializes the provided MCP Server with the given tools and handlers. @@ -100,7 +103,7 @@ export function init(params: { /** * Selects the tools to include in the MCP Server based on the provided options. */ -export function selectTools(endpoints: Endpoint[], options: McpOptions) { +export function selectTools(endpoints: Endpoint[], options: McpOptions): Endpoint[] { const filteredEndpoints = query(options.filters, endpoints); let includedTools = filteredEndpoints; diff --git a/packages/mcp-server/src/stdio.ts b/packages/mcp-server/src/stdio.ts new file mode 100644 index 0000000..b269163 --- /dev/null +++ b/packages/mcp-server/src/stdio.ts @@ -0,0 +1,14 @@ +import { StdioServerTransport } from '@modelcontextprotocol/sdk/server/stdio.js'; +import { init, newMcpServer } from './server'; +import { Endpoint } from './tools'; +import { McpOptions } from './options'; + +export const launchStdioServer = async (options: McpOptions, endpoints: Endpoint[]) => { + const server = newMcpServer(); + + init({ server, endpoints }); + + const transport = new StdioServerTransport(); + await server.connect(transport); + console.error('MCP Server running on stdio'); +}; From 2e52a55ba19a293660d678184e6ebefc6b4ad95a Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 6 Aug 2025 07:56:40 +0000 Subject: [PATCH 17/44] fix(mcp): fix bug in header handling --- packages/mcp-server/src/headers.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/mcp-server/src/headers.ts b/packages/mcp-server/src/headers.ts index d8daeea..27a7d59 100644 --- a/packages/mcp-server/src/headers.ts +++ b/packages/mcp-server/src/headers.ts @@ -6,7 +6,7 @@ import { IncomingMessage } from 'node:http'; export const parseAuthHeaders = (req: IncomingMessage): Partial => { if (req.headers.authorization) { - const scheme = req.headers.authorization.slice(req.headers.authorization.search(' ')); + const scheme = req.headers.authorization.split(' ')[0]!; const value = req.headers.authorization.slice(scheme.length + 1); switch (scheme) { case 'Bearer': From fa09aca8fab54a0bcd7cf5ccbdc10bf40913ff01 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 7 Aug 2025 03:54:41 +0000 Subject: [PATCH 18/44] chore(internal): move publish config --- bin/publish-npm | 2 +- package.json | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/bin/publish-npm b/bin/publish-npm index fa2243d..45e8aa8 100644 --- a/bin/publish-npm +++ b/bin/publish-npm @@ -58,4 +58,4 @@ else fi # Publish with the appropriate tag -yarn publish --access public --tag "$TAG" +yarn publish --tag "$TAG" diff --git a/package.json b/package.json index fccbba8..ace1745 100644 --- a/package.json +++ b/package.json @@ -13,6 +13,9 @@ "**/*" ], "private": false, + "publishConfig": { + "access": "public" + }, "scripts": { "test": "./scripts/test", "build": "./scripts/build", From 7ea0e9801d973e095c1aad8115ba01aa0b73bdce Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 7 Aug 2025 03:57:47 +0000 Subject: [PATCH 19/44] chore(mcp): refactor streamable http transport --- packages/mcp-server/src/http.ts | 28 +++++++++++++++++++++------- 1 file changed, 21 insertions(+), 7 deletions(-) diff --git a/packages/mcp-server/src/http.ts b/packages/mcp-server/src/http.ts index be3864c..d64f723 100644 --- a/packages/mcp-server/src/http.ts +++ b/packages/mcp-server/src/http.ts @@ -1,3 +1,5 @@ +// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + import { McpServer } from '@modelcontextprotocol/sdk/server/mcp'; import { StreamableHTTPServerTransport } from '@modelcontextprotocol/sdk/server/streamableHttp.js'; @@ -67,11 +69,7 @@ const del = async (req: express.Request, res: express.Response) => { }); }; -export const launchStreamableHTTPServer = async ( - options: McpOptions, - endpoints: Endpoint[], - port: number | undefined, -) => { +export const streamableHTTPApp = (options: McpOptions) => { const app = express(); app.use(express.json()); @@ -79,7 +77,23 @@ export const launchStreamableHTTPServer = async ( app.post('/', post(options)); app.delete('/', del); - console.error(`MCP Server running on streamable HTTP on port ${port}`); + return app; +}; + +export const launchStreamableHTTPServer = async ( + options: McpOptions, + endpoints: Endpoint[], + port: number | undefined, +) => { + const app = streamableHTTPApp(options); + const server = app.listen(port); + const address = server.address(); - app.listen(port); + if (typeof address === 'string') { + console.error(`MCP Server running on streamable HTTP at ${address}`); + } else if (address !== null) { + console.error(`MCP Server running on streamable HTTP on port ${address.port}`); + } else { + console.error(`MCP Server running on streamable HTTP on port ${port}`); + } }; From 21a5331ea0916bbf264b58cb2c71a67020a565b5 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 7 Aug 2025 04:13:35 +0000 Subject: [PATCH 20/44] feat(mcp): add unix socket option for remote MCP --- packages/mcp-server/src/http.ts | 2 +- packages/mcp-server/src/index.ts | 2 +- packages/mcp-server/src/options.ts | 6 ++++++ packages/mcp-server/src/server.ts | 1 - 4 files changed, 8 insertions(+), 3 deletions(-) diff --git a/packages/mcp-server/src/http.ts b/packages/mcp-server/src/http.ts index d64f723..900e131 100644 --- a/packages/mcp-server/src/http.ts +++ b/packages/mcp-server/src/http.ts @@ -83,7 +83,7 @@ export const streamableHTTPApp = (options: McpOptions) => { export const launchStreamableHTTPServer = async ( options: McpOptions, endpoints: Endpoint[], - port: number | undefined, + port: number | string | undefined, ) => { const app = streamableHTTPApp(options); const server = app.listen(port); diff --git a/packages/mcp-server/src/index.ts b/packages/mcp-server/src/index.ts index 7a4f138..4c71a3b 100644 --- a/packages/mcp-server/src/index.ts +++ b/packages/mcp-server/src/index.ts @@ -26,7 +26,7 @@ async function main() { await launchStdioServer(options, selectedTools); break; case 'http': - await launchStreamableHTTPServer(options, selectedTools, options.port); + await launchStreamableHTTPServer(options, selectedTools, options.port ?? options.socket); break; } } diff --git a/packages/mcp-server/src/options.ts b/packages/mcp-server/src/options.ts index daf5838..c290ca5 100644 --- a/packages/mcp-server/src/options.ts +++ b/packages/mcp-server/src/options.ts @@ -7,6 +7,7 @@ export type CLIOptions = McpOptions & { list: boolean; transport: 'stdio' | 'http'; port: number | undefined; + socket: string | undefined; }; export type McpOptions = { @@ -141,6 +142,10 @@ export function parseOptions(): CLIOptions { type: 'number', description: 'Port to serve on if using http transport', }) + .option('socket', { + type: 'string', + description: 'Unix socket to serve on if using http transport', + }) .help(); for (const [command, desc] of examples()) { @@ -262,6 +267,7 @@ export function parseOptions(): CLIOptions { list: argv.list || false, transport, port: argv.port, + socket: argv.socket, }; } diff --git a/packages/mcp-server/src/server.ts b/packages/mcp-server/src/server.ts index 8b24899..d0a8a0e 100644 --- a/packages/mcp-server/src/server.ts +++ b/packages/mcp-server/src/server.ts @@ -67,7 +67,6 @@ export function init(params: { const logAtLevel = (level: 'debug' | 'info' | 'warning' | 'error') => (message: string, ...rest: unknown[]) => { - console.error(message, ...rest); void server.sendLoggingMessage({ level, data: { message, rest }, From f7386b839fd22de3b3da4103f96dbdd98caa5cd3 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Sat, 9 Aug 2025 04:29:33 +0000 Subject: [PATCH 21/44] chore: update @stainless-api/prism-cli to v5.15.0 --- scripts/mock | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/mock b/scripts/mock index d2814ae..0b28f6e 100755 --- a/scripts/mock +++ b/scripts/mock @@ -21,7 +21,7 @@ echo "==> Starting mock server with URL ${URL}" # Run prism mock on the given spec if [ "$1" == "--daemon" ]; then - npm exec --package=@stainless-api/prism-cli@5.8.5 -- prism mock "$URL" &> .prism.log & + npm exec --package=@stainless-api/prism-cli@5.15.0 -- prism mock "$URL" &> .prism.log & # Wait for server to come online echo -n "Waiting for server" @@ -37,5 +37,5 @@ if [ "$1" == "--daemon" ]; then echo else - npm exec --package=@stainless-api/prism-cli@5.8.5 -- prism mock "$URL" + npm exec --package=@stainless-api/prism-cli@5.15.0 -- prism mock "$URL" fi From 9753a3d0305ae850c5f89449e4a66e34545818a6 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Sat, 9 Aug 2025 04:34:06 +0000 Subject: [PATCH 22/44] chore(internal): update comment in script --- scripts/test | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/test b/scripts/test index 2049e31..7bce051 100755 --- a/scripts/test +++ b/scripts/test @@ -43,7 +43,7 @@ elif ! prism_is_running ; then echo -e "To run the server, pass in the path or url of your OpenAPI" echo -e "spec to the prism command:" echo - echo -e " \$ ${YELLOW}npm exec --package=@stoplight/prism-cli@~5.3.2 -- prism mock path/to/your.openapi.yml${NC}" + echo -e " \$ ${YELLOW}npm exec --package=@stainless-api/prism-cli@5.15.0 -- prism mock path/to/your.openapi.yml${NC}" echo exit 1 From 247a7c81d0ed517450132ac5bb42a7c0865b1d1c Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 12 Aug 2025 02:17:49 +0000 Subject: [PATCH 23/44] chore(internal): codegen related update --- packages/mcp-server/package.json | 2 +- packages/mcp-server/src/filtering.ts | 3 +- tests/api-resources/accounts/accounts.test.ts | 20 +++++----- .../business-profile/business-profile.test.ts | 16 ++++---- .../dynamic-routing/contracts.test.ts | 8 ++-- .../dynamic-routing/elimination.test.ts | 4 +- .../dynamic-routing/success-based.test.ts | 8 ++-- .../api-resources/accounts/connectors.test.ts | 18 ++++----- tests/api-resources/api-keys.test.ts | 20 +++++----- tests/api-resources/authentication.test.ts | 4 +- tests/api-resources/blocklist.test.ts | 16 ++++---- .../api-resources/customers/customers.test.ts | 14 +++---- .../customers/payment-methods.test.ts | 8 ++-- tests/api-resources/disputes.test.ts | 6 +-- tests/api-resources/events/events.test.ts | 10 ++--- tests/api-resources/events/profile.test.ts | 2 +- tests/api-resources/gsm.test.ts | 16 ++++---- tests/api-resources/mandates.test.ts | 4 +- tests/api-resources/organization.test.ts | 10 ++--- tests/api-resources/payment-link.test.ts | 4 +- tests/api-resources/payment-methods.test.ts | 14 +++---- .../api-resources/payments/number-3ds.test.ts | 4 +- tests/api-resources/payments/payments.test.ts | 40 +++++++++---------- tests/api-resources/payouts/list.test.ts | 8 ++-- tests/api-resources/payouts/payouts.test.ts | 26 ++++++------ tests/api-resources/poll.test.ts | 2 +- tests/api-resources/profile-acquirers.test.ts | 8 ++-- tests/api-resources/refunds.test.ts | 12 +++--- tests/api-resources/relay.test.ts | 8 ++-- .../routing/default/default.test.ts | 6 +-- .../routing/default/profile.test.ts | 6 +-- tests/api-resources/routing/routing.test.ts | 16 ++++---- tests/api-resources/three-ds-decision.test.ts | 4 +- 33 files changed, 173 insertions(+), 174 deletions(-) diff --git a/packages/mcp-server/package.json b/packages/mcp-server/package.json index 5986a03..684a4c4 100644 --- a/packages/mcp-server/package.json +++ b/packages/mcp-server/package.json @@ -30,7 +30,7 @@ "hyperswitch": "file:../../dist/", "@modelcontextprotocol/sdk": "^1.11.5", "express": "^5.1.0", - "jq-web": "https://github.com/stainless-api/jq-web/releases/download/v0.8.2/jq-web.tar.gz", + "jq-web": "https://github.com/stainless-api/jq-web/releases/download/v0.8.6/jq-web.tar.gz", "yargs": "^17.7.2", "@cloudflare/cabidela": "^0.2.4", "zod": "^3.25.20", diff --git a/packages/mcp-server/src/filtering.ts b/packages/mcp-server/src/filtering.ts index 87eab2d..1aa9a40 100644 --- a/packages/mcp-server/src/filtering.ts +++ b/packages/mcp-server/src/filtering.ts @@ -1,8 +1,7 @@ // @ts-nocheck import initJq from 'jq-web'; -export async function maybeFilter(args: Record | undefined, response: any): Promise { - const jqFilter = args?.['jq_filter']; +export async function maybeFilter(jqFilter: unknown | undefined, response: any): Promise { if (jqFilter && typeof jqFilter === 'string') { return await jq(response, jqFilter); } else { diff --git a/tests/api-resources/accounts/accounts.test.ts b/tests/api-resources/accounts/accounts.test.ts index bbbd384..c568382 100644 --- a/tests/api-resources/accounts/accounts.test.ts +++ b/tests/api-resources/accounts/accounts.test.ts @@ -11,7 +11,7 @@ const client = new Hyperswitch({ }); describe('resource accounts', () => { - // skipped: tests are disabled for the time being + // Prism tests are disabled test.skip('create: only required params', async () => { const responsePromise = client.accounts.create({ merchant_id: 'merchant_abc' }); const rawResponse = await responsePromise.asResponse(); @@ -23,7 +23,7 @@ describe('resource accounts', () => { expect(dataAndResponse.response).toBe(rawResponse); }); - // skipped: tests are disabled for the time being + // Prism tests are disabled test.skip('create: required and optional params', async () => { const response = await client.accounts.create({ merchant_id: 'merchant_abc', @@ -85,7 +85,7 @@ describe('resource accounts', () => { }); }); - // skipped: tests are disabled for the time being + // Prism tests are disabled test.skip('retrieve', async () => { const responsePromise = client.accounts.retrieve('account_id'); const rawResponse = await responsePromise.asResponse(); @@ -97,7 +97,7 @@ describe('resource accounts', () => { expect(dataAndResponse.response).toBe(rawResponse); }); - // skipped: tests are disabled for the time being + // Prism tests are disabled test.skip('update: only required params', async () => { const responsePromise = client.accounts.update('account_id', { merchant_id: 'merchant_abc' }); const rawResponse = await responsePromise.asResponse(); @@ -109,7 +109,7 @@ describe('resource accounts', () => { expect(dataAndResponse.response).toBe(rawResponse); }); - // skipped: tests are disabled for the time being + // Prism tests are disabled test.skip('update: required and optional params', async () => { const response = await client.accounts.update('account_id', { merchant_id: 'merchant_abc', @@ -169,7 +169,7 @@ describe('resource accounts', () => { }); }); - // skipped: tests are disabled for the time being + // Prism tests are disabled test.skip('delete', async () => { const responsePromise = client.accounts.delete('account_id'); const rawResponse = await responsePromise.asResponse(); @@ -181,7 +181,7 @@ describe('resource accounts', () => { expect(dataAndResponse.response).toBe(rawResponse); }); - // skipped: tests are disabled for the time being + // Prism tests are disabled test.skip('kv: only required params', async () => { const responsePromise = client.accounts.kv('account_id', { kv_enabled: true }); const rawResponse = await responsePromise.asResponse(); @@ -193,12 +193,12 @@ describe('resource accounts', () => { expect(dataAndResponse.response).toBe(rawResponse); }); - // skipped: tests are disabled for the time being + // Prism tests are disabled test.skip('kv: required and optional params', async () => { const response = await client.accounts.kv('account_id', { kv_enabled: true }); }); - // skipped: tests are disabled for the time being + // Prism tests are disabled test.skip('listPaymentMethods', async () => { const responsePromise = client.accounts.listPaymentMethods(); const rawResponse = await responsePromise.asResponse(); @@ -210,7 +210,7 @@ describe('resource accounts', () => { expect(dataAndResponse.response).toBe(rawResponse); }); - // skipped: tests are disabled for the time being + // Prism tests are disabled test.skip('listPaymentMethods: request options and params are passed correctly', async () => { // ensure the request options are being passed correctly by passing an invalid HTTP method in order to cause an error await expect( diff --git a/tests/api-resources/accounts/business-profile/business-profile.test.ts b/tests/api-resources/accounts/business-profile/business-profile.test.ts index 1757507..3b95364 100644 --- a/tests/api-resources/accounts/business-profile/business-profile.test.ts +++ b/tests/api-resources/accounts/business-profile/business-profile.test.ts @@ -11,7 +11,7 @@ const client = new Hyperswitch({ }); describe('resource businessProfile', () => { - // skipped: tests are disabled for the time being + // Prism tests are disabled test.skip('create', async () => { const responsePromise = client.accounts.businessProfile.create('account_id', {}); const rawResponse = await responsePromise.asResponse(); @@ -23,7 +23,7 @@ describe('resource businessProfile', () => { expect(dataAndResponse.response).toBe(rawResponse); }); - // skipped: tests are disabled for the time being + // Prism tests are disabled test.skip('retrieve: only required params', async () => { const responsePromise = client.accounts.businessProfile.retrieve('profile_id', { account_id: 'account_id', @@ -37,14 +37,14 @@ describe('resource businessProfile', () => { expect(dataAndResponse.response).toBe(rawResponse); }); - // skipped: tests are disabled for the time being + // Prism tests are disabled test.skip('retrieve: required and optional params', async () => { const response = await client.accounts.businessProfile.retrieve('profile_id', { account_id: 'account_id', }); }); - // skipped: tests are disabled for the time being + // Prism tests are disabled test.skip('update: only required params', async () => { const responsePromise = client.accounts.businessProfile.update('profile_id', { account_id: 'account_id', @@ -58,7 +58,7 @@ describe('resource businessProfile', () => { expect(dataAndResponse.response).toBe(rawResponse); }); - // skipped: tests are disabled for the time being + // Prism tests are disabled test.skip('update: required and optional params', async () => { const response = await client.accounts.businessProfile.update('profile_id', { account_id: 'account_id', @@ -208,7 +208,7 @@ describe('resource businessProfile', () => { }); }); - // skipped: tests are disabled for the time being + // Prism tests are disabled test.skip('list', async () => { const responsePromise = client.accounts.businessProfile.list('account_id'); const rawResponse = await responsePromise.asResponse(); @@ -220,7 +220,7 @@ describe('resource businessProfile', () => { expect(dataAndResponse.response).toBe(rawResponse); }); - // skipped: tests are disabled for the time being + // Prism tests are disabled test.skip('delete: only required params', async () => { const responsePromise = client.accounts.businessProfile.delete('profile_id', { account_id: 'account_id', @@ -234,7 +234,7 @@ describe('resource businessProfile', () => { expect(dataAndResponse.response).toBe(rawResponse); }); - // skipped: tests are disabled for the time being + // Prism tests are disabled test.skip('delete: required and optional params', async () => { const response = await client.accounts.businessProfile.delete('profile_id', { account_id: 'account_id' }); }); diff --git a/tests/api-resources/accounts/business-profile/dynamic-routing/contracts.test.ts b/tests/api-resources/accounts/business-profile/dynamic-routing/contracts.test.ts index 0eb3af5..8906a2e 100644 --- a/tests/api-resources/accounts/business-profile/dynamic-routing/contracts.test.ts +++ b/tests/api-resources/accounts/business-profile/dynamic-routing/contracts.test.ts @@ -11,7 +11,7 @@ const client = new Hyperswitch({ }); describe('resource contracts', () => { - // skipped: tests are disabled for the time being + // Prism tests are disabled test.skip('toggle: only required params', async () => { const responsePromise = client.accounts.businessProfile.dynamicRouting.contracts.toggle('profile_id', { account_id: 'account_id', @@ -26,7 +26,7 @@ describe('resource contracts', () => { expect(dataAndResponse.response).toBe(rawResponse); }); - // skipped: tests are disabled for the time being + // Prism tests are disabled test.skip('toggle: required and optional params', async () => { const response = await client.accounts.businessProfile.dynamicRouting.contracts.toggle('profile_id', { account_id: 'account_id', @@ -36,7 +36,7 @@ describe('resource contracts', () => { }); }); - // skipped: tests are disabled for the time being + // Prism tests are disabled test.skip('updateConfig: only required params', async () => { const responsePromise = client.accounts.businessProfile.dynamicRouting.contracts.updateConfig( 'algorithm_id', @@ -51,7 +51,7 @@ describe('resource contracts', () => { expect(dataAndResponse.response).toBe(rawResponse); }); - // skipped: tests are disabled for the time being + // Prism tests are disabled test.skip('updateConfig: required and optional params', async () => { const response = await client.accounts.businessProfile.dynamicRouting.contracts.updateConfig( 'algorithm_id', diff --git a/tests/api-resources/accounts/business-profile/dynamic-routing/elimination.test.ts b/tests/api-resources/accounts/business-profile/dynamic-routing/elimination.test.ts index d6ba28c..a665d46 100644 --- a/tests/api-resources/accounts/business-profile/dynamic-routing/elimination.test.ts +++ b/tests/api-resources/accounts/business-profile/dynamic-routing/elimination.test.ts @@ -11,7 +11,7 @@ const client = new Hyperswitch({ }); describe('resource elimination', () => { - // skipped: tests are disabled for the time being + // Prism tests are disabled test.skip('toggle: only required params', async () => { const responsePromise = client.accounts.businessProfile.dynamicRouting.elimination.toggle('profile_id', { account_id: 'account_id', @@ -26,7 +26,7 @@ describe('resource elimination', () => { expect(dataAndResponse.response).toBe(rawResponse); }); - // skipped: tests are disabled for the time being + // Prism tests are disabled test.skip('toggle: required and optional params', async () => { const response = await client.accounts.businessProfile.dynamicRouting.elimination.toggle('profile_id', { account_id: 'account_id', diff --git a/tests/api-resources/accounts/business-profile/dynamic-routing/success-based.test.ts b/tests/api-resources/accounts/business-profile/dynamic-routing/success-based.test.ts index ba3377d..dafd065 100644 --- a/tests/api-resources/accounts/business-profile/dynamic-routing/success-based.test.ts +++ b/tests/api-resources/accounts/business-profile/dynamic-routing/success-based.test.ts @@ -11,7 +11,7 @@ const client = new Hyperswitch({ }); describe('resource successBased', () => { - // skipped: tests are disabled for the time being + // Prism tests are disabled test.skip('toggle: only required params', async () => { const responsePromise = client.accounts.businessProfile.dynamicRouting.successBased.toggle('profile_id', { account_id: 'account_id', @@ -26,7 +26,7 @@ describe('resource successBased', () => { expect(dataAndResponse.response).toBe(rawResponse); }); - // skipped: tests are disabled for the time being + // Prism tests are disabled test.skip('toggle: required and optional params', async () => { const response = await client.accounts.businessProfile.dynamicRouting.successBased.toggle('profile_id', { account_id: 'account_id', @@ -34,7 +34,7 @@ describe('resource successBased', () => { }); }); - // skipped: tests are disabled for the time being + // Prism tests are disabled test.skip('updateConfig: only required params', async () => { const responsePromise = client.accounts.businessProfile.dynamicRouting.successBased.updateConfig( 'algorithm_id', @@ -49,7 +49,7 @@ describe('resource successBased', () => { expect(dataAndResponse.response).toBe(rawResponse); }); - // skipped: tests are disabled for the time being + // Prism tests are disabled test.skip('updateConfig: required and optional params', async () => { const response = await client.accounts.businessProfile.dynamicRouting.successBased.updateConfig( 'algorithm_id', diff --git a/tests/api-resources/accounts/connectors.test.ts b/tests/api-resources/accounts/connectors.test.ts index e962cf1..cb721b4 100644 --- a/tests/api-resources/accounts/connectors.test.ts +++ b/tests/api-resources/accounts/connectors.test.ts @@ -11,7 +11,7 @@ const client = new Hyperswitch({ }); describe('resource connectors', () => { - // skipped: tests are disabled for the time being + // Prism tests are disabled test.skip('create: only required params', async () => { const responsePromise = client.accounts.connectors.create('account_id', { connector_name: 'adyen', @@ -26,7 +26,7 @@ describe('resource connectors', () => { expect(dataAndResponse.response).toBe(rawResponse); }); - // skipped: tests are disabled for the time being + // Prism tests are disabled test.skip('create: required and optional params', async () => { const response = await client.accounts.connectors.create('account_id', { connector_name: 'adyen', @@ -103,7 +103,7 @@ describe('resource connectors', () => { }); }); - // skipped: tests are disabled for the time being + // Prism tests are disabled test.skip('retrieve: only required params', async () => { const responsePromise = client.accounts.connectors.retrieve('merchant_connector_id', { account_id: 'account_id', @@ -117,14 +117,14 @@ describe('resource connectors', () => { expect(dataAndResponse.response).toBe(rawResponse); }); - // skipped: tests are disabled for the time being + // Prism tests are disabled test.skip('retrieve: required and optional params', async () => { const response = await client.accounts.connectors.retrieve('merchant_connector_id', { account_id: 'account_id', }); }); - // skipped: tests are disabled for the time being + // Prism tests are disabled test.skip('update: only required params', async () => { const responsePromise = client.accounts.connectors.update('merchant_connector_id', { account_id: 'account_id', @@ -140,7 +140,7 @@ describe('resource connectors', () => { expect(dataAndResponse.response).toBe(rawResponse); }); - // skipped: tests are disabled for the time being + // Prism tests are disabled test.skip('update: required and optional params', async () => { const response = await client.accounts.connectors.update('merchant_connector_id', { account_id: 'account_id', @@ -201,7 +201,7 @@ describe('resource connectors', () => { }); }); - // skipped: tests are disabled for the time being + // Prism tests are disabled test.skip('list', async () => { const responsePromise = client.accounts.connectors.list('account_id'); const rawResponse = await responsePromise.asResponse(); @@ -213,7 +213,7 @@ describe('resource connectors', () => { expect(dataAndResponse.response).toBe(rawResponse); }); - // skipped: tests are disabled for the time being + // Prism tests are disabled test.skip('delete: only required params', async () => { const responsePromise = client.accounts.connectors.delete('merchant_connector_id', { account_id: 'account_id', @@ -227,7 +227,7 @@ describe('resource connectors', () => { expect(dataAndResponse.response).toBe(rawResponse); }); - // skipped: tests are disabled for the time being + // Prism tests are disabled test.skip('delete: required and optional params', async () => { const response = await client.accounts.connectors.delete('merchant_connector_id', { account_id: 'account_id', diff --git a/tests/api-resources/api-keys.test.ts b/tests/api-resources/api-keys.test.ts index bc6214f..c8f1277 100644 --- a/tests/api-resources/api-keys.test.ts +++ b/tests/api-resources/api-keys.test.ts @@ -11,7 +11,7 @@ const client = new Hyperswitch({ }); describe('resource apiKeys', () => { - // skipped: tests are disabled for the time being + // Prism tests are disabled test.skip('create: only required params', async () => { const responsePromise = client.apiKeys.create('merchant_id', { expiration: 'never', @@ -26,7 +26,7 @@ describe('resource apiKeys', () => { expect(dataAndResponse.response).toBe(rawResponse); }); - // skipped: tests are disabled for the time being + // Prism tests are disabled test.skip('create: required and optional params', async () => { const response = await client.apiKeys.create('merchant_id', { expiration: 'never', @@ -35,7 +35,7 @@ describe('resource apiKeys', () => { }); }); - // skipped: tests are disabled for the time being + // Prism tests are disabled test.skip('retrieve: only required params', async () => { const responsePromise = client.apiKeys.retrieve('key_id', { merchant_id: 'merchant_id' }); const rawResponse = await responsePromise.asResponse(); @@ -47,12 +47,12 @@ describe('resource apiKeys', () => { expect(dataAndResponse.response).toBe(rawResponse); }); - // skipped: tests are disabled for the time being + // Prism tests are disabled test.skip('retrieve: required and optional params', async () => { const response = await client.apiKeys.retrieve('key_id', { merchant_id: 'merchant_id' }); }); - // skipped: tests are disabled for the time being + // Prism tests are disabled test.skip('update: only required params', async () => { const responsePromise = client.apiKeys.update('key_id', { merchant_id: 'merchant_id' }); const rawResponse = await responsePromise.asResponse(); @@ -64,7 +64,7 @@ describe('resource apiKeys', () => { expect(dataAndResponse.response).toBe(rawResponse); }); - // skipped: tests are disabled for the time being + // Prism tests are disabled test.skip('update: required and optional params', async () => { const response = await client.apiKeys.update('key_id', { merchant_id: 'merchant_id', @@ -74,7 +74,7 @@ describe('resource apiKeys', () => { }); }); - // skipped: tests are disabled for the time being + // Prism tests are disabled test.skip('list', async () => { const responsePromise = client.apiKeys.list('merchant_id'); const rawResponse = await responsePromise.asResponse(); @@ -86,7 +86,7 @@ describe('resource apiKeys', () => { expect(dataAndResponse.response).toBe(rawResponse); }); - // skipped: tests are disabled for the time being + // Prism tests are disabled test.skip('list: request options and params are passed correctly', async () => { // ensure the request options are being passed correctly by passing an invalid HTTP method in order to cause an error await expect( @@ -94,7 +94,7 @@ describe('resource apiKeys', () => { ).rejects.toThrow(Hyperswitch.NotFoundError); }); - // skipped: tests are disabled for the time being + // Prism tests are disabled test.skip('revoke: only required params', async () => { const responsePromise = client.apiKeys.revoke('key_id', { merchant_id: 'merchant_id' }); const rawResponse = await responsePromise.asResponse(); @@ -106,7 +106,7 @@ describe('resource apiKeys', () => { expect(dataAndResponse.response).toBe(rawResponse); }); - // skipped: tests are disabled for the time being + // Prism tests are disabled test.skip('revoke: required and optional params', async () => { const response = await client.apiKeys.revoke('key_id', { merchant_id: 'merchant_id' }); }); diff --git a/tests/api-resources/authentication.test.ts b/tests/api-resources/authentication.test.ts index f3b3fcd..f6c0cfe 100644 --- a/tests/api-resources/authentication.test.ts +++ b/tests/api-resources/authentication.test.ts @@ -11,7 +11,7 @@ const client = new Hyperswitch({ }); describe('resource authentication', () => { - // skipped: tests are disabled for the time being + // Prism tests are disabled test.skip('create: only required params', async () => { const responsePromise = client.authentication.create({ amount: 0, currency: 'AED' }); const rawResponse = await responsePromise.asResponse(); @@ -23,7 +23,7 @@ describe('resource authentication', () => { expect(dataAndResponse.response).toBe(rawResponse); }); - // skipped: tests are disabled for the time being + // Prism tests are disabled test.skip('create: required and optional params', async () => { const response = await client.authentication.create({ amount: 0, diff --git a/tests/api-resources/blocklist.test.ts b/tests/api-resources/blocklist.test.ts index ee41a66..1e8d1a0 100644 --- a/tests/api-resources/blocklist.test.ts +++ b/tests/api-resources/blocklist.test.ts @@ -11,7 +11,7 @@ const client = new Hyperswitch({ }); describe('resource blocklist', () => { - // skipped: tests are disabled for the time being + // Prism tests are disabled test.skip('create: only required params', async () => { const responsePromise = client.blocklist.create({ data: 'data', type: 'card_bin' }); const rawResponse = await responsePromise.asResponse(); @@ -23,12 +23,12 @@ describe('resource blocklist', () => { expect(dataAndResponse.response).toBe(rawResponse); }); - // skipped: tests are disabled for the time being + // Prism tests are disabled test.skip('create: required and optional params', async () => { const response = await client.blocklist.create({ data: 'data', type: 'card_bin' }); }); - // skipped: tests are disabled for the time being + // Prism tests are disabled test.skip('retrieve: only required params', async () => { const responsePromise = client.blocklist.retrieve({ data_kind: 'payment_method' }); const rawResponse = await responsePromise.asResponse(); @@ -40,12 +40,12 @@ describe('resource blocklist', () => { expect(dataAndResponse.response).toBe(rawResponse); }); - // skipped: tests are disabled for the time being + // Prism tests are disabled test.skip('retrieve: required and optional params', async () => { const response = await client.blocklist.retrieve({ data_kind: 'payment_method' }); }); - // skipped: tests are disabled for the time being + // Prism tests are disabled test.skip('delete: only required params', async () => { const responsePromise = client.blocklist.delete({ data: 'data', type: 'card_bin' }); const rawResponse = await responsePromise.asResponse(); @@ -57,12 +57,12 @@ describe('resource blocklist', () => { expect(dataAndResponse.response).toBe(rawResponse); }); - // skipped: tests are disabled for the time being + // Prism tests are disabled test.skip('delete: required and optional params', async () => { const response = await client.blocklist.delete({ data: 'data', type: 'card_bin' }); }); - // skipped: tests are disabled for the time being + // Prism tests are disabled test.skip('toggle: only required params', async () => { const responsePromise = client.blocklist.toggle({ status: true }); const rawResponse = await responsePromise.asResponse(); @@ -74,7 +74,7 @@ describe('resource blocklist', () => { expect(dataAndResponse.response).toBe(rawResponse); }); - // skipped: tests are disabled for the time being + // Prism tests are disabled test.skip('toggle: required and optional params', async () => { const response = await client.blocklist.toggle({ status: true }); }); diff --git a/tests/api-resources/customers/customers.test.ts b/tests/api-resources/customers/customers.test.ts index 21de1e1..dbd0c0e 100644 --- a/tests/api-resources/customers/customers.test.ts +++ b/tests/api-resources/customers/customers.test.ts @@ -11,7 +11,7 @@ const client = new Hyperswitch({ }); describe('resource customers', () => { - // skipped: tests are disabled for the time being + // Prism tests are disabled test.skip('create', async () => { const responsePromise = client.customers.create({}); const rawResponse = await responsePromise.asResponse(); @@ -23,7 +23,7 @@ describe('resource customers', () => { expect(dataAndResponse.response).toBe(rawResponse); }); - // skipped: tests are disabled for the time being + // Prism tests are disabled test.skip('retrieve', async () => { const responsePromise = client.customers.retrieve('customer_id'); const rawResponse = await responsePromise.asResponse(); @@ -35,7 +35,7 @@ describe('resource customers', () => { expect(dataAndResponse.response).toBe(rawResponse); }); - // skipped: tests are disabled for the time being + // Prism tests are disabled test.skip('update', async () => { const responsePromise = client.customers.update('customer_id', {}); const rawResponse = await responsePromise.asResponse(); @@ -47,7 +47,7 @@ describe('resource customers', () => { expect(dataAndResponse.response).toBe(rawResponse); }); - // skipped: tests are disabled for the time being + // Prism tests are disabled test.skip('list', async () => { const responsePromise = client.customers.list(); const rawResponse = await responsePromise.asResponse(); @@ -59,7 +59,7 @@ describe('resource customers', () => { expect(dataAndResponse.response).toBe(rawResponse); }); - // skipped: tests are disabled for the time being + // Prism tests are disabled test.skip('list: request options and params are passed correctly', async () => { // ensure the request options are being passed correctly by passing an invalid HTTP method in order to cause an error await expect( @@ -67,7 +67,7 @@ describe('resource customers', () => { ).rejects.toThrow(Hyperswitch.NotFoundError); }); - // skipped: tests are disabled for the time being + // Prism tests are disabled test.skip('delete', async () => { const responsePromise = client.customers.delete('customer_id'); const rawResponse = await responsePromise.asResponse(); @@ -79,7 +79,7 @@ describe('resource customers', () => { expect(dataAndResponse.response).toBe(rawResponse); }); - // skipped: tests are disabled for the time being + // Prism tests are disabled test.skip('listMandates', async () => { const responsePromise = client.customers.listMandates('customer_id'); const rawResponse = await responsePromise.asResponse(); diff --git a/tests/api-resources/customers/payment-methods.test.ts b/tests/api-resources/customers/payment-methods.test.ts index 8416283..f622760 100644 --- a/tests/api-resources/customers/payment-methods.test.ts +++ b/tests/api-resources/customers/payment-methods.test.ts @@ -11,7 +11,7 @@ const client = new Hyperswitch({ }); describe('resource paymentMethods', () => { - // skipped: tests are disabled for the time being + // Prism tests are disabled test.skip('list', async () => { const responsePromise = client.customers.paymentMethods.list('customer_id'); const rawResponse = await responsePromise.asResponse(); @@ -23,7 +23,7 @@ describe('resource paymentMethods', () => { expect(dataAndResponse.response).toBe(rawResponse); }); - // skipped: tests are disabled for the time being + // Prism tests are disabled test.skip('list: request options and params are passed correctly', async () => { // ensure the request options are being passed correctly by passing an invalid HTTP method in order to cause an error await expect( @@ -44,7 +44,7 @@ describe('resource paymentMethods', () => { ).rejects.toThrow(Hyperswitch.NotFoundError); }); - // skipped: tests are disabled for the time being + // Prism tests are disabled test.skip('listSaved', async () => { const responsePromise = client.customers.paymentMethods.listSaved(); const rawResponse = await responsePromise.asResponse(); @@ -56,7 +56,7 @@ describe('resource paymentMethods', () => { expect(dataAndResponse.response).toBe(rawResponse); }); - // skipped: tests are disabled for the time being + // Prism tests are disabled test.skip('listSaved: request options and params are passed correctly', async () => { // ensure the request options are being passed correctly by passing an invalid HTTP method in order to cause an error await expect( diff --git a/tests/api-resources/disputes.test.ts b/tests/api-resources/disputes.test.ts index c1022b3..72652a7 100644 --- a/tests/api-resources/disputes.test.ts +++ b/tests/api-resources/disputes.test.ts @@ -11,7 +11,7 @@ const client = new Hyperswitch({ }); describe('resource disputes', () => { - // skipped: tests are disabled for the time being + // Prism tests are disabled test.skip('retrieve', async () => { const responsePromise = client.disputes.retrieve('dispute_id'); const rawResponse = await responsePromise.asResponse(); @@ -23,7 +23,7 @@ describe('resource disputes', () => { expect(dataAndResponse.response).toBe(rawResponse); }); - // skipped: tests are disabled for the time being + // Prism tests are disabled test.skip('list', async () => { const responsePromise = client.disputes.list(); const rawResponse = await responsePromise.asResponse(); @@ -35,7 +35,7 @@ describe('resource disputes', () => { expect(dataAndResponse.response).toBe(rawResponse); }); - // skipped: tests are disabled for the time being + // Prism tests are disabled test.skip('list: request options and params are passed correctly', async () => { // ensure the request options are being passed correctly by passing an invalid HTTP method in order to cause an error await expect( diff --git a/tests/api-resources/events/events.test.ts b/tests/api-resources/events/events.test.ts index 93022ef..77509b7 100644 --- a/tests/api-resources/events/events.test.ts +++ b/tests/api-resources/events/events.test.ts @@ -11,7 +11,7 @@ const client = new Hyperswitch({ }); describe('resource events', () => { - // skipped: tests are disabled for the time being + // Prism tests are disabled test.skip('list', async () => { const responsePromise = client.events.list('merchant_id', {}); const rawResponse = await responsePromise.asResponse(); @@ -23,7 +23,7 @@ describe('resource events', () => { expect(dataAndResponse.response).toBe(rawResponse); }); - // skipped: tests are disabled for the time being + // Prism tests are disabled test.skip('deliveryAttempts: only required params', async () => { const responsePromise = client.events.deliveryAttempts('event_id', { merchant_id: 'merchant_id' }); const rawResponse = await responsePromise.asResponse(); @@ -35,12 +35,12 @@ describe('resource events', () => { expect(dataAndResponse.response).toBe(rawResponse); }); - // skipped: tests are disabled for the time being + // Prism tests are disabled test.skip('deliveryAttempts: required and optional params', async () => { const response = await client.events.deliveryAttempts('event_id', { merchant_id: 'merchant_id' }); }); - // skipped: tests are disabled for the time being + // Prism tests are disabled test.skip('retry: only required params', async () => { const responsePromise = client.events.retry('event_id', { merchant_id: 'merchant_id' }); const rawResponse = await responsePromise.asResponse(); @@ -52,7 +52,7 @@ describe('resource events', () => { expect(dataAndResponse.response).toBe(rawResponse); }); - // skipped: tests are disabled for the time being + // Prism tests are disabled test.skip('retry: required and optional params', async () => { const response = await client.events.retry('event_id', { merchant_id: 'merchant_id' }); }); diff --git a/tests/api-resources/events/profile.test.ts b/tests/api-resources/events/profile.test.ts index 3fd49ab..bc5e1cf 100644 --- a/tests/api-resources/events/profile.test.ts +++ b/tests/api-resources/events/profile.test.ts @@ -11,7 +11,7 @@ const client = new Hyperswitch({ }); describe('resource profile', () => { - // skipped: tests are disabled for the time being + // Prism tests are disabled test.skip('list', async () => { const responsePromise = client.events.profile.list({}); const rawResponse = await responsePromise.asResponse(); diff --git a/tests/api-resources/gsm.test.ts b/tests/api-resources/gsm.test.ts index 55fa37f..e91d1b1 100644 --- a/tests/api-resources/gsm.test.ts +++ b/tests/api-resources/gsm.test.ts @@ -11,7 +11,7 @@ const client = new Hyperswitch({ }); describe('resource gsm', () => { - // skipped: tests are disabled for the time being + // Prism tests are disabled test.skip('create: only required params', async () => { const responsePromise = client.gsm.create({ clear_pan_possible: true, @@ -33,7 +33,7 @@ describe('resource gsm', () => { expect(dataAndResponse.response).toBe(rawResponse); }); - // skipped: tests are disabled for the time being + // Prism tests are disabled test.skip('create: required and optional params', async () => { const response = await client.gsm.create({ clear_pan_possible: true, @@ -52,7 +52,7 @@ describe('resource gsm', () => { }); }); - // skipped: tests are disabled for the time being + // Prism tests are disabled test.skip('retrieve: only required params', async () => { const responsePromise = client.gsm.retrieve({ code: 'code', @@ -70,7 +70,7 @@ describe('resource gsm', () => { expect(dataAndResponse.response).toBe(rawResponse); }); - // skipped: tests are disabled for the time being + // Prism tests are disabled test.skip('retrieve: required and optional params', async () => { const response = await client.gsm.retrieve({ code: 'code', @@ -81,7 +81,7 @@ describe('resource gsm', () => { }); }); - // skipped: tests are disabled for the time being + // Prism tests are disabled test.skip('update: only required params', async () => { const responsePromise = client.gsm.update({ code: 'code', @@ -99,7 +99,7 @@ describe('resource gsm', () => { expect(dataAndResponse.response).toBe(rawResponse); }); - // skipped: tests are disabled for the time being + // Prism tests are disabled test.skip('update: required and optional params', async () => { const response = await client.gsm.update({ code: 'code', @@ -118,7 +118,7 @@ describe('resource gsm', () => { }); }); - // skipped: tests are disabled for the time being + // Prism tests are disabled test.skip('delete: only required params', async () => { const responsePromise = client.gsm.delete({ code: 'code', @@ -136,7 +136,7 @@ describe('resource gsm', () => { expect(dataAndResponse.response).toBe(rawResponse); }); - // skipped: tests are disabled for the time being + // Prism tests are disabled test.skip('delete: required and optional params', async () => { const response = await client.gsm.delete({ code: 'code', diff --git a/tests/api-resources/mandates.test.ts b/tests/api-resources/mandates.test.ts index 4adb784..f73e20e 100644 --- a/tests/api-resources/mandates.test.ts +++ b/tests/api-resources/mandates.test.ts @@ -11,7 +11,7 @@ const client = new Hyperswitch({ }); describe('resource mandates', () => { - // skipped: tests are disabled for the time being + // Prism tests are disabled test.skip('retrieve', async () => { const responsePromise = client.mandates.retrieve('mandate_id'); const rawResponse = await responsePromise.asResponse(); @@ -23,7 +23,7 @@ describe('resource mandates', () => { expect(dataAndResponse.response).toBe(rawResponse); }); - // skipped: tests are disabled for the time being + // Prism tests are disabled test.skip('revoke', async () => { const responsePromise = client.mandates.revoke('mandate_id'); const rawResponse = await responsePromise.asResponse(); diff --git a/tests/api-resources/organization.test.ts b/tests/api-resources/organization.test.ts index 393cd39..6032508 100644 --- a/tests/api-resources/organization.test.ts +++ b/tests/api-resources/organization.test.ts @@ -11,7 +11,7 @@ const client = new Hyperswitch({ }); describe('resource organization', () => { - // skipped: tests are disabled for the time being + // Prism tests are disabled test.skip('create: only required params', async () => { const responsePromise = client.organization.create({ organization_name: 'organization_abc' }); const rawResponse = await responsePromise.asResponse(); @@ -23,7 +23,7 @@ describe('resource organization', () => { expect(dataAndResponse.response).toBe(rawResponse); }); - // skipped: tests are disabled for the time being + // Prism tests are disabled test.skip('create: required and optional params', async () => { const response = await client.organization.create({ organization_name: 'organization_abc', @@ -32,7 +32,7 @@ describe('resource organization', () => { }); }); - // skipped: tests are disabled for the time being + // Prism tests are disabled test.skip('retrieve', async () => { const responsePromise = client.organization.retrieve('id'); const rawResponse = await responsePromise.asResponse(); @@ -44,7 +44,7 @@ describe('resource organization', () => { expect(dataAndResponse.response).toBe(rawResponse); }); - // skipped: tests are disabled for the time being + // Prism tests are disabled test.skip('update: only required params', async () => { const responsePromise = client.organization.update('id', { platform_merchant_id: 'platform_merchant_id', @@ -58,7 +58,7 @@ describe('resource organization', () => { expect(dataAndResponse.response).toBe(rawResponse); }); - // skipped: tests are disabled for the time being + // Prism tests are disabled test.skip('update: required and optional params', async () => { const response = await client.organization.update('id', { platform_merchant_id: 'platform_merchant_id', diff --git a/tests/api-resources/payment-link.test.ts b/tests/api-resources/payment-link.test.ts index ea55857..4c946dd 100644 --- a/tests/api-resources/payment-link.test.ts +++ b/tests/api-resources/payment-link.test.ts @@ -11,7 +11,7 @@ const client = new Hyperswitch({ }); describe('resource paymentLink', () => { - // skipped: tests are disabled for the time being + // Prism tests are disabled test.skip('retrieve', async () => { const responsePromise = client.paymentLink.retrieve('payment_link_id'); const rawResponse = await responsePromise.asResponse(); @@ -23,7 +23,7 @@ describe('resource paymentLink', () => { expect(dataAndResponse.response).toBe(rawResponse); }); - // skipped: tests are disabled for the time being + // Prism tests are disabled test.skip('retrieve: request options and params are passed correctly', async () => { // ensure the request options are being passed correctly by passing an invalid HTTP method in order to cause an error await expect( diff --git a/tests/api-resources/payment-methods.test.ts b/tests/api-resources/payment-methods.test.ts index 0eeab77..d5caee4 100644 --- a/tests/api-resources/payment-methods.test.ts +++ b/tests/api-resources/payment-methods.test.ts @@ -11,7 +11,7 @@ const client = new Hyperswitch({ }); describe('resource paymentMethods', () => { - // skipped: tests are disabled for the time being + // Prism tests are disabled test.skip('create: only required params', async () => { const responsePromise = client.paymentMethods.create({ payment_method: 'card' }); const rawResponse = await responsePromise.asResponse(); @@ -23,7 +23,7 @@ describe('resource paymentMethods', () => { expect(dataAndResponse.response).toBe(rawResponse); }); - // skipped: tests are disabled for the time being + // Prism tests are disabled test.skip('create: required and optional params', async () => { const response = await client.paymentMethods.create({ payment_method: 'card', @@ -90,7 +90,7 @@ describe('resource paymentMethods', () => { }); }); - // skipped: tests are disabled for the time being + // Prism tests are disabled test.skip('retrieve', async () => { const responsePromise = client.paymentMethods.retrieve('method_id'); const rawResponse = await responsePromise.asResponse(); @@ -102,7 +102,7 @@ describe('resource paymentMethods', () => { expect(dataAndResponse.response).toBe(rawResponse); }); - // skipped: tests are disabled for the time being + // Prism tests are disabled test.skip('update', async () => { const responsePromise = client.paymentMethods.update('method_id', {}); const rawResponse = await responsePromise.asResponse(); @@ -114,7 +114,7 @@ describe('resource paymentMethods', () => { expect(dataAndResponse.response).toBe(rawResponse); }); - // skipped: tests are disabled for the time being + // Prism tests are disabled test.skip('delete', async () => { const responsePromise = client.paymentMethods.delete('method_id'); const rawResponse = await responsePromise.asResponse(); @@ -126,7 +126,7 @@ describe('resource paymentMethods', () => { expect(dataAndResponse.response).toBe(rawResponse); }); - // skipped: tests are disabled for the time being + // Prism tests are disabled test.skip('setDefault: only required params', async () => { const responsePromise = client.paymentMethods.setDefault('payment_method_id', { customer_id: 'customer_id', @@ -140,7 +140,7 @@ describe('resource paymentMethods', () => { expect(dataAndResponse.response).toBe(rawResponse); }); - // skipped: tests are disabled for the time being + // Prism tests are disabled test.skip('setDefault: required and optional params', async () => { const response = await client.paymentMethods.setDefault('payment_method_id', { customer_id: 'customer_id', diff --git a/tests/api-resources/payments/number-3ds.test.ts b/tests/api-resources/payments/number-3ds.test.ts index fea9e98..f67ebc5 100644 --- a/tests/api-resources/payments/number-3ds.test.ts +++ b/tests/api-resources/payments/number-3ds.test.ts @@ -11,7 +11,7 @@ const client = new Hyperswitch({ }); describe('resource number3DS', () => { - // skipped: tests are disabled for the time being + // Prism tests are disabled test.skip('authenticate: only required params', async () => { const responsePromise = client.payments.number3DS.authenticate('payment_id', { client_secret: 'client_secret', @@ -27,7 +27,7 @@ describe('resource number3DS', () => { expect(dataAndResponse.response).toBe(rawResponse); }); - // skipped: tests are disabled for the time being + // Prism tests are disabled test.skip('authenticate: required and optional params', async () => { const response = await client.payments.number3DS.authenticate('payment_id', { client_secret: 'client_secret', diff --git a/tests/api-resources/payments/payments.test.ts b/tests/api-resources/payments/payments.test.ts index ec2fcb0..fe7697f 100644 --- a/tests/api-resources/payments/payments.test.ts +++ b/tests/api-resources/payments/payments.test.ts @@ -11,7 +11,7 @@ const client = new Hyperswitch({ }); describe('resource payments', () => { - // skipped: tests are disabled for the time being + // Prism tests are disabled test.skip('create: only required params', async () => { const responsePromise = client.payments.create({ amount: 6540, currency: 'USD' }); const rawResponse = await responsePromise.asResponse(); @@ -23,7 +23,7 @@ describe('resource payments', () => { expect(dataAndResponse.response).toBe(rawResponse); }); - // skipped: tests are disabled for the time being + // Prism tests are disabled test.skip('create: required and optional params', async () => { const response = await client.payments.create({ amount: 6540, @@ -277,7 +277,7 @@ describe('resource payments', () => { }); }); - // skipped: tests are disabled for the time being + // Prism tests are disabled test.skip('retrieve', async () => { const responsePromise = client.payments.retrieve('payment_id'); const rawResponse = await responsePromise.asResponse(); @@ -289,7 +289,7 @@ describe('resource payments', () => { expect(dataAndResponse.response).toBe(rawResponse); }); - // skipped: tests are disabled for the time being + // Prism tests are disabled test.skip('retrieve: request options and params are passed correctly', async () => { // ensure the request options are being passed correctly by passing an invalid HTTP method in order to cause an error await expect( @@ -301,7 +301,7 @@ describe('resource payments', () => { ).rejects.toThrow(Hyperswitch.NotFoundError); }); - // skipped: tests are disabled for the time being + // Prism tests are disabled test.skip('update', async () => { const responsePromise = client.payments.update('payment_id', {}); const rawResponse = await responsePromise.asResponse(); @@ -313,7 +313,7 @@ describe('resource payments', () => { expect(dataAndResponse.response).toBe(rawResponse); }); - // skipped: tests are disabled for the time being + // Prism tests are disabled test.skip('list', async () => { const responsePromise = client.payments.list(); const rawResponse = await responsePromise.asResponse(); @@ -325,7 +325,7 @@ describe('resource payments', () => { expect(dataAndResponse.response).toBe(rawResponse); }); - // skipped: tests are disabled for the time being + // Prism tests are disabled test.skip('list: request options and params are passed correctly', async () => { // ensure the request options are being passed correctly by passing an invalid HTTP method in order to cause an error await expect( @@ -346,7 +346,7 @@ describe('resource payments', () => { ).rejects.toThrow(Hyperswitch.NotFoundError); }); - // skipped: tests are disabled for the time being + // Prism tests are disabled test.skip('cancel', async () => { const responsePromise = client.payments.cancel('payment_id', {}); const rawResponse = await responsePromise.asResponse(); @@ -358,7 +358,7 @@ describe('resource payments', () => { expect(dataAndResponse.response).toBe(rawResponse); }); - // skipped: tests are disabled for the time being + // Prism tests are disabled test.skip('capture', async () => { const responsePromise = client.payments.capture('payment_id', {}); const rawResponse = await responsePromise.asResponse(); @@ -370,7 +370,7 @@ describe('resource payments', () => { expect(dataAndResponse.response).toBe(rawResponse); }); - // skipped: tests are disabled for the time being + // Prism tests are disabled test.skip('completeAuthorize: only required params', async () => { const responsePromise = client.payments.completeAuthorize('payment_id', { client_secret: 'client_secret', @@ -384,7 +384,7 @@ describe('resource payments', () => { expect(dataAndResponse.response).toBe(rawResponse); }); - // skipped: tests are disabled for the time being + // Prism tests are disabled test.skip('completeAuthorize: required and optional params', async () => { const response = await client.payments.completeAuthorize('payment_id', { client_secret: 'client_secret', @@ -407,7 +407,7 @@ describe('resource payments', () => { }); }); - // skipped: tests are disabled for the time being + // Prism tests are disabled test.skip('confirm', async () => { const responsePromise = client.payments.confirm('payment_id', {}); const rawResponse = await responsePromise.asResponse(); @@ -419,7 +419,7 @@ describe('resource payments', () => { expect(dataAndResponse.response).toBe(rawResponse); }); - // skipped: tests are disabled for the time being + // Prism tests are disabled test.skip('createSessionToken: only required params', async () => { const responsePromise = client.payments.createSessionToken({ client_secret: 'client_secret', @@ -435,7 +435,7 @@ describe('resource payments', () => { expect(dataAndResponse.response).toBe(rawResponse); }); - // skipped: tests are disabled for the time being + // Prism tests are disabled test.skip('createSessionToken: required and optional params', async () => { const response = await client.payments.createSessionToken({ client_secret: 'client_secret', @@ -448,7 +448,7 @@ describe('resource payments', () => { }); }); - // skipped: tests are disabled for the time being + // Prism tests are disabled test.skip('incrementalAuthorization: only required params', async () => { const responsePromise = client.payments.incrementalAuthorization('payment_id', { amount: 6540 }); const rawResponse = await responsePromise.asResponse(); @@ -460,7 +460,7 @@ describe('resource payments', () => { expect(dataAndResponse.response).toBe(rawResponse); }); - // skipped: tests are disabled for the time being + // Prism tests are disabled test.skip('incrementalAuthorization: required and optional params', async () => { const response = await client.payments.incrementalAuthorization('payment_id', { amount: 6540, @@ -468,7 +468,7 @@ describe('resource payments', () => { }); }); - // skipped: tests are disabled for the time being + // Prism tests are disabled test.skip('postSessionTokens: only required params', async () => { const responsePromise = client.payments.postSessionTokens('payment_id', { client_secret: 'client_secret', @@ -484,7 +484,7 @@ describe('resource payments', () => { expect(dataAndResponse.response).toBe(rawResponse); }); - // skipped: tests are disabled for the time being + // Prism tests are disabled test.skip('postSessionTokens: required and optional params', async () => { const response = await client.payments.postSessionTokens('payment_id', { client_secret: 'client_secret', @@ -493,7 +493,7 @@ describe('resource payments', () => { }); }); - // skipped: tests are disabled for the time being + // Prism tests are disabled test.skip('updateMetadata: only required params', async () => { const responsePromise = client.payments.updateMetadata('payment_id', { metadata: {} }); const rawResponse = await responsePromise.asResponse(); @@ -505,7 +505,7 @@ describe('resource payments', () => { expect(dataAndResponse.response).toBe(rawResponse); }); - // skipped: tests are disabled for the time being + // Prism tests are disabled test.skip('updateMetadata: required and optional params', async () => { const response = await client.payments.updateMetadata('payment_id', { metadata: {} }); }); diff --git a/tests/api-resources/payouts/list.test.ts b/tests/api-resources/payouts/list.test.ts index 2f37f81..193dd57 100644 --- a/tests/api-resources/payouts/list.test.ts +++ b/tests/api-resources/payouts/list.test.ts @@ -11,7 +11,7 @@ const client = new Hyperswitch({ }); describe('resource list', () => { - // skipped: tests are disabled for the time being + // Prism tests are disabled test.skip('retrieve: only required params', async () => { const responsePromise = client.payouts.list.retrieve({ created: 'created', @@ -30,7 +30,7 @@ describe('resource list', () => { expect(dataAndResponse.response).toBe(rawResponse); }); - // skipped: tests are disabled for the time being + // Prism tests are disabled test.skip('retrieve: required and optional params', async () => { const response = await client.payouts.list.retrieve({ created: 'created', @@ -42,7 +42,7 @@ describe('resource list', () => { }); }); - // skipped: tests are disabled for the time being + // Prism tests are disabled test.skip('withFilters: only required params', async () => { const responsePromise = client.payouts.list.withFilters({ currency: 'AED', @@ -58,7 +58,7 @@ describe('resource list', () => { expect(dataAndResponse.response).toBe(rawResponse); }); - // skipped: tests are disabled for the time being + // Prism tests are disabled test.skip('withFilters: required and optional params', async () => { const response = await client.payouts.list.withFilters({ currency: 'AED', diff --git a/tests/api-resources/payouts/payouts.test.ts b/tests/api-resources/payouts/payouts.test.ts index ccd2d38..3ef1a48 100644 --- a/tests/api-resources/payouts/payouts.test.ts +++ b/tests/api-resources/payouts/payouts.test.ts @@ -11,7 +11,7 @@ const client = new Hyperswitch({ }); describe('resource payouts', () => { - // skipped: tests are disabled for the time being + // Prism tests are disabled test.skip('create: only required params', async () => { const responsePromise = client.payouts.create({ amount: 0, currency: 'AED' }); const rawResponse = await responsePromise.asResponse(); @@ -23,7 +23,7 @@ describe('resource payouts', () => { expect(dataAndResponse.response).toBe(rawResponse); }); - // skipped: tests are disabled for the time being + // Prism tests are disabled test.skip('create: required and optional params', async () => { const response = await client.payouts.create({ amount: 0, @@ -96,7 +96,7 @@ describe('resource payouts', () => { }); }); - // skipped: tests are disabled for the time being + // Prism tests are disabled test.skip('retrieve', async () => { const responsePromise = client.payouts.retrieve('payout_id'); const rawResponse = await responsePromise.asResponse(); @@ -108,7 +108,7 @@ describe('resource payouts', () => { expect(dataAndResponse.response).toBe(rawResponse); }); - // skipped: tests are disabled for the time being + // Prism tests are disabled test.skip('retrieve: request options and params are passed correctly', async () => { // ensure the request options are being passed correctly by passing an invalid HTTP method in order to cause an error await expect( @@ -116,7 +116,7 @@ describe('resource payouts', () => { ).rejects.toThrow(Hyperswitch.NotFoundError); }); - // skipped: tests are disabled for the time being + // Prism tests are disabled test.skip('update', async () => { const responsePromise = client.payouts.update('payout_id', {}); const rawResponse = await responsePromise.asResponse(); @@ -128,7 +128,7 @@ describe('resource payouts', () => { expect(dataAndResponse.response).toBe(rawResponse); }); - // skipped: tests are disabled for the time being + // Prism tests are disabled test.skip('cancel: only required params', async () => { const responsePromise = client.payouts.cancel('payout_id', { body_payout_id: 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx', @@ -142,14 +142,14 @@ describe('resource payouts', () => { expect(dataAndResponse.response).toBe(rawResponse); }); - // skipped: tests are disabled for the time being + // Prism tests are disabled test.skip('cancel: required and optional params', async () => { const response = await client.payouts.cancel('payout_id', { body_payout_id: 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx', }); }); - // skipped: tests are disabled for the time being + // Prism tests are disabled test.skip('confirm: only required params', async () => { const responsePromise = client.payouts.confirm('payout_id', { client_secret: 'client_secret' }); const rawResponse = await responsePromise.asResponse(); @@ -161,7 +161,7 @@ describe('resource payouts', () => { expect(dataAndResponse.response).toBe(rawResponse); }); - // skipped: tests are disabled for the time being + // Prism tests are disabled test.skip('confirm: required and optional params', async () => { const response = await client.payouts.confirm('payout_id', { client_secret: 'client_secret', @@ -234,7 +234,7 @@ describe('resource payouts', () => { }); }); - // skipped: tests are disabled for the time being + // Prism tests are disabled test.skip('fulfill: only required params', async () => { const responsePromise = client.payouts.fulfill('payout_id', { body_payout_id: 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx', @@ -248,14 +248,14 @@ describe('resource payouts', () => { expect(dataAndResponse.response).toBe(rawResponse); }); - // skipped: tests are disabled for the time being + // Prism tests are disabled test.skip('fulfill: required and optional params', async () => { const response = await client.payouts.fulfill('payout_id', { body_payout_id: 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx', }); }); - // skipped: tests are disabled for the time being + // Prism tests are disabled test.skip('listFilters: only required params', async () => { const responsePromise = client.payouts.listFilters({ start_time: '2019-12-27T18:11:19.117Z' }); const rawResponse = await responsePromise.asResponse(); @@ -267,7 +267,7 @@ describe('resource payouts', () => { expect(dataAndResponse.response).toBe(rawResponse); }); - // skipped: tests are disabled for the time being + // Prism tests are disabled test.skip('listFilters: required and optional params', async () => { const response = await client.payouts.listFilters({ start_time: '2019-12-27T18:11:19.117Z', diff --git a/tests/api-resources/poll.test.ts b/tests/api-resources/poll.test.ts index 42c9824..4d7a6d7 100644 --- a/tests/api-resources/poll.test.ts +++ b/tests/api-resources/poll.test.ts @@ -11,7 +11,7 @@ const client = new Hyperswitch({ }); describe('resource poll', () => { - // skipped: tests are disabled for the time being + // Prism tests are disabled test.skip('retrieveStatus', async () => { const responsePromise = client.poll.retrieveStatus('poll_id'); const rawResponse = await responsePromise.asResponse(); diff --git a/tests/api-resources/profile-acquirers.test.ts b/tests/api-resources/profile-acquirers.test.ts index 7038cb2..5fb16ed 100644 --- a/tests/api-resources/profile-acquirers.test.ts +++ b/tests/api-resources/profile-acquirers.test.ts @@ -11,7 +11,7 @@ const client = new Hyperswitch({ }); describe('resource profileAcquirers', () => { - // skipped: tests are disabled for the time being + // Prism tests are disabled test.skip('create: only required params', async () => { const responsePromise = client.profileAcquirers.create({ acquirer_assigned_merchant_id: 'M123456789', @@ -31,7 +31,7 @@ describe('resource profileAcquirers', () => { expect(dataAndResponse.response).toBe(rawResponse); }); - // skipped: tests are disabled for the time being + // Prism tests are disabled test.skip('create: required and optional params', async () => { const response = await client.profileAcquirers.create({ acquirer_assigned_merchant_id: 'M123456789', @@ -45,7 +45,7 @@ describe('resource profileAcquirers', () => { }); }); - // skipped: tests are disabled for the time being + // Prism tests are disabled test.skip('update: only required params', async () => { const responsePromise = client.profileAcquirers.update('profile_acquirer_id', { profile_id: 'profile_id', @@ -59,7 +59,7 @@ describe('resource profileAcquirers', () => { expect(dataAndResponse.response).toBe(rawResponse); }); - // skipped: tests are disabled for the time being + // Prism tests are disabled test.skip('update: required and optional params', async () => { const response = await client.profileAcquirers.update('profile_acquirer_id', { profile_id: 'profile_id', diff --git a/tests/api-resources/refunds.test.ts b/tests/api-resources/refunds.test.ts index c307aac..791661f 100644 --- a/tests/api-resources/refunds.test.ts +++ b/tests/api-resources/refunds.test.ts @@ -11,7 +11,7 @@ const client = new Hyperswitch({ }); describe('resource refunds', () => { - // skipped: tests are disabled for the time being + // Prism tests are disabled test.skip('create: only required params', async () => { const responsePromise = client.refunds.create({ payment_id: 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx' }); const rawResponse = await responsePromise.asResponse(); @@ -23,7 +23,7 @@ describe('resource refunds', () => { expect(dataAndResponse.response).toBe(rawResponse); }); - // skipped: tests are disabled for the time being + // Prism tests are disabled test.skip('create: required and optional params', async () => { const response = await client.refunds.create({ payment_id: 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx', @@ -41,7 +41,7 @@ describe('resource refunds', () => { }); }); - // skipped: tests are disabled for the time being + // Prism tests are disabled test.skip('retrieve', async () => { const responsePromise = client.refunds.retrieve('refund_id'); const rawResponse = await responsePromise.asResponse(); @@ -53,7 +53,7 @@ describe('resource refunds', () => { expect(dataAndResponse.response).toBe(rawResponse); }); - // skipped: tests are disabled for the time being + // Prism tests are disabled test.skip('update', async () => { const responsePromise = client.refunds.update('refund_id', {}); const rawResponse = await responsePromise.asResponse(); @@ -65,7 +65,7 @@ describe('resource refunds', () => { expect(dataAndResponse.response).toBe(rawResponse); }); - // skipped: tests are disabled for the time being + // Prism tests are disabled test.skip('list: only required params', async () => { const responsePromise = client.refunds.list({ start_time: '2019-12-27T18:11:19.117Z' }); const rawResponse = await responsePromise.asResponse(); @@ -77,7 +77,7 @@ describe('resource refunds', () => { expect(dataAndResponse.response).toBe(rawResponse); }); - // skipped: tests are disabled for the time being + // Prism tests are disabled test.skip('list: required and optional params', async () => { const response = await client.refunds.list({ start_time: '2019-12-27T18:11:19.117Z', diff --git a/tests/api-resources/relay.test.ts b/tests/api-resources/relay.test.ts index a284b9c..736773d 100644 --- a/tests/api-resources/relay.test.ts +++ b/tests/api-resources/relay.test.ts @@ -11,7 +11,7 @@ const client = new Hyperswitch({ }); describe('resource relay', () => { - // skipped: tests are disabled for the time being + // Prism tests are disabled test.skip('create: only required params', async () => { const responsePromise = client.relay.create({ connector_id: 'mca_5apGeP94tMts6rg3U3kR', @@ -29,7 +29,7 @@ describe('resource relay', () => { expect(dataAndResponse.response).toBe(rawResponse); }); - // skipped: tests are disabled for the time being + // Prism tests are disabled test.skip('create: required and optional params', async () => { const response = await client.relay.create({ connector_id: 'mca_5apGeP94tMts6rg3U3kR', @@ -41,7 +41,7 @@ describe('resource relay', () => { }); }); - // skipped: tests are disabled for the time being + // Prism tests are disabled test.skip('retrieve: only required params', async () => { const responsePromise = client.relay.retrieve('relay_id', { 'X-Profile-Id': 'X-Profile-Id' }); const rawResponse = await responsePromise.asResponse(); @@ -53,7 +53,7 @@ describe('resource relay', () => { expect(dataAndResponse.response).toBe(rawResponse); }); - // skipped: tests are disabled for the time being + // Prism tests are disabled test.skip('retrieve: required and optional params', async () => { const response = await client.relay.retrieve('relay_id', { 'X-Profile-Id': 'X-Profile-Id' }); }); diff --git a/tests/api-resources/routing/default/default.test.ts b/tests/api-resources/routing/default/default.test.ts index b9f8456..0af6332 100644 --- a/tests/api-resources/routing/default/default.test.ts +++ b/tests/api-resources/routing/default/default.test.ts @@ -11,7 +11,7 @@ const client = new Hyperswitch({ }); describe('resource default', () => { - // skipped: tests are disabled for the time being + // Prism tests are disabled test.skip('retrieve', async () => { const responsePromise = client.routing.default.retrieve(); const rawResponse = await responsePromise.asResponse(); @@ -23,7 +23,7 @@ describe('resource default', () => { expect(dataAndResponse.response).toBe(rawResponse); }); - // skipped: tests are disabled for the time being + // Prism tests are disabled test.skip('update: only required params', async () => { const responsePromise = client.routing.default.update({ body: [{ connector: 'adyenplatform' }] }); const rawResponse = await responsePromise.asResponse(); @@ -35,7 +35,7 @@ describe('resource default', () => { expect(dataAndResponse.response).toBe(rawResponse); }); - // skipped: tests are disabled for the time being + // Prism tests are disabled test.skip('update: required and optional params', async () => { const response = await client.routing.default.update({ body: [{ connector: 'adyenplatform', merchant_connector_id: 'merchant_connector_id' }], diff --git a/tests/api-resources/routing/default/profile.test.ts b/tests/api-resources/routing/default/profile.test.ts index 6c22d81..ce8732b 100644 --- a/tests/api-resources/routing/default/profile.test.ts +++ b/tests/api-resources/routing/default/profile.test.ts @@ -11,7 +11,7 @@ const client = new Hyperswitch({ }); describe('resource profile', () => { - // skipped: tests are disabled for the time being + // Prism tests are disabled test.skip('retrieve', async () => { const responsePromise = client.routing.default.profile.retrieve(); const rawResponse = await responsePromise.asResponse(); @@ -23,7 +23,7 @@ describe('resource profile', () => { expect(dataAndResponse.response).toBe(rawResponse); }); - // skipped: tests are disabled for the time being + // Prism tests are disabled test.skip('update: only required params', async () => { const responsePromise = client.routing.default.profile.update('profile_id', { body: [{ connector: 'adyenplatform' }], @@ -37,7 +37,7 @@ describe('resource profile', () => { expect(dataAndResponse.response).toBe(rawResponse); }); - // skipped: tests are disabled for the time being + // Prism tests are disabled test.skip('update: required and optional params', async () => { const response = await client.routing.default.profile.update('profile_id', { body: [{ connector: 'adyenplatform', merchant_connector_id: 'merchant_connector_id' }], diff --git a/tests/api-resources/routing/routing.test.ts b/tests/api-resources/routing/routing.test.ts index 82fa850..2dfc854 100644 --- a/tests/api-resources/routing/routing.test.ts +++ b/tests/api-resources/routing/routing.test.ts @@ -11,7 +11,7 @@ const client = new Hyperswitch({ }); describe('resource routing', () => { - // skipped: tests are disabled for the time being + // Prism tests are disabled test.skip('create', async () => { const responsePromise = client.routing.create({}); const rawResponse = await responsePromise.asResponse(); @@ -23,7 +23,7 @@ describe('resource routing', () => { expect(dataAndResponse.response).toBe(rawResponse); }); - // skipped: tests are disabled for the time being + // Prism tests are disabled test.skip('retrieve', async () => { const responsePromise = client.routing.retrieve('routing_algorithm_id'); const rawResponse = await responsePromise.asResponse(); @@ -35,7 +35,7 @@ describe('resource routing', () => { expect(dataAndResponse.response).toBe(rawResponse); }); - // skipped: tests are disabled for the time being + // Prism tests are disabled test.skip('list', async () => { const responsePromise = client.routing.list(); const rawResponse = await responsePromise.asResponse(); @@ -47,7 +47,7 @@ describe('resource routing', () => { expect(dataAndResponse.response).toBe(rawResponse); }); - // skipped: tests are disabled for the time being + // Prism tests are disabled test.skip('list: request options and params are passed correctly', async () => { // ensure the request options are being passed correctly by passing an invalid HTTP method in order to cause an error await expect( @@ -58,7 +58,7 @@ describe('resource routing', () => { ).rejects.toThrow(Hyperswitch.NotFoundError); }); - // skipped: tests are disabled for the time being + // Prism tests are disabled test.skip('activate', async () => { const responsePromise = client.routing.activate('routing_algorithm_id'); const rawResponse = await responsePromise.asResponse(); @@ -70,7 +70,7 @@ describe('resource routing', () => { expect(dataAndResponse.response).toBe(rawResponse); }); - // skipped: tests are disabled for the time being + // Prism tests are disabled test.skip('deactivate', async () => { const responsePromise = client.routing.deactivate({}); const rawResponse = await responsePromise.asResponse(); @@ -82,7 +82,7 @@ describe('resource routing', () => { expect(dataAndResponse.response).toBe(rawResponse); }); - // skipped: tests are disabled for the time being + // Prism tests are disabled test.skip('retrieveActive', async () => { const responsePromise = client.routing.retrieveActive(); const rawResponse = await responsePromise.asResponse(); @@ -94,7 +94,7 @@ describe('resource routing', () => { expect(dataAndResponse.response).toBe(rawResponse); }); - // skipped: tests are disabled for the time being + // Prism tests are disabled test.skip('retrieveActive: request options and params are passed correctly', async () => { // ensure the request options are being passed correctly by passing an invalid HTTP method in order to cause an error await expect( diff --git a/tests/api-resources/three-ds-decision.test.ts b/tests/api-resources/three-ds-decision.test.ts index dddcdb7..b87459d 100644 --- a/tests/api-resources/three-ds-decision.test.ts +++ b/tests/api-resources/three-ds-decision.test.ts @@ -11,7 +11,7 @@ const client = new Hyperswitch({ }); describe('resource threeDSDecision', () => { - // skipped: tests are disabled for the time being + // Prism tests are disabled test.skip('execute: only required params', async () => { const responsePromise = client.threeDSDecision.execute({ payment: { amount: 0, currency: 'AED' }, @@ -26,7 +26,7 @@ describe('resource threeDSDecision', () => { expect(dataAndResponse.response).toBe(rawResponse); }); - // skipped: tests are disabled for the time being + // Prism tests are disabled test.skip('execute: required and optional params', async () => { const response = await client.threeDSDecision.execute({ payment: { amount: 0, currency: 'AED' }, From 83fdd3e24c87d99e52db624917a1dd85d5fd5952 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 14 Aug 2025 04:27:45 +0000 Subject: [PATCH 24/44] chore(mcp): minor cleanup of types and package.json --- packages/mcp-server/package.json | 1 + packages/mcp-server/src/http.ts | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/mcp-server/package.json b/packages/mcp-server/package.json index 684a4c4..e0958b1 100644 --- a/packages/mcp-server/package.json +++ b/packages/mcp-server/package.json @@ -42,6 +42,7 @@ "devDependencies": { "@types/jest": "^29.4.0", "@types/express": "^5.0.3", + "@types/yargs": "^17.0.8", "@typescript-eslint/eslint-plugin": "8.31.1", "@typescript-eslint/parser": "8.31.1", "eslint": "^8.49.0", diff --git a/packages/mcp-server/src/http.ts b/packages/mcp-server/src/http.ts index 900e131..e188c9e 100644 --- a/packages/mcp-server/src/http.ts +++ b/packages/mcp-server/src/http.ts @@ -69,7 +69,7 @@ const del = async (req: express.Request, res: express.Response) => { }); }; -export const streamableHTTPApp = (options: McpOptions) => { +export const streamableHTTPApp = (options: McpOptions): express.Express => { const app = express(); app.use(express.json()); From 1f0943926f80c18063262273840e96fc6bc98876 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 15 Aug 2025 03:09:25 +0000 Subject: [PATCH 25/44] fix(mcp): generate additionalProperties=true for map schemas to avoid validation issues --- .../create-accounts-business-profile.ts | 10 ++++ .../update-accounts-business-profile.ts | 10 ++++ .../connectors/create-accounts-connectors.ts | 9 ++++ .../connectors/update-accounts-connectors.ts | 9 ++++ .../src/tools/accounts/create-accounts.ts | 5 ++ .../src/tools/accounts/update-accounts.ts | 5 ++ .../src/tools/customers/create-customers.ts | 1 + .../src/tools/customers/list-customers.ts | 2 +- .../src/tools/customers/retrieve-customers.ts | 2 +- .../src/tools/customers/update-customers.ts | 1 + .../tools/organization/create-organization.ts | 4 +- .../organization/retrieve-organization.ts | 2 +- .../tools/organization/update-organization.ts | 4 +- .../payment-methods/create-payment-methods.ts | 1 + .../src/tools/payments/cancel-payments.ts | 2 + .../src/tools/payments/capture-payments.ts | 2 + .../src/tools/payments/confirm-payments.ts | 51 +++++++++++++++++++ .../src/tools/payments/create-payments.ts | 51 +++++++++++++++++++ .../payments/create-session-token-payments.ts | 2 + .../authenticate-payments-number-3ds.ts | 1 + .../payments/update-metadata-payments.ts | 3 +- .../src/tools/payments/update-payments.ts | 51 +++++++++++++++++++ .../src/tools/payouts/confirm-payouts.ts | 4 ++ .../src/tools/payouts/create-payouts.ts | 4 ++ .../src/tools/payouts/update-payouts.ts | 4 ++ .../src/tools/refunds/create-refunds.ts | 3 ++ .../src/tools/refunds/retrieve-refunds.ts | 2 +- .../src/tools/refunds/update-refunds.ts | 3 +- .../src/tools/routing/create-routing.ts | 3 ++ .../src/tools/routing/deactivate-routing.ts | 3 ++ 30 files changed, 246 insertions(+), 8 deletions(-) diff --git a/packages/mcp-server/src/tools/accounts/business-profile/create-accounts-business-profile.ts b/packages/mcp-server/src/tools/accounts/business-profile/create-accounts-business-profile.ts index 26e1d18..20236c2 100644 --- a/packages/mcp-server/src/tools/accounts/business-profile/create-accounts-business-profile.ts +++ b/packages/mcp-server/src/tools/accounts/business-profile/create-accounts-business-profile.ts @@ -50,6 +50,7 @@ export const tool: Tool = { authentication_product_ids: { type: 'object', description: 'Product authentication ids', + additionalProperties: true, }, card_testing_guard_config: { $ref: '#/$defs/card_testing_guard_config', @@ -75,6 +76,7 @@ export const tool: Tool = { frm_routing_algorithm: { type: 'object', description: "The frm routing algorithm to be used for routing payments to desired FRM's", + additionalProperties: true, }, intent_fulfillment_time: { type: 'integer', @@ -132,11 +134,13 @@ export const tool: Tool = { metadata: { type: 'object', description: 'Metadata is useful for storing additional, unstructured information on an object.', + additionalProperties: true, }, outgoing_webhook_custom_http_headers: { type: 'object', description: 'These key-value pairs are sent as additional custom headers in the outgoing webhook request. It is recommended not to use more than four key-value pairs.', + additionalProperties: true, }, payment_link_config: { $ref: '#/$defs/business_payment_link_config', @@ -167,6 +171,7 @@ export const tool: Tool = { routing_algorithm: { type: 'object', description: 'The routing algorithm to be used for routing payments to desired connectors', + additionalProperties: true, }, session_expiry: { type: 'integer', @@ -653,6 +658,7 @@ export const tool: Tool = { payment_link_ui_rules: { type: 'object', description: 'Payment link configuration rules', + additionalProperties: true, }, sdk_layout: { type: 'string', @@ -661,6 +667,7 @@ export const tool: Tool = { sdk_ui_rules: { type: 'object', description: 'SDK configuration rules', + additionalProperties: true, }, seller_name: { type: 'string', @@ -813,6 +820,7 @@ export const tool: Tool = { }, metadata: { type: 'object', + additionalProperties: true, }, rules: { type: 'object', @@ -863,6 +871,7 @@ export const tool: Tool = { }, metadata: { type: 'object', + additionalProperties: true, }, rules: { type: 'object', @@ -1089,6 +1098,7 @@ export const tool: Tool = { type: 'object', description: 'Additional metadata that the Static Analyzer and Backend does not touch.\nThis can be used to store useful information for the frontend and is required for communication\nbetween the static analyzer and the frontend.', + additionalProperties: true, }, value: { anyOf: [ diff --git a/packages/mcp-server/src/tools/accounts/business-profile/update-accounts-business-profile.ts b/packages/mcp-server/src/tools/accounts/business-profile/update-accounts-business-profile.ts index 23b074d..5e75862 100644 --- a/packages/mcp-server/src/tools/accounts/business-profile/update-accounts-business-profile.ts +++ b/packages/mcp-server/src/tools/accounts/business-profile/update-accounts-business-profile.ts @@ -53,6 +53,7 @@ export const tool: Tool = { authentication_product_ids: { type: 'object', description: 'Product authentication ids', + additionalProperties: true, }, card_testing_guard_config: { $ref: '#/$defs/card_testing_guard_config', @@ -78,6 +79,7 @@ export const tool: Tool = { frm_routing_algorithm: { type: 'object', description: "The frm routing algorithm to be used for routing payments to desired FRM's", + additionalProperties: true, }, intent_fulfillment_time: { type: 'integer', @@ -135,11 +137,13 @@ export const tool: Tool = { metadata: { type: 'object', description: 'Metadata is useful for storing additional, unstructured information on an object.', + additionalProperties: true, }, outgoing_webhook_custom_http_headers: { type: 'object', description: 'These key-value pairs are sent as additional custom headers in the outgoing webhook request. It is recommended not to use more than four key-value pairs.', + additionalProperties: true, }, payment_link_config: { $ref: '#/$defs/business_payment_link_config', @@ -170,6 +174,7 @@ export const tool: Tool = { routing_algorithm: { type: 'object', description: 'The routing algorithm to be used for routing payments to desired connectors', + additionalProperties: true, }, session_expiry: { type: 'integer', @@ -656,6 +661,7 @@ export const tool: Tool = { payment_link_ui_rules: { type: 'object', description: 'Payment link configuration rules', + additionalProperties: true, }, sdk_layout: { type: 'string', @@ -664,6 +670,7 @@ export const tool: Tool = { sdk_ui_rules: { type: 'object', description: 'SDK configuration rules', + additionalProperties: true, }, seller_name: { type: 'string', @@ -816,6 +823,7 @@ export const tool: Tool = { }, metadata: { type: 'object', + additionalProperties: true, }, rules: { type: 'object', @@ -866,6 +874,7 @@ export const tool: Tool = { }, metadata: { type: 'object', + additionalProperties: true, }, rules: { type: 'object', @@ -1092,6 +1101,7 @@ export const tool: Tool = { type: 'object', description: 'Additional metadata that the Static Analyzer and Backend does not touch.\nThis can be used to store useful information for the frontend and is required for communication\nbetween the static analyzer and the frontend.', + additionalProperties: true, }, value: { anyOf: [ diff --git a/packages/mcp-server/src/tools/accounts/connectors/create-accounts-connectors.ts b/packages/mcp-server/src/tools/accounts/connectors/create-accounts-connectors.ts index 197a6dc..4bb88b4 100644 --- a/packages/mcp-server/src/tools/accounts/connectors/create-accounts-connectors.ts +++ b/packages/mcp-server/src/tools/accounts/connectors/create-accounts-connectors.ts @@ -79,6 +79,7 @@ export const tool: Tool = { metadata: { type: 'object', description: 'Metadata is useful for storing additional, unstructured information on an object.', + additionalProperties: true, }, payment_methods_enabled: { type: 'array', @@ -90,6 +91,7 @@ export const tool: Tool = { }, pm_auth_config: { type: 'object', + additionalProperties: true, }, profile_id: { type: 'string', @@ -742,10 +744,12 @@ export const tool: Tool = { type: 'object', description: 'Account details of the Connector. You can specify up to 50 keys, with key names up to 40 characters long and values up to 500 characters long. Useful for storing additional, structured information on an object.', + additionalProperties: true, }, metadata: { type: 'object', description: 'Metadata is useful for storing additional, unstructured information on an object.', + additionalProperties: true, }, }, }, @@ -756,23 +760,28 @@ export const tool: Tool = { type: 'object', description: 'This field is for our legacy Apple Pay flow that contains the Apple Pay certificates and credentials for only iOS Apple Pay flow', + additionalProperties: true, }, apple_pay_combined: { type: 'object', description: 'This field contains the Apple Pay certificates and credentials for iOS and Web Apple Pay flow', + additionalProperties: true, }, google_pay: { type: 'object', description: 'This field contains the Google Pay certificates and credentials', + additionalProperties: true, }, paze: { type: 'object', description: 'This field contains the Paze certificates and credentials', + additionalProperties: true, }, samsung_pay: { type: 'object', description: 'This field contains the Samsung Pay certificates and credentials', + additionalProperties: true, }, }, }, diff --git a/packages/mcp-server/src/tools/accounts/connectors/update-accounts-connectors.ts b/packages/mcp-server/src/tools/accounts/connectors/update-accounts-connectors.ts index 3666d99..8dc70f5 100644 --- a/packages/mcp-server/src/tools/accounts/connectors/update-accounts-connectors.ts +++ b/packages/mcp-server/src/tools/accounts/connectors/update-accounts-connectors.ts @@ -65,6 +65,7 @@ export const tool: Tool = { metadata: { type: 'object', description: 'Metadata is useful for storing additional, unstructured information on an object.', + additionalProperties: true, }, payment_methods_enabled: { type: 'array', @@ -78,6 +79,7 @@ export const tool: Tool = { type: 'object', description: 'pm_auth_config will relate MCA records to their respective chosen auth services, based on payment_method and pmt', + additionalProperties: true, }, test_mode: { type: 'boolean', @@ -360,10 +362,12 @@ export const tool: Tool = { type: 'object', description: 'Account details of the Connector. You can specify up to 50 keys, with key names up to 40 characters long and values up to 500 characters long. Useful for storing additional, structured information on an object.', + additionalProperties: true, }, metadata: { type: 'object', description: 'Metadata is useful for storing additional, unstructured information on an object.', + additionalProperties: true, }, }, }, @@ -374,23 +378,28 @@ export const tool: Tool = { type: 'object', description: 'This field is for our legacy Apple Pay flow that contains the Apple Pay certificates and credentials for only iOS Apple Pay flow', + additionalProperties: true, }, apple_pay_combined: { type: 'object', description: 'This field contains the Apple Pay certificates and credentials for iOS and Web Apple Pay flow', + additionalProperties: true, }, google_pay: { type: 'object', description: 'This field contains the Google Pay certificates and credentials', + additionalProperties: true, }, paze: { type: 'object', description: 'This field contains the Paze certificates and credentials', + additionalProperties: true, }, samsung_pay: { type: 'object', description: 'This field contains the Samsung Pay certificates and credentials', + additionalProperties: true, }, }, }, diff --git a/packages/mcp-server/src/tools/accounts/create-accounts.ts b/packages/mcp-server/src/tools/accounts/create-accounts.ts index c289ea1..864ff6b 100644 --- a/packages/mcp-server/src/tools/accounts/create-accounts.ts +++ b/packages/mcp-server/src/tools/accounts/create-accounts.ts @@ -32,6 +32,7 @@ export const tool: Tool = { frm_routing_algorithm: { type: 'object', description: "The frm routing algorithm to be used for routing payments to desired FRM's", + additionalProperties: true, }, locker_id: { type: 'string', @@ -51,6 +52,7 @@ export const tool: Tool = { metadata: { type: 'object', description: 'Metadata is useful for storing additional, unstructured information on an object', + additionalProperties: true, }, organization_id: { type: 'string', @@ -499,6 +501,7 @@ export const tool: Tool = { }, metadata: { type: 'object', + additionalProperties: true, }, rules: { type: 'object', @@ -549,6 +552,7 @@ export const tool: Tool = { }, metadata: { type: 'object', + additionalProperties: true, }, rules: { type: 'object', @@ -775,6 +779,7 @@ export const tool: Tool = { type: 'object', description: 'Additional metadata that the Static Analyzer and Backend does not touch.\nThis can be used to store useful information for the frontend and is required for communication\nbetween the static analyzer and the frontend.', + additionalProperties: true, }, value: { anyOf: [ diff --git a/packages/mcp-server/src/tools/accounts/update-accounts.ts b/packages/mcp-server/src/tools/accounts/update-accounts.ts index e1fa43c..2080659 100644 --- a/packages/mcp-server/src/tools/accounts/update-accounts.ts +++ b/packages/mcp-server/src/tools/accounts/update-accounts.ts @@ -39,6 +39,7 @@ export const tool: Tool = { frm_routing_algorithm: { type: 'object', description: "The frm routing algorithm to be used for routing payments to desired FRM's", + additionalProperties: true, }, locker_id: { type: 'string', @@ -54,6 +55,7 @@ export const tool: Tool = { metadata: { type: 'object', description: 'Metadata is useful for storing additional, unstructured information on an object.', + additionalProperties: true, }, parent_merchant_id: { type: 'string', @@ -496,6 +498,7 @@ export const tool: Tool = { }, metadata: { type: 'object', + additionalProperties: true, }, rules: { type: 'object', @@ -546,6 +549,7 @@ export const tool: Tool = { }, metadata: { type: 'object', + additionalProperties: true, }, rules: { type: 'object', @@ -772,6 +776,7 @@ export const tool: Tool = { type: 'object', description: 'Additional metadata that the Static Analyzer and Backend does not touch.\nThis can be used to store useful information for the frontend and is required for communication\nbetween the static analyzer and the frontend.', + additionalProperties: true, }, value: { anyOf: [ diff --git a/packages/mcp-server/src/tools/customers/create-customers.ts b/packages/mcp-server/src/tools/customers/create-customers.ts index e3bbf2d..f52b459 100644 --- a/packages/mcp-server/src/tools/customers/create-customers.ts +++ b/packages/mcp-server/src/tools/customers/create-customers.ts @@ -41,6 +41,7 @@ export const tool: Tool = { type: 'object', description: 'You can specify up to 50 keys, with key names up to 40 characters long and values up to 500\ncharacters long. Metadata is useful for storing additional, structured information on an\nobject.', + additionalProperties: true, }, name: { type: 'string', diff --git a/packages/mcp-server/src/tools/customers/list-customers.ts b/packages/mcp-server/src/tools/customers/list-customers.ts index 8cc490b..51eba2b 100644 --- a/packages/mcp-server/src/tools/customers/list-customers.ts +++ b/packages/mcp-server/src/tools/customers/list-customers.ts @@ -18,7 +18,7 @@ export const metadata: Metadata = { export const tool: Tool = { name: 'list_customers', description: - "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\nLists all the customers for a particular merchant id.\n\n# Response Schema\n```json\n{\n type: 'array',\n items: {\n $ref: '#/$defs/customer'\n },\n $defs: {\n customer: {\n type: 'object',\n properties: {\n created_at: {\n type: 'string',\n description: 'A timestamp (ISO 8601 code) that determines when the customer was created',\n format: 'date-time'\n },\n customer_id: {\n type: 'string',\n description: 'The identifier for the customer object'\n },\n address: {\n $ref: '#/$defs/address_details'\n },\n default_payment_method_id: {\n type: 'string',\n description: 'The identifier for the default payment method.'\n },\n description: {\n type: 'string',\n description: 'An arbitrary string that you can attach to a customer object.'\n },\n email: {\n type: 'string',\n description: 'The customer\\'s email address'\n },\n metadata: {\n type: 'object',\n description: 'You can specify up to 50 keys, with key names up to 40 characters long and values up to 500\\ncharacters long. Metadata is useful for storing additional, structured information on an\\nobject.'\n },\n name: {\n type: 'string',\n description: 'The customer\\'s name'\n },\n phone: {\n type: 'string',\n description: 'The customer\\'s phone number'\n },\n phone_country_code: {\n type: 'string',\n description: 'The country code for the customer phone number'\n }\n },\n required: [ 'created_at',\n 'customer_id'\n ]\n },\n address_details: {\n type: 'object',\n description: 'Address details',\n properties: {\n city: {\n type: 'string',\n description: 'The city, district, suburb, town, or village of the address.'\n },\n country: {\n $ref: '#/$defs/country_alpha2'\n },\n first_name: {\n type: 'string',\n description: 'The first name for the address'\n },\n last_name: {\n type: 'string',\n description: 'The last name for the address'\n },\n line1: {\n type: 'string',\n description: 'The first line of the street address or P.O. Box.'\n },\n line2: {\n type: 'string',\n description: 'The second line of the street address or P.O. Box (e.g., apartment, suite, unit, or building).'\n },\n line3: {\n type: 'string',\n description: 'The third line of the street address, if applicable.'\n },\n state: {\n type: 'string',\n description: 'The address state'\n },\n zip: {\n type: 'string',\n description: 'The zip/postal code for the address'\n }\n }\n },\n country_alpha2: {\n type: 'string',\n enum: [ 'AF',\n 'AX',\n 'AL',\n 'DZ',\n 'AS',\n 'AD',\n 'AO',\n 'AI',\n 'AQ',\n 'AG',\n 'AR',\n 'AM',\n 'AW',\n 'AU',\n 'AT',\n 'AZ',\n 'BS',\n 'BH',\n 'BD',\n 'BB',\n 'BY',\n 'BE',\n 'BZ',\n 'BJ',\n 'BM',\n 'BT',\n 'BO',\n 'BQ',\n 'BA',\n 'BW',\n 'BV',\n 'BR',\n 'IO',\n 'BN',\n 'BG',\n 'BF',\n 'BI',\n 'KH',\n 'CM',\n 'CA',\n 'CV',\n 'KY',\n 'CF',\n 'TD',\n 'CL',\n 'CN',\n 'CX',\n 'CC',\n 'CO',\n 'KM',\n 'CG',\n 'CD',\n 'CK',\n 'CR',\n 'CI',\n 'HR',\n 'CU',\n 'CW',\n 'CY',\n 'CZ',\n 'DK',\n 'DJ',\n 'DM',\n 'DO',\n 'EC',\n 'EG',\n 'SV',\n 'GQ',\n 'ER',\n 'EE',\n 'ET',\n 'FK',\n 'FO',\n 'FJ',\n 'FI',\n 'FR',\n 'GF',\n 'PF',\n 'TF',\n 'GA',\n 'GM',\n 'GE',\n 'DE',\n 'GH',\n 'GI',\n 'GR',\n 'GL',\n 'GD',\n 'GP',\n 'GU',\n 'GT',\n 'GG',\n 'GN',\n 'GW',\n 'GY',\n 'HT',\n 'HM',\n 'VA',\n 'HN',\n 'HK',\n 'HU',\n 'IS',\n 'IN',\n 'ID',\n 'IR',\n 'IQ',\n 'IE',\n 'IM',\n 'IL',\n 'IT',\n 'JM',\n 'JP',\n 'JE',\n 'JO',\n 'KZ',\n 'KE',\n 'KI',\n 'KP',\n 'KR',\n 'KW',\n 'KG',\n 'LA',\n 'LV',\n 'LB',\n 'LS',\n 'LR',\n 'LY',\n 'LI',\n 'LT',\n 'LU',\n 'MO',\n 'MK',\n 'MG',\n 'MW',\n 'MY',\n 'MV',\n 'ML',\n 'MT',\n 'MH',\n 'MQ',\n 'MR',\n 'MU',\n 'YT',\n 'MX',\n 'FM',\n 'MD',\n 'MC',\n 'MN',\n 'ME',\n 'MS',\n 'MA',\n 'MZ',\n 'MM',\n 'NA',\n 'NR',\n 'NP',\n 'NL',\n 'NC',\n 'NZ',\n 'NI',\n 'NE',\n 'NG',\n 'NU',\n 'NF',\n 'MP',\n 'NO',\n 'OM',\n 'PK',\n 'PW',\n 'PS',\n 'PA',\n 'PG',\n 'PY',\n 'PE',\n 'PH',\n 'PN',\n 'PL',\n 'PT',\n 'PR',\n 'QA',\n 'RE',\n 'RO',\n 'RU',\n 'RW',\n 'BL',\n 'SH',\n 'KN',\n 'LC',\n 'MF',\n 'PM',\n 'VC',\n 'WS',\n 'SM',\n 'ST',\n 'SA',\n 'SN',\n 'RS',\n 'SC',\n 'SL',\n 'SG',\n 'SX',\n 'SK',\n 'SI',\n 'SB',\n 'SO',\n 'ZA',\n 'GS',\n 'SS',\n 'ES',\n 'LK',\n 'SD',\n 'SR',\n 'SJ',\n 'SZ',\n 'SE',\n 'CH',\n 'SY',\n 'TW',\n 'TJ',\n 'TZ',\n 'TH',\n 'TL',\n 'TG',\n 'TK',\n 'TO',\n 'TT',\n 'TN',\n 'TR',\n 'TM',\n 'TC',\n 'TV',\n 'UG',\n 'UA',\n 'AE',\n 'GB',\n 'UM',\n 'UY',\n 'UZ',\n 'VU',\n 'VE',\n 'VN',\n 'VG',\n 'VI',\n 'WF',\n 'EH',\n 'YE',\n 'ZM',\n 'ZW',\n 'US'\n ]\n }\n }\n}\n```", + "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\nLists all the customers for a particular merchant id.\n\n# Response Schema\n```json\n{\n type: 'array',\n items: {\n $ref: '#/$defs/customer'\n },\n $defs: {\n customer: {\n type: 'object',\n properties: {\n created_at: {\n type: 'string',\n description: 'A timestamp (ISO 8601 code) that determines when the customer was created',\n format: 'date-time'\n },\n customer_id: {\n type: 'string',\n description: 'The identifier for the customer object'\n },\n address: {\n $ref: '#/$defs/address_details'\n },\n default_payment_method_id: {\n type: 'string',\n description: 'The identifier for the default payment method.'\n },\n description: {\n type: 'string',\n description: 'An arbitrary string that you can attach to a customer object.'\n },\n email: {\n type: 'string',\n description: 'The customer\\'s email address'\n },\n metadata: {\n type: 'object',\n description: 'You can specify up to 50 keys, with key names up to 40 characters long and values up to 500\\ncharacters long. Metadata is useful for storing additional, structured information on an\\nobject.',\n additionalProperties: true\n },\n name: {\n type: 'string',\n description: 'The customer\\'s name'\n },\n phone: {\n type: 'string',\n description: 'The customer\\'s phone number'\n },\n phone_country_code: {\n type: 'string',\n description: 'The country code for the customer phone number'\n }\n },\n required: [ 'created_at',\n 'customer_id'\n ]\n },\n address_details: {\n type: 'object',\n description: 'Address details',\n properties: {\n city: {\n type: 'string',\n description: 'The city, district, suburb, town, or village of the address.'\n },\n country: {\n $ref: '#/$defs/country_alpha2'\n },\n first_name: {\n type: 'string',\n description: 'The first name for the address'\n },\n last_name: {\n type: 'string',\n description: 'The last name for the address'\n },\n line1: {\n type: 'string',\n description: 'The first line of the street address or P.O. Box.'\n },\n line2: {\n type: 'string',\n description: 'The second line of the street address or P.O. Box (e.g., apartment, suite, unit, or building).'\n },\n line3: {\n type: 'string',\n description: 'The third line of the street address, if applicable.'\n },\n state: {\n type: 'string',\n description: 'The address state'\n },\n zip: {\n type: 'string',\n description: 'The zip/postal code for the address'\n }\n }\n },\n country_alpha2: {\n type: 'string',\n enum: [ 'AF',\n 'AX',\n 'AL',\n 'DZ',\n 'AS',\n 'AD',\n 'AO',\n 'AI',\n 'AQ',\n 'AG',\n 'AR',\n 'AM',\n 'AW',\n 'AU',\n 'AT',\n 'AZ',\n 'BS',\n 'BH',\n 'BD',\n 'BB',\n 'BY',\n 'BE',\n 'BZ',\n 'BJ',\n 'BM',\n 'BT',\n 'BO',\n 'BQ',\n 'BA',\n 'BW',\n 'BV',\n 'BR',\n 'IO',\n 'BN',\n 'BG',\n 'BF',\n 'BI',\n 'KH',\n 'CM',\n 'CA',\n 'CV',\n 'KY',\n 'CF',\n 'TD',\n 'CL',\n 'CN',\n 'CX',\n 'CC',\n 'CO',\n 'KM',\n 'CG',\n 'CD',\n 'CK',\n 'CR',\n 'CI',\n 'HR',\n 'CU',\n 'CW',\n 'CY',\n 'CZ',\n 'DK',\n 'DJ',\n 'DM',\n 'DO',\n 'EC',\n 'EG',\n 'SV',\n 'GQ',\n 'ER',\n 'EE',\n 'ET',\n 'FK',\n 'FO',\n 'FJ',\n 'FI',\n 'FR',\n 'GF',\n 'PF',\n 'TF',\n 'GA',\n 'GM',\n 'GE',\n 'DE',\n 'GH',\n 'GI',\n 'GR',\n 'GL',\n 'GD',\n 'GP',\n 'GU',\n 'GT',\n 'GG',\n 'GN',\n 'GW',\n 'GY',\n 'HT',\n 'HM',\n 'VA',\n 'HN',\n 'HK',\n 'HU',\n 'IS',\n 'IN',\n 'ID',\n 'IR',\n 'IQ',\n 'IE',\n 'IM',\n 'IL',\n 'IT',\n 'JM',\n 'JP',\n 'JE',\n 'JO',\n 'KZ',\n 'KE',\n 'KI',\n 'KP',\n 'KR',\n 'KW',\n 'KG',\n 'LA',\n 'LV',\n 'LB',\n 'LS',\n 'LR',\n 'LY',\n 'LI',\n 'LT',\n 'LU',\n 'MO',\n 'MK',\n 'MG',\n 'MW',\n 'MY',\n 'MV',\n 'ML',\n 'MT',\n 'MH',\n 'MQ',\n 'MR',\n 'MU',\n 'YT',\n 'MX',\n 'FM',\n 'MD',\n 'MC',\n 'MN',\n 'ME',\n 'MS',\n 'MA',\n 'MZ',\n 'MM',\n 'NA',\n 'NR',\n 'NP',\n 'NL',\n 'NC',\n 'NZ',\n 'NI',\n 'NE',\n 'NG',\n 'NU',\n 'NF',\n 'MP',\n 'NO',\n 'OM',\n 'PK',\n 'PW',\n 'PS',\n 'PA',\n 'PG',\n 'PY',\n 'PE',\n 'PH',\n 'PN',\n 'PL',\n 'PT',\n 'PR',\n 'QA',\n 'RE',\n 'RO',\n 'RU',\n 'RW',\n 'BL',\n 'SH',\n 'KN',\n 'LC',\n 'MF',\n 'PM',\n 'VC',\n 'WS',\n 'SM',\n 'ST',\n 'SA',\n 'SN',\n 'RS',\n 'SC',\n 'SL',\n 'SG',\n 'SX',\n 'SK',\n 'SI',\n 'SB',\n 'SO',\n 'ZA',\n 'GS',\n 'SS',\n 'ES',\n 'LK',\n 'SD',\n 'SR',\n 'SJ',\n 'SZ',\n 'SE',\n 'CH',\n 'SY',\n 'TW',\n 'TJ',\n 'TZ',\n 'TH',\n 'TL',\n 'TG',\n 'TK',\n 'TO',\n 'TT',\n 'TN',\n 'TR',\n 'TM',\n 'TC',\n 'TV',\n 'UG',\n 'UA',\n 'AE',\n 'GB',\n 'UM',\n 'UY',\n 'UZ',\n 'VU',\n 'VE',\n 'VN',\n 'VG',\n 'VI',\n 'WF',\n 'EH',\n 'YE',\n 'ZM',\n 'ZW',\n 'US'\n ]\n }\n }\n}\n```", inputSchema: { type: 'object', properties: { diff --git a/packages/mcp-server/src/tools/customers/retrieve-customers.ts b/packages/mcp-server/src/tools/customers/retrieve-customers.ts index 36b5cef..929ab69 100644 --- a/packages/mcp-server/src/tools/customers/retrieve-customers.ts +++ b/packages/mcp-server/src/tools/customers/retrieve-customers.ts @@ -18,7 +18,7 @@ export const metadata: Metadata = { export const tool: Tool = { name: 'retrieve_customers', description: - "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\nRetrieves a customer's details.\n\n# Response Schema\n```json\n{\n $ref: '#/$defs/customer',\n $defs: {\n customer: {\n type: 'object',\n properties: {\n created_at: {\n type: 'string',\n description: 'A timestamp (ISO 8601 code) that determines when the customer was created',\n format: 'date-time'\n },\n customer_id: {\n type: 'string',\n description: 'The identifier for the customer object'\n },\n address: {\n $ref: '#/$defs/address_details'\n },\n default_payment_method_id: {\n type: 'string',\n description: 'The identifier for the default payment method.'\n },\n description: {\n type: 'string',\n description: 'An arbitrary string that you can attach to a customer object.'\n },\n email: {\n type: 'string',\n description: 'The customer\\'s email address'\n },\n metadata: {\n type: 'object',\n description: 'You can specify up to 50 keys, with key names up to 40 characters long and values up to 500\\ncharacters long. Metadata is useful for storing additional, structured information on an\\nobject.'\n },\n name: {\n type: 'string',\n description: 'The customer\\'s name'\n },\n phone: {\n type: 'string',\n description: 'The customer\\'s phone number'\n },\n phone_country_code: {\n type: 'string',\n description: 'The country code for the customer phone number'\n }\n },\n required: [ 'created_at',\n 'customer_id'\n ]\n },\n address_details: {\n type: 'object',\n description: 'Address details',\n properties: {\n city: {\n type: 'string',\n description: 'The city, district, suburb, town, or village of the address.'\n },\n country: {\n $ref: '#/$defs/country_alpha2'\n },\n first_name: {\n type: 'string',\n description: 'The first name for the address'\n },\n last_name: {\n type: 'string',\n description: 'The last name for the address'\n },\n line1: {\n type: 'string',\n description: 'The first line of the street address or P.O. Box.'\n },\n line2: {\n type: 'string',\n description: 'The second line of the street address or P.O. Box (e.g., apartment, suite, unit, or building).'\n },\n line3: {\n type: 'string',\n description: 'The third line of the street address, if applicable.'\n },\n state: {\n type: 'string',\n description: 'The address state'\n },\n zip: {\n type: 'string',\n description: 'The zip/postal code for the address'\n }\n }\n },\n country_alpha2: {\n type: 'string',\n enum: [ 'AF',\n 'AX',\n 'AL',\n 'DZ',\n 'AS',\n 'AD',\n 'AO',\n 'AI',\n 'AQ',\n 'AG',\n 'AR',\n 'AM',\n 'AW',\n 'AU',\n 'AT',\n 'AZ',\n 'BS',\n 'BH',\n 'BD',\n 'BB',\n 'BY',\n 'BE',\n 'BZ',\n 'BJ',\n 'BM',\n 'BT',\n 'BO',\n 'BQ',\n 'BA',\n 'BW',\n 'BV',\n 'BR',\n 'IO',\n 'BN',\n 'BG',\n 'BF',\n 'BI',\n 'KH',\n 'CM',\n 'CA',\n 'CV',\n 'KY',\n 'CF',\n 'TD',\n 'CL',\n 'CN',\n 'CX',\n 'CC',\n 'CO',\n 'KM',\n 'CG',\n 'CD',\n 'CK',\n 'CR',\n 'CI',\n 'HR',\n 'CU',\n 'CW',\n 'CY',\n 'CZ',\n 'DK',\n 'DJ',\n 'DM',\n 'DO',\n 'EC',\n 'EG',\n 'SV',\n 'GQ',\n 'ER',\n 'EE',\n 'ET',\n 'FK',\n 'FO',\n 'FJ',\n 'FI',\n 'FR',\n 'GF',\n 'PF',\n 'TF',\n 'GA',\n 'GM',\n 'GE',\n 'DE',\n 'GH',\n 'GI',\n 'GR',\n 'GL',\n 'GD',\n 'GP',\n 'GU',\n 'GT',\n 'GG',\n 'GN',\n 'GW',\n 'GY',\n 'HT',\n 'HM',\n 'VA',\n 'HN',\n 'HK',\n 'HU',\n 'IS',\n 'IN',\n 'ID',\n 'IR',\n 'IQ',\n 'IE',\n 'IM',\n 'IL',\n 'IT',\n 'JM',\n 'JP',\n 'JE',\n 'JO',\n 'KZ',\n 'KE',\n 'KI',\n 'KP',\n 'KR',\n 'KW',\n 'KG',\n 'LA',\n 'LV',\n 'LB',\n 'LS',\n 'LR',\n 'LY',\n 'LI',\n 'LT',\n 'LU',\n 'MO',\n 'MK',\n 'MG',\n 'MW',\n 'MY',\n 'MV',\n 'ML',\n 'MT',\n 'MH',\n 'MQ',\n 'MR',\n 'MU',\n 'YT',\n 'MX',\n 'FM',\n 'MD',\n 'MC',\n 'MN',\n 'ME',\n 'MS',\n 'MA',\n 'MZ',\n 'MM',\n 'NA',\n 'NR',\n 'NP',\n 'NL',\n 'NC',\n 'NZ',\n 'NI',\n 'NE',\n 'NG',\n 'NU',\n 'NF',\n 'MP',\n 'NO',\n 'OM',\n 'PK',\n 'PW',\n 'PS',\n 'PA',\n 'PG',\n 'PY',\n 'PE',\n 'PH',\n 'PN',\n 'PL',\n 'PT',\n 'PR',\n 'QA',\n 'RE',\n 'RO',\n 'RU',\n 'RW',\n 'BL',\n 'SH',\n 'KN',\n 'LC',\n 'MF',\n 'PM',\n 'VC',\n 'WS',\n 'SM',\n 'ST',\n 'SA',\n 'SN',\n 'RS',\n 'SC',\n 'SL',\n 'SG',\n 'SX',\n 'SK',\n 'SI',\n 'SB',\n 'SO',\n 'ZA',\n 'GS',\n 'SS',\n 'ES',\n 'LK',\n 'SD',\n 'SR',\n 'SJ',\n 'SZ',\n 'SE',\n 'CH',\n 'SY',\n 'TW',\n 'TJ',\n 'TZ',\n 'TH',\n 'TL',\n 'TG',\n 'TK',\n 'TO',\n 'TT',\n 'TN',\n 'TR',\n 'TM',\n 'TC',\n 'TV',\n 'UG',\n 'UA',\n 'AE',\n 'GB',\n 'UM',\n 'UY',\n 'UZ',\n 'VU',\n 'VE',\n 'VN',\n 'VG',\n 'VI',\n 'WF',\n 'EH',\n 'YE',\n 'ZM',\n 'ZW',\n 'US'\n ]\n }\n }\n}\n```", + "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\nRetrieves a customer's details.\n\n# Response Schema\n```json\n{\n $ref: '#/$defs/customer',\n $defs: {\n customer: {\n type: 'object',\n properties: {\n created_at: {\n type: 'string',\n description: 'A timestamp (ISO 8601 code) that determines when the customer was created',\n format: 'date-time'\n },\n customer_id: {\n type: 'string',\n description: 'The identifier for the customer object'\n },\n address: {\n $ref: '#/$defs/address_details'\n },\n default_payment_method_id: {\n type: 'string',\n description: 'The identifier for the default payment method.'\n },\n description: {\n type: 'string',\n description: 'An arbitrary string that you can attach to a customer object.'\n },\n email: {\n type: 'string',\n description: 'The customer\\'s email address'\n },\n metadata: {\n type: 'object',\n description: 'You can specify up to 50 keys, with key names up to 40 characters long and values up to 500\\ncharacters long. Metadata is useful for storing additional, structured information on an\\nobject.',\n additionalProperties: true\n },\n name: {\n type: 'string',\n description: 'The customer\\'s name'\n },\n phone: {\n type: 'string',\n description: 'The customer\\'s phone number'\n },\n phone_country_code: {\n type: 'string',\n description: 'The country code for the customer phone number'\n }\n },\n required: [ 'created_at',\n 'customer_id'\n ]\n },\n address_details: {\n type: 'object',\n description: 'Address details',\n properties: {\n city: {\n type: 'string',\n description: 'The city, district, suburb, town, or village of the address.'\n },\n country: {\n $ref: '#/$defs/country_alpha2'\n },\n first_name: {\n type: 'string',\n description: 'The first name for the address'\n },\n last_name: {\n type: 'string',\n description: 'The last name for the address'\n },\n line1: {\n type: 'string',\n description: 'The first line of the street address or P.O. Box.'\n },\n line2: {\n type: 'string',\n description: 'The second line of the street address or P.O. Box (e.g., apartment, suite, unit, or building).'\n },\n line3: {\n type: 'string',\n description: 'The third line of the street address, if applicable.'\n },\n state: {\n type: 'string',\n description: 'The address state'\n },\n zip: {\n type: 'string',\n description: 'The zip/postal code for the address'\n }\n }\n },\n country_alpha2: {\n type: 'string',\n enum: [ 'AF',\n 'AX',\n 'AL',\n 'DZ',\n 'AS',\n 'AD',\n 'AO',\n 'AI',\n 'AQ',\n 'AG',\n 'AR',\n 'AM',\n 'AW',\n 'AU',\n 'AT',\n 'AZ',\n 'BS',\n 'BH',\n 'BD',\n 'BB',\n 'BY',\n 'BE',\n 'BZ',\n 'BJ',\n 'BM',\n 'BT',\n 'BO',\n 'BQ',\n 'BA',\n 'BW',\n 'BV',\n 'BR',\n 'IO',\n 'BN',\n 'BG',\n 'BF',\n 'BI',\n 'KH',\n 'CM',\n 'CA',\n 'CV',\n 'KY',\n 'CF',\n 'TD',\n 'CL',\n 'CN',\n 'CX',\n 'CC',\n 'CO',\n 'KM',\n 'CG',\n 'CD',\n 'CK',\n 'CR',\n 'CI',\n 'HR',\n 'CU',\n 'CW',\n 'CY',\n 'CZ',\n 'DK',\n 'DJ',\n 'DM',\n 'DO',\n 'EC',\n 'EG',\n 'SV',\n 'GQ',\n 'ER',\n 'EE',\n 'ET',\n 'FK',\n 'FO',\n 'FJ',\n 'FI',\n 'FR',\n 'GF',\n 'PF',\n 'TF',\n 'GA',\n 'GM',\n 'GE',\n 'DE',\n 'GH',\n 'GI',\n 'GR',\n 'GL',\n 'GD',\n 'GP',\n 'GU',\n 'GT',\n 'GG',\n 'GN',\n 'GW',\n 'GY',\n 'HT',\n 'HM',\n 'VA',\n 'HN',\n 'HK',\n 'HU',\n 'IS',\n 'IN',\n 'ID',\n 'IR',\n 'IQ',\n 'IE',\n 'IM',\n 'IL',\n 'IT',\n 'JM',\n 'JP',\n 'JE',\n 'JO',\n 'KZ',\n 'KE',\n 'KI',\n 'KP',\n 'KR',\n 'KW',\n 'KG',\n 'LA',\n 'LV',\n 'LB',\n 'LS',\n 'LR',\n 'LY',\n 'LI',\n 'LT',\n 'LU',\n 'MO',\n 'MK',\n 'MG',\n 'MW',\n 'MY',\n 'MV',\n 'ML',\n 'MT',\n 'MH',\n 'MQ',\n 'MR',\n 'MU',\n 'YT',\n 'MX',\n 'FM',\n 'MD',\n 'MC',\n 'MN',\n 'ME',\n 'MS',\n 'MA',\n 'MZ',\n 'MM',\n 'NA',\n 'NR',\n 'NP',\n 'NL',\n 'NC',\n 'NZ',\n 'NI',\n 'NE',\n 'NG',\n 'NU',\n 'NF',\n 'MP',\n 'NO',\n 'OM',\n 'PK',\n 'PW',\n 'PS',\n 'PA',\n 'PG',\n 'PY',\n 'PE',\n 'PH',\n 'PN',\n 'PL',\n 'PT',\n 'PR',\n 'QA',\n 'RE',\n 'RO',\n 'RU',\n 'RW',\n 'BL',\n 'SH',\n 'KN',\n 'LC',\n 'MF',\n 'PM',\n 'VC',\n 'WS',\n 'SM',\n 'ST',\n 'SA',\n 'SN',\n 'RS',\n 'SC',\n 'SL',\n 'SG',\n 'SX',\n 'SK',\n 'SI',\n 'SB',\n 'SO',\n 'ZA',\n 'GS',\n 'SS',\n 'ES',\n 'LK',\n 'SD',\n 'SR',\n 'SJ',\n 'SZ',\n 'SE',\n 'CH',\n 'SY',\n 'TW',\n 'TJ',\n 'TZ',\n 'TH',\n 'TL',\n 'TG',\n 'TK',\n 'TO',\n 'TT',\n 'TN',\n 'TR',\n 'TM',\n 'TC',\n 'TV',\n 'UG',\n 'UA',\n 'AE',\n 'GB',\n 'UM',\n 'UY',\n 'UZ',\n 'VU',\n 'VE',\n 'VN',\n 'VG',\n 'VI',\n 'WF',\n 'EH',\n 'YE',\n 'ZM',\n 'ZW',\n 'US'\n ]\n }\n }\n}\n```", inputSchema: { type: 'object', properties: { diff --git a/packages/mcp-server/src/tools/customers/update-customers.ts b/packages/mcp-server/src/tools/customers/update-customers.ts index b4f196a..8b0a00d 100644 --- a/packages/mcp-server/src/tools/customers/update-customers.ts +++ b/packages/mcp-server/src/tools/customers/update-customers.ts @@ -38,6 +38,7 @@ export const tool: Tool = { type: 'object', description: 'You can specify up to 50 keys, with key names up to 40 characters long and values up to 500\ncharacters long. Metadata is useful for storing additional, structured information on an\nobject.', + additionalProperties: true, }, name: { type: 'string', diff --git a/packages/mcp-server/src/tools/organization/create-organization.ts b/packages/mcp-server/src/tools/organization/create-organization.ts index 36cfe06..e221134 100644 --- a/packages/mcp-server/src/tools/organization/create-organization.ts +++ b/packages/mcp-server/src/tools/organization/create-organization.ts @@ -18,7 +18,7 @@ export const metadata: Metadata = { export const tool: Tool = { name: 'create_organization', description: - "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\nCreate a new organization\n\n# Response Schema\n```json\n{\n $ref: '#/$defs/organization_response',\n $defs: {\n organization_response: {\n type: 'object',\n properties: {\n created_at: {\n type: 'string',\n format: 'date-time'\n },\n modified_at: {\n type: 'string',\n format: 'date-time'\n },\n organization_id: {\n type: 'string',\n description: 'The unique identifier for the Organization'\n },\n metadata: {\n type: 'object',\n description: 'Metadata is useful for storing additional, unstructured information on an object.'\n },\n organization_details: {\n type: 'object',\n description: 'Details about the organization'\n },\n organization_name: {\n type: 'string',\n description: 'Name of the Organization'\n }\n },\n required: [ 'created_at',\n 'modified_at',\n 'organization_id'\n ]\n }\n }\n}\n```", + "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\nCreate a new organization\n\n# Response Schema\n```json\n{\n $ref: '#/$defs/organization_response',\n $defs: {\n organization_response: {\n type: 'object',\n properties: {\n created_at: {\n type: 'string',\n format: 'date-time'\n },\n modified_at: {\n type: 'string',\n format: 'date-time'\n },\n organization_id: {\n type: 'string',\n description: 'The unique identifier for the Organization'\n },\n metadata: {\n type: 'object',\n description: 'Metadata is useful for storing additional, unstructured information on an object.',\n additionalProperties: true\n },\n organization_details: {\n type: 'object',\n description: 'Details about the organization',\n additionalProperties: true\n },\n organization_name: {\n type: 'string',\n description: 'Name of the Organization'\n }\n },\n required: [ 'created_at',\n 'modified_at',\n 'organization_id'\n ]\n }\n }\n}\n```", inputSchema: { type: 'object', properties: { @@ -29,10 +29,12 @@ export const tool: Tool = { metadata: { type: 'object', description: 'Metadata is useful for storing additional, unstructured information on an object.', + additionalProperties: true, }, organization_details: { type: 'object', description: 'Details about the organization', + additionalProperties: true, }, jq_filter: { type: 'string', diff --git a/packages/mcp-server/src/tools/organization/retrieve-organization.ts b/packages/mcp-server/src/tools/organization/retrieve-organization.ts index e5edf38..2bfc5d6 100644 --- a/packages/mcp-server/src/tools/organization/retrieve-organization.ts +++ b/packages/mcp-server/src/tools/organization/retrieve-organization.ts @@ -18,7 +18,7 @@ export const metadata: Metadata = { export const tool: Tool = { name: 'retrieve_organization', description: - "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\nRetrieve an existing organization\n\n# Response Schema\n```json\n{\n $ref: '#/$defs/organization_response',\n $defs: {\n organization_response: {\n type: 'object',\n properties: {\n created_at: {\n type: 'string',\n format: 'date-time'\n },\n modified_at: {\n type: 'string',\n format: 'date-time'\n },\n organization_id: {\n type: 'string',\n description: 'The unique identifier for the Organization'\n },\n metadata: {\n type: 'object',\n description: 'Metadata is useful for storing additional, unstructured information on an object.'\n },\n organization_details: {\n type: 'object',\n description: 'Details about the organization'\n },\n organization_name: {\n type: 'string',\n description: 'Name of the Organization'\n }\n },\n required: [ 'created_at',\n 'modified_at',\n 'organization_id'\n ]\n }\n }\n}\n```", + "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\nRetrieve an existing organization\n\n# Response Schema\n```json\n{\n $ref: '#/$defs/organization_response',\n $defs: {\n organization_response: {\n type: 'object',\n properties: {\n created_at: {\n type: 'string',\n format: 'date-time'\n },\n modified_at: {\n type: 'string',\n format: 'date-time'\n },\n organization_id: {\n type: 'string',\n description: 'The unique identifier for the Organization'\n },\n metadata: {\n type: 'object',\n description: 'Metadata is useful for storing additional, unstructured information on an object.',\n additionalProperties: true\n },\n organization_details: {\n type: 'object',\n description: 'Details about the organization',\n additionalProperties: true\n },\n organization_name: {\n type: 'string',\n description: 'Name of the Organization'\n }\n },\n required: [ 'created_at',\n 'modified_at',\n 'organization_id'\n ]\n }\n }\n}\n```", inputSchema: { type: 'object', properties: { diff --git a/packages/mcp-server/src/tools/organization/update-organization.ts b/packages/mcp-server/src/tools/organization/update-organization.ts index 0b2a3d2..93267ed 100644 --- a/packages/mcp-server/src/tools/organization/update-organization.ts +++ b/packages/mcp-server/src/tools/organization/update-organization.ts @@ -18,7 +18,7 @@ export const metadata: Metadata = { export const tool: Tool = { name: 'update_organization', description: - "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\nCreate a new organization for .\n\n# Response Schema\n```json\n{\n $ref: '#/$defs/organization_response',\n $defs: {\n organization_response: {\n type: 'object',\n properties: {\n created_at: {\n type: 'string',\n format: 'date-time'\n },\n modified_at: {\n type: 'string',\n format: 'date-time'\n },\n organization_id: {\n type: 'string',\n description: 'The unique identifier for the Organization'\n },\n metadata: {\n type: 'object',\n description: 'Metadata is useful for storing additional, unstructured information on an object.'\n },\n organization_details: {\n type: 'object',\n description: 'Details about the organization'\n },\n organization_name: {\n type: 'string',\n description: 'Name of the Organization'\n }\n },\n required: [ 'created_at',\n 'modified_at',\n 'organization_id'\n ]\n }\n }\n}\n```", + "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\nCreate a new organization for .\n\n# Response Schema\n```json\n{\n $ref: '#/$defs/organization_response',\n $defs: {\n organization_response: {\n type: 'object',\n properties: {\n created_at: {\n type: 'string',\n format: 'date-time'\n },\n modified_at: {\n type: 'string',\n format: 'date-time'\n },\n organization_id: {\n type: 'string',\n description: 'The unique identifier for the Organization'\n },\n metadata: {\n type: 'object',\n description: 'Metadata is useful for storing additional, unstructured information on an object.',\n additionalProperties: true\n },\n organization_details: {\n type: 'object',\n description: 'Details about the organization',\n additionalProperties: true\n },\n organization_name: {\n type: 'string',\n description: 'Name of the Organization'\n }\n },\n required: [ 'created_at',\n 'modified_at',\n 'organization_id'\n ]\n }\n }\n}\n```", inputSchema: { type: 'object', properties: { @@ -32,10 +32,12 @@ export const tool: Tool = { metadata: { type: 'object', description: 'Metadata is useful for storing additional, unstructured information on an object.', + additionalProperties: true, }, organization_details: { type: 'object', description: 'Details about the organization', + additionalProperties: true, }, organization_name: { type: 'string', diff --git a/packages/mcp-server/src/tools/payment-methods/create-payment-methods.ts b/packages/mcp-server/src/tools/payment-methods/create-payment-methods.ts index 08c99d0..7f6bcf4 100644 --- a/packages/mcp-server/src/tools/payment-methods/create-payment-methods.ts +++ b/packages/mcp-server/src/tools/payment-methods/create-payment-methods.ts @@ -68,6 +68,7 @@ export const tool: Tool = { type: 'object', description: 'You can specify up to 50 keys, with key names up to 40 characters long and values up to 500 characters long. Metadata is useful for storing additional, structured information on an object.', + additionalProperties: true, }, payment_method_data: { type: 'object', diff --git a/packages/mcp-server/src/tools/payments/cancel-payments.ts b/packages/mcp-server/src/tools/payments/cancel-payments.ts index 02cda8a..b0d5fc8 100644 --- a/packages/mcp-server/src/tools/payments/cancel-payments.ts +++ b/packages/mcp-server/src/tools/payments/cancel-payments.ts @@ -56,10 +56,12 @@ export const tool: Tool = { type: 'object', description: 'Account details of the Connector. You can specify up to 50 keys, with key names up to 40 characters long and values up to 500 characters long. Useful for storing additional, structured information on an object.', + additionalProperties: true, }, metadata: { type: 'object', description: 'Metadata is useful for storing additional, unstructured information on an object.', + additionalProperties: true, }, }, }, diff --git a/packages/mcp-server/src/tools/payments/capture-payments.ts b/packages/mcp-server/src/tools/payments/capture-payments.ts index 1445efa..ad9a534 100644 --- a/packages/mcp-server/src/tools/payments/capture-payments.ts +++ b/packages/mcp-server/src/tools/payments/capture-payments.ts @@ -76,10 +76,12 @@ export const tool: Tool = { type: 'object', description: 'Account details of the Connector. You can specify up to 50 keys, with key names up to 40 characters long and values up to 500 characters long. Useful for storing additional, structured information on an object.', + additionalProperties: true, }, metadata: { type: 'object', description: 'Metadata is useful for storing additional, unstructured information on an object.', + additionalProperties: true, }, }, }, diff --git a/packages/mcp-server/src/tools/payments/confirm-payments.ts b/packages/mcp-server/src/tools/payments/confirm-payments.ts index 2d14dbb..4f2d1b0 100644 --- a/packages/mcp-server/src/tools/payments/confirm-payments.ts +++ b/packages/mcp-server/src/tools/payments/confirm-payments.ts @@ -105,6 +105,7 @@ export const tool: Tool = { frm_metadata: { type: 'object', description: 'Additional data related to some frm(Fraud Risk Management) connectors', + additionalProperties: true, }, is_iframe_redirection_enabled: { type: 'boolean', @@ -130,6 +131,7 @@ export const tool: Tool = { type: 'object', description: 'You can specify up to 50 keys, with key names up to 40 characters long and values up to 500 characters long. Metadata is useful for storing additional, structured information on an object.', + additionalProperties: true, }, off_session: { type: 'boolean', @@ -1338,6 +1340,7 @@ export const tool: Tool = { metadata: { type: 'object', description: 'Additional details required by mandate', + additionalProperties: true, }, start_date: { type: 'string', @@ -1369,10 +1372,12 @@ export const tool: Tool = { type: 'object', description: 'Account details of the Connector. You can specify up to 50 keys, with key names up to 40 characters long and values up to 500 characters long. Useful for storing additional, structured information on an object.', + additionalProperties: true, }, metadata: { type: 'object', description: 'Metadata is useful for storing additional, unstructured information on an object.', + additionalProperties: true, }, }, }, @@ -1577,6 +1582,7 @@ export const tool: Tool = { payment_link_ui_rules: { type: 'object', description: 'Payment link configuration rules', + additionalProperties: true, }, sdk_layout: { type: 'string', @@ -1585,6 +1591,7 @@ export const tool: Tool = { sdk_ui_rules: { type: 'object', description: 'SDK configuration rules', + additionalProperties: true, }, seller_name: { type: 'string', @@ -1725,6 +1732,7 @@ export const tool: Tool = { properties: { ali_pay_qr: { type: 'object', + additionalProperties: true, }, }, required: ['ali_pay_qr'], @@ -1734,6 +1742,7 @@ export const tool: Tool = { properties: { ali_pay_redirect: { type: 'object', + additionalProperties: true, }, }, required: ['ali_pay_redirect'], @@ -1743,6 +1752,7 @@ export const tool: Tool = { properties: { ali_pay_hk_redirect: { type: 'object', + additionalProperties: true, }, }, required: ['ali_pay_hk_redirect'], @@ -1752,6 +1762,7 @@ export const tool: Tool = { properties: { amazon_pay_redirect: { type: 'object', + additionalProperties: true, }, }, required: ['amazon_pay_redirect'], @@ -1761,6 +1772,7 @@ export const tool: Tool = { properties: { momo_redirect: { type: 'object', + additionalProperties: true, }, }, required: ['momo_redirect'], @@ -1770,6 +1782,7 @@ export const tool: Tool = { properties: { kakao_pay_redirect: { type: 'object', + additionalProperties: true, }, }, required: ['kakao_pay_redirect'], @@ -1779,6 +1792,7 @@ export const tool: Tool = { properties: { go_pay_redirect: { type: 'object', + additionalProperties: true, }, }, required: ['go_pay_redirect'], @@ -1788,6 +1802,7 @@ export const tool: Tool = { properties: { gcash_redirect: { type: 'object', + additionalProperties: true, }, }, required: ['gcash_redirect'], @@ -1835,6 +1850,7 @@ export const tool: Tool = { properties: { apple_pay_redirect: { type: 'object', + additionalProperties: true, }, }, required: ['apple_pay_redirect'], @@ -1844,6 +1860,7 @@ export const tool: Tool = { properties: { apple_pay_third_party_sdk: { type: 'object', + additionalProperties: true, }, }, required: ['apple_pay_third_party_sdk'], @@ -1854,6 +1871,7 @@ export const tool: Tool = { dana_redirect: { type: 'object', description: 'Wallet data for DANA redirect flow', + additionalProperties: true, }, }, required: ['dana_redirect'], @@ -1928,6 +1946,7 @@ export const tool: Tool = { properties: { google_pay_redirect: { type: 'object', + additionalProperties: true, }, }, required: ['google_pay_redirect'], @@ -1937,6 +1956,7 @@ export const tool: Tool = { properties: { google_pay_third_party_sdk: { type: 'object', + additionalProperties: true, }, }, required: ['google_pay_third_party_sdk'], @@ -1963,6 +1983,7 @@ export const tool: Tool = { properties: { mobile_pay_redirect: { type: 'object', + additionalProperties: true, }, }, required: ['mobile_pay_redirect'], @@ -2101,6 +2122,7 @@ export const tool: Tool = { twint_redirect: { type: 'object', description: 'Wallet data for Twint Redirection', + additionalProperties: true, }, }, required: ['twint_redirect'], @@ -2111,6 +2133,7 @@ export const tool: Tool = { vipps_redirect: { type: 'object', description: 'Wallet data for Vipps Redirection', + additionalProperties: true, }, }, required: ['vipps_redirect'], @@ -2120,6 +2143,7 @@ export const tool: Tool = { properties: { touch_n_go_redirect: { type: 'object', + additionalProperties: true, }, }, required: ['touch_n_go_redirect'], @@ -2129,6 +2153,7 @@ export const tool: Tool = { properties: { we_chat_pay_redirect: { type: 'object', + additionalProperties: true, }, }, required: ['we_chat_pay_redirect'], @@ -2138,6 +2163,7 @@ export const tool: Tool = { properties: { we_chat_pay_qr: { type: 'object', + additionalProperties: true, }, }, required: ['we_chat_pay_qr'], @@ -2147,6 +2173,7 @@ export const tool: Tool = { properties: { cashapp_qr: { type: 'object', + additionalProperties: true, }, }, required: ['cashapp_qr'], @@ -2156,6 +2183,7 @@ export const tool: Tool = { properties: { swish_qr: { type: 'object', + additionalProperties: true, }, }, required: ['swish_qr'], @@ -2184,6 +2212,7 @@ export const tool: Tool = { properties: { revolut_pay: { type: 'object', + additionalProperties: true, }, }, required: ['revolut_pay'], @@ -2244,6 +2273,7 @@ export const tool: Tool = { affirm_redirect: { type: 'object', description: 'For Affirm redirect as PayLater Option', + additionalProperties: true, }, }, required: ['affirm_redirect'], @@ -2274,6 +2304,7 @@ export const tool: Tool = { pay_bright_redirect: { type: 'object', description: 'For PayBright Redirect as PayLater Option', + additionalProperties: true, }, }, required: ['pay_bright_redirect'], @@ -2284,6 +2315,7 @@ export const tool: Tool = { walley_redirect: { type: 'object', description: 'For WalleyRedirect as PayLater Option', + additionalProperties: true, }, }, required: ['walley_redirect'], @@ -2294,6 +2326,7 @@ export const tool: Tool = { alma_redirect: { type: 'object', description: 'For Alma Redirection as PayLater Option', + additionalProperties: true, }, }, required: ['alma_redirect'], @@ -2303,6 +2336,7 @@ export const tool: Tool = { properties: { atome_redirect: { type: 'object', + additionalProperties: true, }, }, required: ['atome_redirect'], @@ -2357,6 +2391,7 @@ export const tool: Tool = { properties: { bizum: { type: 'object', + additionalProperties: true, }, }, required: ['bizum'], @@ -2626,6 +2661,7 @@ export const tool: Tool = { properties: { local_bank_redirect: { type: 'object', + additionalProperties: true, }, }, required: ['local_bank_redirect'], @@ -3003,6 +3039,7 @@ export const tool: Tool = { properties: { pse: { type: 'object', + additionalProperties: true, }, }, required: ['pse'], @@ -3026,6 +3063,7 @@ export const tool: Tool = { properties: { instant_bank_transfer: { type: 'object', + additionalProperties: true, }, }, required: ['instant_bank_transfer'], @@ -3035,6 +3073,7 @@ export const tool: Tool = { properties: { instant_bank_transfer_finland: { type: 'object', + additionalProperties: true, }, }, required: ['instant_bank_transfer_finland'], @@ -3044,6 +3083,7 @@ export const tool: Tool = { properties: { instant_bank_transfer_poland: { type: 'object', + additionalProperties: true, }, }, required: ['instant_bank_transfer_poland'], @@ -3125,6 +3165,7 @@ export const tool: Tool = { properties: { upi_intent: { type: 'object', + additionalProperties: true, }, }, required: ['upi_intent'], @@ -3181,6 +3222,7 @@ export const tool: Tool = { properties: { pay_safe_card: { type: 'object', + additionalProperties: true, }, }, required: ['pay_safe_card'], @@ -3274,6 +3316,7 @@ export const tool: Tool = { properties: { knet: { type: 'object', + additionalProperties: true, }, }, required: ['knet'], @@ -3283,6 +3326,7 @@ export const tool: Tool = { properties: { benefit: { type: 'object', + additionalProperties: true, }, }, required: ['benefit'], @@ -3292,6 +3336,7 @@ export const tool: Tool = { properties: { momo_atm: { type: 'object', + additionalProperties: true, }, }, required: ['momo_atm'], @@ -3301,6 +3346,7 @@ export const tool: Tool = { properties: { card_redirect: { type: 'object', + additionalProperties: true, }, }, required: ['card_redirect'], @@ -3548,6 +3594,7 @@ export const tool: Tool = { properties: { fps: { type: 'object', + additionalProperties: true, }, }, required: ['fps'], @@ -3557,6 +3604,7 @@ export const tool: Tool = { properties: { duit_now: { type: 'object', + additionalProperties: true, }, }, required: ['duit_now'], @@ -3566,6 +3614,7 @@ export const tool: Tool = { properties: { prompt_pay: { type: 'object', + additionalProperties: true, }, }, required: ['prompt_pay'], @@ -3575,6 +3624,7 @@ export const tool: Tool = { properties: { viet_qr: { type: 'object', + additionalProperties: true, }, }, required: ['viet_qr'], @@ -3741,6 +3791,7 @@ export const tool: Tool = { properties: { open_banking_pis: { type: 'object', + additionalProperties: true, }, }, required: ['open_banking_pis'], diff --git a/packages/mcp-server/src/tools/payments/create-payments.ts b/packages/mcp-server/src/tools/payments/create-payments.ts index 7d038a6..2d8cd21 100644 --- a/packages/mcp-server/src/tools/payments/create-payments.ts +++ b/packages/mcp-server/src/tools/payments/create-payments.ts @@ -106,6 +106,7 @@ export const tool: Tool = { frm_metadata: { type: 'object', description: 'Additional data related to some frm(Fraud Risk Management) connectors', + additionalProperties: true, }, is_iframe_redirection_enabled: { type: 'boolean', @@ -131,6 +132,7 @@ export const tool: Tool = { type: 'object', description: 'You can specify up to 50 keys, with key names up to 40 characters long and values up to 500 characters long. Metadata is useful for storing additional, structured information on an object.', + additionalProperties: true, }, off_session: { type: 'boolean', @@ -1344,6 +1346,7 @@ export const tool: Tool = { metadata: { type: 'object', description: 'Additional details required by mandate', + additionalProperties: true, }, start_date: { type: 'string', @@ -1375,10 +1378,12 @@ export const tool: Tool = { type: 'object', description: 'Account details of the Connector. You can specify up to 50 keys, with key names up to 40 characters long and values up to 500 characters long. Useful for storing additional, structured information on an object.', + additionalProperties: true, }, metadata: { type: 'object', description: 'Metadata is useful for storing additional, unstructured information on an object.', + additionalProperties: true, }, }, }, @@ -1583,6 +1588,7 @@ export const tool: Tool = { payment_link_ui_rules: { type: 'object', description: 'Payment link configuration rules', + additionalProperties: true, }, sdk_layout: { type: 'string', @@ -1591,6 +1597,7 @@ export const tool: Tool = { sdk_ui_rules: { type: 'object', description: 'SDK configuration rules', + additionalProperties: true, }, seller_name: { type: 'string', @@ -1731,6 +1738,7 @@ export const tool: Tool = { properties: { ali_pay_qr: { type: 'object', + additionalProperties: true, }, }, required: ['ali_pay_qr'], @@ -1740,6 +1748,7 @@ export const tool: Tool = { properties: { ali_pay_redirect: { type: 'object', + additionalProperties: true, }, }, required: ['ali_pay_redirect'], @@ -1749,6 +1758,7 @@ export const tool: Tool = { properties: { ali_pay_hk_redirect: { type: 'object', + additionalProperties: true, }, }, required: ['ali_pay_hk_redirect'], @@ -1758,6 +1768,7 @@ export const tool: Tool = { properties: { amazon_pay_redirect: { type: 'object', + additionalProperties: true, }, }, required: ['amazon_pay_redirect'], @@ -1767,6 +1778,7 @@ export const tool: Tool = { properties: { momo_redirect: { type: 'object', + additionalProperties: true, }, }, required: ['momo_redirect'], @@ -1776,6 +1788,7 @@ export const tool: Tool = { properties: { kakao_pay_redirect: { type: 'object', + additionalProperties: true, }, }, required: ['kakao_pay_redirect'], @@ -1785,6 +1798,7 @@ export const tool: Tool = { properties: { go_pay_redirect: { type: 'object', + additionalProperties: true, }, }, required: ['go_pay_redirect'], @@ -1794,6 +1808,7 @@ export const tool: Tool = { properties: { gcash_redirect: { type: 'object', + additionalProperties: true, }, }, required: ['gcash_redirect'], @@ -1841,6 +1856,7 @@ export const tool: Tool = { properties: { apple_pay_redirect: { type: 'object', + additionalProperties: true, }, }, required: ['apple_pay_redirect'], @@ -1850,6 +1866,7 @@ export const tool: Tool = { properties: { apple_pay_third_party_sdk: { type: 'object', + additionalProperties: true, }, }, required: ['apple_pay_third_party_sdk'], @@ -1860,6 +1877,7 @@ export const tool: Tool = { dana_redirect: { type: 'object', description: 'Wallet data for DANA redirect flow', + additionalProperties: true, }, }, required: ['dana_redirect'], @@ -1934,6 +1952,7 @@ export const tool: Tool = { properties: { google_pay_redirect: { type: 'object', + additionalProperties: true, }, }, required: ['google_pay_redirect'], @@ -1943,6 +1962,7 @@ export const tool: Tool = { properties: { google_pay_third_party_sdk: { type: 'object', + additionalProperties: true, }, }, required: ['google_pay_third_party_sdk'], @@ -1969,6 +1989,7 @@ export const tool: Tool = { properties: { mobile_pay_redirect: { type: 'object', + additionalProperties: true, }, }, required: ['mobile_pay_redirect'], @@ -2107,6 +2128,7 @@ export const tool: Tool = { twint_redirect: { type: 'object', description: 'Wallet data for Twint Redirection', + additionalProperties: true, }, }, required: ['twint_redirect'], @@ -2117,6 +2139,7 @@ export const tool: Tool = { vipps_redirect: { type: 'object', description: 'Wallet data for Vipps Redirection', + additionalProperties: true, }, }, required: ['vipps_redirect'], @@ -2126,6 +2149,7 @@ export const tool: Tool = { properties: { touch_n_go_redirect: { type: 'object', + additionalProperties: true, }, }, required: ['touch_n_go_redirect'], @@ -2135,6 +2159,7 @@ export const tool: Tool = { properties: { we_chat_pay_redirect: { type: 'object', + additionalProperties: true, }, }, required: ['we_chat_pay_redirect'], @@ -2144,6 +2169,7 @@ export const tool: Tool = { properties: { we_chat_pay_qr: { type: 'object', + additionalProperties: true, }, }, required: ['we_chat_pay_qr'], @@ -2153,6 +2179,7 @@ export const tool: Tool = { properties: { cashapp_qr: { type: 'object', + additionalProperties: true, }, }, required: ['cashapp_qr'], @@ -2162,6 +2189,7 @@ export const tool: Tool = { properties: { swish_qr: { type: 'object', + additionalProperties: true, }, }, required: ['swish_qr'], @@ -2190,6 +2218,7 @@ export const tool: Tool = { properties: { revolut_pay: { type: 'object', + additionalProperties: true, }, }, required: ['revolut_pay'], @@ -2250,6 +2279,7 @@ export const tool: Tool = { affirm_redirect: { type: 'object', description: 'For Affirm redirect as PayLater Option', + additionalProperties: true, }, }, required: ['affirm_redirect'], @@ -2280,6 +2310,7 @@ export const tool: Tool = { pay_bright_redirect: { type: 'object', description: 'For PayBright Redirect as PayLater Option', + additionalProperties: true, }, }, required: ['pay_bright_redirect'], @@ -2290,6 +2321,7 @@ export const tool: Tool = { walley_redirect: { type: 'object', description: 'For WalleyRedirect as PayLater Option', + additionalProperties: true, }, }, required: ['walley_redirect'], @@ -2300,6 +2332,7 @@ export const tool: Tool = { alma_redirect: { type: 'object', description: 'For Alma Redirection as PayLater Option', + additionalProperties: true, }, }, required: ['alma_redirect'], @@ -2309,6 +2342,7 @@ export const tool: Tool = { properties: { atome_redirect: { type: 'object', + additionalProperties: true, }, }, required: ['atome_redirect'], @@ -2363,6 +2397,7 @@ export const tool: Tool = { properties: { bizum: { type: 'object', + additionalProperties: true, }, }, required: ['bizum'], @@ -2632,6 +2667,7 @@ export const tool: Tool = { properties: { local_bank_redirect: { type: 'object', + additionalProperties: true, }, }, required: ['local_bank_redirect'], @@ -3009,6 +3045,7 @@ export const tool: Tool = { properties: { pse: { type: 'object', + additionalProperties: true, }, }, required: ['pse'], @@ -3032,6 +3069,7 @@ export const tool: Tool = { properties: { instant_bank_transfer: { type: 'object', + additionalProperties: true, }, }, required: ['instant_bank_transfer'], @@ -3041,6 +3079,7 @@ export const tool: Tool = { properties: { instant_bank_transfer_finland: { type: 'object', + additionalProperties: true, }, }, required: ['instant_bank_transfer_finland'], @@ -3050,6 +3089,7 @@ export const tool: Tool = { properties: { instant_bank_transfer_poland: { type: 'object', + additionalProperties: true, }, }, required: ['instant_bank_transfer_poland'], @@ -3131,6 +3171,7 @@ export const tool: Tool = { properties: { upi_intent: { type: 'object', + additionalProperties: true, }, }, required: ['upi_intent'], @@ -3187,6 +3228,7 @@ export const tool: Tool = { properties: { pay_safe_card: { type: 'object', + additionalProperties: true, }, }, required: ['pay_safe_card'], @@ -3280,6 +3322,7 @@ export const tool: Tool = { properties: { knet: { type: 'object', + additionalProperties: true, }, }, required: ['knet'], @@ -3289,6 +3332,7 @@ export const tool: Tool = { properties: { benefit: { type: 'object', + additionalProperties: true, }, }, required: ['benefit'], @@ -3298,6 +3342,7 @@ export const tool: Tool = { properties: { momo_atm: { type: 'object', + additionalProperties: true, }, }, required: ['momo_atm'], @@ -3307,6 +3352,7 @@ export const tool: Tool = { properties: { card_redirect: { type: 'object', + additionalProperties: true, }, }, required: ['card_redirect'], @@ -3554,6 +3600,7 @@ export const tool: Tool = { properties: { fps: { type: 'object', + additionalProperties: true, }, }, required: ['fps'], @@ -3563,6 +3610,7 @@ export const tool: Tool = { properties: { duit_now: { type: 'object', + additionalProperties: true, }, }, required: ['duit_now'], @@ -3572,6 +3620,7 @@ export const tool: Tool = { properties: { prompt_pay: { type: 'object', + additionalProperties: true, }, }, required: ['prompt_pay'], @@ -3581,6 +3630,7 @@ export const tool: Tool = { properties: { viet_qr: { type: 'object', + additionalProperties: true, }, }, required: ['viet_qr'], @@ -3747,6 +3797,7 @@ export const tool: Tool = { properties: { open_banking_pis: { type: 'object', + additionalProperties: true, }, }, required: ['open_banking_pis'], diff --git a/packages/mcp-server/src/tools/payments/create-session-token-payments.ts b/packages/mcp-server/src/tools/payments/create-session-token-payments.ts index ccf6741..43908c7 100644 --- a/packages/mcp-server/src/tools/payments/create-session-token-payments.ts +++ b/packages/mcp-server/src/tools/payments/create-session-token-payments.ts @@ -173,10 +173,12 @@ export const tool: Tool = { type: 'object', description: 'Account details of the Connector. You can specify up to 50 keys, with key names up to 40 characters long and values up to 500 characters long. Useful for storing additional, structured information on an object.', + additionalProperties: true, }, metadata: { type: 'object', description: 'Metadata is useful for storing additional, unstructured information on an object.', + additionalProperties: true, }, }, }, diff --git a/packages/mcp-server/src/tools/payments/number-3ds/authenticate-payments-number-3ds.ts b/packages/mcp-server/src/tools/payments/number-3ds/authenticate-payments-number-3ds.ts index c01de5b..f916f63 100644 --- a/packages/mcp-server/src/tools/payments/number-3ds/authenticate-payments-number-3ds.ts +++ b/packages/mcp-server/src/tools/payments/number-3ds/authenticate-payments-number-3ds.ts @@ -52,6 +52,7 @@ export const tool: Tool = { sdk_ephem_pub_key: { type: 'object', description: 'Public key component of the ephemeral key pair generated by the 3DS SDK', + additionalProperties: true, }, sdk_max_timeout: { type: 'integer', diff --git a/packages/mcp-server/src/tools/payments/update-metadata-payments.ts b/packages/mcp-server/src/tools/payments/update-metadata-payments.ts index 7fb6233..639280b 100644 --- a/packages/mcp-server/src/tools/payments/update-metadata-payments.ts +++ b/packages/mcp-server/src/tools/payments/update-metadata-payments.ts @@ -18,7 +18,7 @@ export const metadata: Metadata = { export const tool: Tool = { name: 'update_metadata_payments', description: - "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\nPayments - Update Metadata\n\n# Response Schema\n```json\n{\n type: 'object',\n properties: {\n payment_id: {\n type: 'string',\n description: 'The identifier for the payment'\n },\n metadata: {\n type: 'object',\n description: 'Metadata is useful for storing additional, unstructured information on an object.'\n }\n },\n required: [ 'payment_id'\n ]\n}\n```", + "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\nPayments - Update Metadata\n\n# Response Schema\n```json\n{\n type: 'object',\n properties: {\n payment_id: {\n type: 'string',\n description: 'The identifier for the payment'\n },\n metadata: {\n type: 'object',\n description: 'Metadata is useful for storing additional, unstructured information on an object.',\n additionalProperties: true\n }\n },\n required: [ 'payment_id'\n ]\n}\n```", inputSchema: { type: 'object', properties: { @@ -28,6 +28,7 @@ export const tool: Tool = { metadata: { type: 'object', description: 'Metadata is useful for storing additional, unstructured information on an object.', + additionalProperties: true, }, jq_filter: { type: 'string', diff --git a/packages/mcp-server/src/tools/payments/update-payments.ts b/packages/mcp-server/src/tools/payments/update-payments.ts index e9418ad..6112942 100644 --- a/packages/mcp-server/src/tools/payments/update-payments.ts +++ b/packages/mcp-server/src/tools/payments/update-payments.ts @@ -101,6 +101,7 @@ export const tool: Tool = { frm_metadata: { type: 'object', description: 'Additional data related to some frm(Fraud Risk Management) connectors', + additionalProperties: true, }, is_iframe_redirection_enabled: { type: 'boolean', @@ -121,6 +122,7 @@ export const tool: Tool = { type: 'object', description: 'You can specify up to 50 keys, with key names up to 40 characters long and values up to 500 characters long. Metadata is useful for storing additional, structured information on an object.', + additionalProperties: true, }, off_session: { type: 'boolean', @@ -1332,6 +1334,7 @@ export const tool: Tool = { metadata: { type: 'object', description: 'Additional details required by mandate', + additionalProperties: true, }, start_date: { type: 'string', @@ -1363,10 +1366,12 @@ export const tool: Tool = { type: 'object', description: 'Account details of the Connector. You can specify up to 50 keys, with key names up to 40 characters long and values up to 500 characters long. Useful for storing additional, structured information on an object.', + additionalProperties: true, }, metadata: { type: 'object', description: 'Metadata is useful for storing additional, unstructured information on an object.', + additionalProperties: true, }, }, }, @@ -1571,6 +1576,7 @@ export const tool: Tool = { payment_link_ui_rules: { type: 'object', description: 'Payment link configuration rules', + additionalProperties: true, }, sdk_layout: { type: 'string', @@ -1579,6 +1585,7 @@ export const tool: Tool = { sdk_ui_rules: { type: 'object', description: 'SDK configuration rules', + additionalProperties: true, }, seller_name: { type: 'string', @@ -1719,6 +1726,7 @@ export const tool: Tool = { properties: { ali_pay_qr: { type: 'object', + additionalProperties: true, }, }, required: ['ali_pay_qr'], @@ -1728,6 +1736,7 @@ export const tool: Tool = { properties: { ali_pay_redirect: { type: 'object', + additionalProperties: true, }, }, required: ['ali_pay_redirect'], @@ -1737,6 +1746,7 @@ export const tool: Tool = { properties: { ali_pay_hk_redirect: { type: 'object', + additionalProperties: true, }, }, required: ['ali_pay_hk_redirect'], @@ -1746,6 +1756,7 @@ export const tool: Tool = { properties: { amazon_pay_redirect: { type: 'object', + additionalProperties: true, }, }, required: ['amazon_pay_redirect'], @@ -1755,6 +1766,7 @@ export const tool: Tool = { properties: { momo_redirect: { type: 'object', + additionalProperties: true, }, }, required: ['momo_redirect'], @@ -1764,6 +1776,7 @@ export const tool: Tool = { properties: { kakao_pay_redirect: { type: 'object', + additionalProperties: true, }, }, required: ['kakao_pay_redirect'], @@ -1773,6 +1786,7 @@ export const tool: Tool = { properties: { go_pay_redirect: { type: 'object', + additionalProperties: true, }, }, required: ['go_pay_redirect'], @@ -1782,6 +1796,7 @@ export const tool: Tool = { properties: { gcash_redirect: { type: 'object', + additionalProperties: true, }, }, required: ['gcash_redirect'], @@ -1829,6 +1844,7 @@ export const tool: Tool = { properties: { apple_pay_redirect: { type: 'object', + additionalProperties: true, }, }, required: ['apple_pay_redirect'], @@ -1838,6 +1854,7 @@ export const tool: Tool = { properties: { apple_pay_third_party_sdk: { type: 'object', + additionalProperties: true, }, }, required: ['apple_pay_third_party_sdk'], @@ -1848,6 +1865,7 @@ export const tool: Tool = { dana_redirect: { type: 'object', description: 'Wallet data for DANA redirect flow', + additionalProperties: true, }, }, required: ['dana_redirect'], @@ -1922,6 +1940,7 @@ export const tool: Tool = { properties: { google_pay_redirect: { type: 'object', + additionalProperties: true, }, }, required: ['google_pay_redirect'], @@ -1931,6 +1950,7 @@ export const tool: Tool = { properties: { google_pay_third_party_sdk: { type: 'object', + additionalProperties: true, }, }, required: ['google_pay_third_party_sdk'], @@ -1957,6 +1977,7 @@ export const tool: Tool = { properties: { mobile_pay_redirect: { type: 'object', + additionalProperties: true, }, }, required: ['mobile_pay_redirect'], @@ -2095,6 +2116,7 @@ export const tool: Tool = { twint_redirect: { type: 'object', description: 'Wallet data for Twint Redirection', + additionalProperties: true, }, }, required: ['twint_redirect'], @@ -2105,6 +2127,7 @@ export const tool: Tool = { vipps_redirect: { type: 'object', description: 'Wallet data for Vipps Redirection', + additionalProperties: true, }, }, required: ['vipps_redirect'], @@ -2114,6 +2137,7 @@ export const tool: Tool = { properties: { touch_n_go_redirect: { type: 'object', + additionalProperties: true, }, }, required: ['touch_n_go_redirect'], @@ -2123,6 +2147,7 @@ export const tool: Tool = { properties: { we_chat_pay_redirect: { type: 'object', + additionalProperties: true, }, }, required: ['we_chat_pay_redirect'], @@ -2132,6 +2157,7 @@ export const tool: Tool = { properties: { we_chat_pay_qr: { type: 'object', + additionalProperties: true, }, }, required: ['we_chat_pay_qr'], @@ -2141,6 +2167,7 @@ export const tool: Tool = { properties: { cashapp_qr: { type: 'object', + additionalProperties: true, }, }, required: ['cashapp_qr'], @@ -2150,6 +2177,7 @@ export const tool: Tool = { properties: { swish_qr: { type: 'object', + additionalProperties: true, }, }, required: ['swish_qr'], @@ -2178,6 +2206,7 @@ export const tool: Tool = { properties: { revolut_pay: { type: 'object', + additionalProperties: true, }, }, required: ['revolut_pay'], @@ -2238,6 +2267,7 @@ export const tool: Tool = { affirm_redirect: { type: 'object', description: 'For Affirm redirect as PayLater Option', + additionalProperties: true, }, }, required: ['affirm_redirect'], @@ -2268,6 +2298,7 @@ export const tool: Tool = { pay_bright_redirect: { type: 'object', description: 'For PayBright Redirect as PayLater Option', + additionalProperties: true, }, }, required: ['pay_bright_redirect'], @@ -2278,6 +2309,7 @@ export const tool: Tool = { walley_redirect: { type: 'object', description: 'For WalleyRedirect as PayLater Option', + additionalProperties: true, }, }, required: ['walley_redirect'], @@ -2288,6 +2320,7 @@ export const tool: Tool = { alma_redirect: { type: 'object', description: 'For Alma Redirection as PayLater Option', + additionalProperties: true, }, }, required: ['alma_redirect'], @@ -2297,6 +2330,7 @@ export const tool: Tool = { properties: { atome_redirect: { type: 'object', + additionalProperties: true, }, }, required: ['atome_redirect'], @@ -2351,6 +2385,7 @@ export const tool: Tool = { properties: { bizum: { type: 'object', + additionalProperties: true, }, }, required: ['bizum'], @@ -2620,6 +2655,7 @@ export const tool: Tool = { properties: { local_bank_redirect: { type: 'object', + additionalProperties: true, }, }, required: ['local_bank_redirect'], @@ -2997,6 +3033,7 @@ export const tool: Tool = { properties: { pse: { type: 'object', + additionalProperties: true, }, }, required: ['pse'], @@ -3020,6 +3057,7 @@ export const tool: Tool = { properties: { instant_bank_transfer: { type: 'object', + additionalProperties: true, }, }, required: ['instant_bank_transfer'], @@ -3029,6 +3067,7 @@ export const tool: Tool = { properties: { instant_bank_transfer_finland: { type: 'object', + additionalProperties: true, }, }, required: ['instant_bank_transfer_finland'], @@ -3038,6 +3077,7 @@ export const tool: Tool = { properties: { instant_bank_transfer_poland: { type: 'object', + additionalProperties: true, }, }, required: ['instant_bank_transfer_poland'], @@ -3119,6 +3159,7 @@ export const tool: Tool = { properties: { upi_intent: { type: 'object', + additionalProperties: true, }, }, required: ['upi_intent'], @@ -3175,6 +3216,7 @@ export const tool: Tool = { properties: { pay_safe_card: { type: 'object', + additionalProperties: true, }, }, required: ['pay_safe_card'], @@ -3268,6 +3310,7 @@ export const tool: Tool = { properties: { knet: { type: 'object', + additionalProperties: true, }, }, required: ['knet'], @@ -3277,6 +3320,7 @@ export const tool: Tool = { properties: { benefit: { type: 'object', + additionalProperties: true, }, }, required: ['benefit'], @@ -3286,6 +3330,7 @@ export const tool: Tool = { properties: { momo_atm: { type: 'object', + additionalProperties: true, }, }, required: ['momo_atm'], @@ -3295,6 +3340,7 @@ export const tool: Tool = { properties: { card_redirect: { type: 'object', + additionalProperties: true, }, }, required: ['card_redirect'], @@ -3542,6 +3588,7 @@ export const tool: Tool = { properties: { fps: { type: 'object', + additionalProperties: true, }, }, required: ['fps'], @@ -3551,6 +3598,7 @@ export const tool: Tool = { properties: { duit_now: { type: 'object', + additionalProperties: true, }, }, required: ['duit_now'], @@ -3560,6 +3608,7 @@ export const tool: Tool = { properties: { prompt_pay: { type: 'object', + additionalProperties: true, }, }, required: ['prompt_pay'], @@ -3569,6 +3618,7 @@ export const tool: Tool = { properties: { viet_qr: { type: 'object', + additionalProperties: true, }, }, required: ['viet_qr'], @@ -3735,6 +3785,7 @@ export const tool: Tool = { properties: { open_banking_pis: { type: 'object', + additionalProperties: true, }, }, required: ['open_banking_pis'], diff --git a/packages/mcp-server/src/tools/payouts/confirm-payouts.ts b/packages/mcp-server/src/tools/payouts/confirm-payouts.ts index 37927d5..b1e5e26 100644 --- a/packages/mcp-server/src/tools/payouts/confirm-payouts.ts +++ b/packages/mcp-server/src/tools/payouts/confirm-payouts.ts @@ -80,6 +80,7 @@ export const tool: Tool = { type: 'object', description: 'You can specify up to 50 keys, with key names up to 40 characters long and values up to 500 characters long. Metadata is useful for storing additional, structured information on an object.', + additionalProperties: true, }, name: { type: 'string', @@ -987,6 +988,7 @@ export const tool: Tool = { }, metadata: { type: 'object', + additionalProperties: true, }, rules: { type: 'object', @@ -1037,6 +1039,7 @@ export const tool: Tool = { }, metadata: { type: 'object', + additionalProperties: true, }, rules: { type: 'object', @@ -1263,6 +1266,7 @@ export const tool: Tool = { type: 'object', description: 'Additional metadata that the Static Analyzer and Backend does not touch.\nThis can be used to store useful information for the frontend and is required for communication\nbetween the static analyzer and the frontend.', + additionalProperties: true, }, value: { anyOf: [ diff --git a/packages/mcp-server/src/tools/payouts/create-payouts.ts b/packages/mcp-server/src/tools/payouts/create-payouts.ts index 3472276..20c5c79 100644 --- a/packages/mcp-server/src/tools/payouts/create-payouts.ts +++ b/packages/mcp-server/src/tools/payouts/create-payouts.ts @@ -78,6 +78,7 @@ export const tool: Tool = { type: 'object', description: 'You can specify up to 50 keys, with key names up to 40 characters long and values up to 500 characters long. Metadata is useful for storing additional, structured information on an object.', + additionalProperties: true, }, name: { type: 'string', @@ -985,6 +986,7 @@ export const tool: Tool = { }, metadata: { type: 'object', + additionalProperties: true, }, rules: { type: 'object', @@ -1035,6 +1037,7 @@ export const tool: Tool = { }, metadata: { type: 'object', + additionalProperties: true, }, rules: { type: 'object', @@ -1261,6 +1264,7 @@ export const tool: Tool = { type: 'object', description: 'Additional metadata that the Static Analyzer and Backend does not touch.\nThis can be used to store useful information for the frontend and is required for communication\nbetween the static analyzer and the frontend.', + additionalProperties: true, }, value: { anyOf: [ diff --git a/packages/mcp-server/src/tools/payouts/update-payouts.ts b/packages/mcp-server/src/tools/payouts/update-payouts.ts index d2c65e1..dfa2156 100644 --- a/packages/mcp-server/src/tools/payouts/update-payouts.ts +++ b/packages/mcp-server/src/tools/payouts/update-payouts.ts @@ -85,6 +85,7 @@ export const tool: Tool = { type: 'object', description: 'You can specify up to 50 keys, with key names up to 40 characters long and values up to 500 characters long. Metadata is useful for storing additional, structured information on an object.', + additionalProperties: true, }, name: { type: 'string', @@ -992,6 +993,7 @@ export const tool: Tool = { }, metadata: { type: 'object', + additionalProperties: true, }, rules: { type: 'object', @@ -1042,6 +1044,7 @@ export const tool: Tool = { }, metadata: { type: 'object', + additionalProperties: true, }, rules: { type: 'object', @@ -1268,6 +1271,7 @@ export const tool: Tool = { type: 'object', description: 'Additional metadata that the Static Analyzer and Backend does not touch.\nThis can be used to store useful information for the frontend and is required for communication\nbetween the static analyzer and the frontend.', + additionalProperties: true, }, value: { anyOf: [ diff --git a/packages/mcp-server/src/tools/refunds/create-refunds.ts b/packages/mcp-server/src/tools/refunds/create-refunds.ts index 89b60f2..bce59a5 100644 --- a/packages/mcp-server/src/tools/refunds/create-refunds.ts +++ b/packages/mcp-server/src/tools/refunds/create-refunds.ts @@ -41,6 +41,7 @@ export const tool: Tool = { type: 'object', description: 'You can specify up to 50 keys, with key names up to 40 characters long and values up to 500 characters long. Metadata is useful for storing additional, structured information on an object.', + additionalProperties: true, }, reason: { type: 'string', @@ -85,10 +86,12 @@ export const tool: Tool = { type: 'object', description: 'Account details of the Connector. You can specify up to 50 keys, with key names up to 40 characters long and values up to 500 characters long. Useful for storing additional, structured information on an object.', + additionalProperties: true, }, metadata: { type: 'object', description: 'Metadata is useful for storing additional, unstructured information on an object.', + additionalProperties: true, }, }, }, diff --git a/packages/mcp-server/src/tools/refunds/retrieve-refunds.ts b/packages/mcp-server/src/tools/refunds/retrieve-refunds.ts index b7f720c..6819674 100644 --- a/packages/mcp-server/src/tools/refunds/retrieve-refunds.ts +++ b/packages/mcp-server/src/tools/refunds/retrieve-refunds.ts @@ -18,7 +18,7 @@ export const metadata: Metadata = { export const tool: Tool = { name: 'retrieve_refunds', description: - "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\nRetrieves a Refund. This may be used to get the status of a previously initiated refund\n\n# Response Schema\n```json\n{\n $ref: '#/$defs/refund_response',\n $defs: {\n refund_response: {\n type: 'object',\n properties: {\n amount: {\n type: 'integer',\n description: 'The refund amount, which should be less than or equal to the total payment amount. Amount for the payment in lowest denomination of the currency. (i.e) in cents for USD denomination, in paisa for INR denomination etc'\n },\n connector: {\n type: 'string',\n description: 'The connector used for the refund and the corresponding payment'\n },\n currency: {\n type: 'string',\n description: 'The three-letter ISO currency code'\n },\n payment_id: {\n type: 'string',\n description: 'The payment id against which refund is initiated'\n },\n refund_id: {\n type: 'string',\n description: 'Unique Identifier for the refund'\n },\n status: {\n $ref: '#/$defs/refund_status'\n },\n created_at: {\n type: 'string',\n description: 'The timestamp at which refund is created',\n format: 'date-time'\n },\n error_code: {\n type: 'string',\n description: 'The code for the error'\n },\n error_message: {\n type: 'string',\n description: 'The error message'\n },\n issuer_error_code: {\n type: 'string',\n description: 'Error code received from the issuer in case of failed refunds'\n },\n issuer_error_message: {\n type: 'string',\n description: 'Error message received from the issuer in case of failed refunds'\n },\n merchant_connector_id: {\n type: 'string',\n description: 'The merchant_connector_id of the processor through which this payment went through'\n },\n metadata: {\n type: 'object',\n description: 'You can specify up to 50 keys, with key names up to 40 characters long and values up to 500 characters long. Metadata is useful for storing additional, structured information on an object'\n },\n profile_id: {\n type: 'string',\n description: 'The id of business profile for this refund'\n },\n reason: {\n type: 'string',\n description: 'An arbitrary string attached to the object. Often useful for displaying to users and your customer support executive'\n },\n split_refunds: {\n $ref: '#/$defs/split_refund'\n },\n unified_code: {\n type: 'string',\n description: 'Error code unified across the connectors is received here if there was an error while calling connector'\n },\n unified_message: {\n type: 'string',\n description: 'Error message unified across the connectors is received here if there was an error while calling connector'\n },\n updated_at: {\n type: 'string',\n description: 'The timestamp at which refund is updated',\n format: 'date-time'\n }\n },\n required: [ 'amount',\n 'connector',\n 'currency',\n 'payment_id',\n 'refund_id',\n 'status'\n ]\n },\n refund_status: {\n type: 'string',\n description: 'The status for refunds',\n enum: [ 'succeeded',\n 'failed',\n 'pending',\n 'review'\n ]\n },\n split_refund: {\n anyOf: [ {\n type: 'object',\n properties: {\n stripe_split_refund: {\n type: 'object',\n description: 'Charge specific fields for controlling the revert of funds from either platform or connected account for Stripe. Check sub-fields for more details.',\n properties: {\n revert_platform_fee: {\n type: 'boolean',\n description: 'Toggle for reverting the application fee that was collected for the payment.\\nIf set to false, the funds are pulled from the destination account.'\n },\n revert_transfer: {\n type: 'boolean',\n description: 'Toggle for reverting the transfer that was made during the charge.\\nIf set to false, the funds are pulled from the main platform\\'s account.'\n }\n }\n }\n },\n required: [ 'stripe_split_refund'\n ]\n },\n {\n type: 'object',\n properties: {\n adyen_split_refund: {\n $ref: '#/$defs/adyen_split_data'\n }\n },\n required: [ 'adyen_split_refund'\n ]\n },\n {\n type: 'object',\n properties: {\n xendit_split_refund: {\n $ref: '#/$defs/xendit_split_sub_merchant_data'\n }\n },\n required: [ 'xendit_split_refund'\n ]\n }\n ],\n description: 'Charge specific fields for controlling the revert of funds from either platform or connected account. Check sub-fields for more details.'\n },\n adyen_split_data: {\n type: 'object',\n description: 'Fee information for Split Payments to be charged on the payment being collected for Adyen',\n properties: {\n split_items: {\n type: 'array',\n description: 'Data for the split items',\n items: {\n type: 'object',\n description: 'Data for the split items',\n properties: {\n amount: {\n type: 'integer',\n description: 'The amount of the split item'\n },\n reference: {\n type: 'string',\n description: 'Unique Identifier for the split item'\n },\n split_type: {\n type: 'string',\n enum: [ 'BalanceAccount',\n 'AcquiringFees',\n 'PaymentFee',\n 'AdyenFees',\n 'AdyenCommission',\n 'AdyenMarkup',\n 'Interchange',\n 'SchemeFee',\n 'Commission',\n 'TopUp',\n 'Vat'\n ]\n },\n account: {\n type: 'string',\n description: 'The unique identifier of the account to which the split amount is allocated.'\n },\n description: {\n type: 'string',\n description: 'Description for the part of the payment that will be allocated to the specified account.'\n }\n },\n required: [ 'amount',\n 'reference',\n 'split_type'\n ]\n }\n },\n store: {\n type: 'string',\n description: 'The store identifier'\n }\n },\n required: [ 'split_items'\n ]\n },\n xendit_split_sub_merchant_data: {\n type: 'object',\n description: 'Fee information to be charged on the payment being collected for sub-merchant via xendit',\n properties: {\n for_user_id: {\n type: 'string',\n description: 'The sub-account user-id that you want to make this transaction for.'\n }\n },\n required: [ 'for_user_id'\n ]\n }\n }\n}\n```", + "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\nRetrieves a Refund. This may be used to get the status of a previously initiated refund\n\n# Response Schema\n```json\n{\n $ref: '#/$defs/refund_response',\n $defs: {\n refund_response: {\n type: 'object',\n properties: {\n amount: {\n type: 'integer',\n description: 'The refund amount, which should be less than or equal to the total payment amount. Amount for the payment in lowest denomination of the currency. (i.e) in cents for USD denomination, in paisa for INR denomination etc'\n },\n connector: {\n type: 'string',\n description: 'The connector used for the refund and the corresponding payment'\n },\n currency: {\n type: 'string',\n description: 'The three-letter ISO currency code'\n },\n payment_id: {\n type: 'string',\n description: 'The payment id against which refund is initiated'\n },\n refund_id: {\n type: 'string',\n description: 'Unique Identifier for the refund'\n },\n status: {\n $ref: '#/$defs/refund_status'\n },\n created_at: {\n type: 'string',\n description: 'The timestamp at which refund is created',\n format: 'date-time'\n },\n error_code: {\n type: 'string',\n description: 'The code for the error'\n },\n error_message: {\n type: 'string',\n description: 'The error message'\n },\n issuer_error_code: {\n type: 'string',\n description: 'Error code received from the issuer in case of failed refunds'\n },\n issuer_error_message: {\n type: 'string',\n description: 'Error message received from the issuer in case of failed refunds'\n },\n merchant_connector_id: {\n type: 'string',\n description: 'The merchant_connector_id of the processor through which this payment went through'\n },\n metadata: {\n type: 'object',\n description: 'You can specify up to 50 keys, with key names up to 40 characters long and values up to 500 characters long. Metadata is useful for storing additional, structured information on an object',\n additionalProperties: true\n },\n profile_id: {\n type: 'string',\n description: 'The id of business profile for this refund'\n },\n reason: {\n type: 'string',\n description: 'An arbitrary string attached to the object. Often useful for displaying to users and your customer support executive'\n },\n split_refunds: {\n $ref: '#/$defs/split_refund'\n },\n unified_code: {\n type: 'string',\n description: 'Error code unified across the connectors is received here if there was an error while calling connector'\n },\n unified_message: {\n type: 'string',\n description: 'Error message unified across the connectors is received here if there was an error while calling connector'\n },\n updated_at: {\n type: 'string',\n description: 'The timestamp at which refund is updated',\n format: 'date-time'\n }\n },\n required: [ 'amount',\n 'connector',\n 'currency',\n 'payment_id',\n 'refund_id',\n 'status'\n ]\n },\n refund_status: {\n type: 'string',\n description: 'The status for refunds',\n enum: [ 'succeeded',\n 'failed',\n 'pending',\n 'review'\n ]\n },\n split_refund: {\n anyOf: [ {\n type: 'object',\n properties: {\n stripe_split_refund: {\n type: 'object',\n description: 'Charge specific fields for controlling the revert of funds from either platform or connected account for Stripe. Check sub-fields for more details.',\n properties: {\n revert_platform_fee: {\n type: 'boolean',\n description: 'Toggle for reverting the application fee that was collected for the payment.\\nIf set to false, the funds are pulled from the destination account.'\n },\n revert_transfer: {\n type: 'boolean',\n description: 'Toggle for reverting the transfer that was made during the charge.\\nIf set to false, the funds are pulled from the main platform\\'s account.'\n }\n }\n }\n },\n required: [ 'stripe_split_refund'\n ]\n },\n {\n type: 'object',\n properties: {\n adyen_split_refund: {\n $ref: '#/$defs/adyen_split_data'\n }\n },\n required: [ 'adyen_split_refund'\n ]\n },\n {\n type: 'object',\n properties: {\n xendit_split_refund: {\n $ref: '#/$defs/xendit_split_sub_merchant_data'\n }\n },\n required: [ 'xendit_split_refund'\n ]\n }\n ],\n description: 'Charge specific fields for controlling the revert of funds from either platform or connected account. Check sub-fields for more details.'\n },\n adyen_split_data: {\n type: 'object',\n description: 'Fee information for Split Payments to be charged on the payment being collected for Adyen',\n properties: {\n split_items: {\n type: 'array',\n description: 'Data for the split items',\n items: {\n type: 'object',\n description: 'Data for the split items',\n properties: {\n amount: {\n type: 'integer',\n description: 'The amount of the split item'\n },\n reference: {\n type: 'string',\n description: 'Unique Identifier for the split item'\n },\n split_type: {\n type: 'string',\n enum: [ 'BalanceAccount',\n 'AcquiringFees',\n 'PaymentFee',\n 'AdyenFees',\n 'AdyenCommission',\n 'AdyenMarkup',\n 'Interchange',\n 'SchemeFee',\n 'Commission',\n 'TopUp',\n 'Vat'\n ]\n },\n account: {\n type: 'string',\n description: 'The unique identifier of the account to which the split amount is allocated.'\n },\n description: {\n type: 'string',\n description: 'Description for the part of the payment that will be allocated to the specified account.'\n }\n },\n required: [ 'amount',\n 'reference',\n 'split_type'\n ]\n }\n },\n store: {\n type: 'string',\n description: 'The store identifier'\n }\n },\n required: [ 'split_items'\n ]\n },\n xendit_split_sub_merchant_data: {\n type: 'object',\n description: 'Fee information to be charged on the payment being collected for sub-merchant via xendit',\n properties: {\n for_user_id: {\n type: 'string',\n description: 'The sub-account user-id that you want to make this transaction for.'\n }\n },\n required: [ 'for_user_id'\n ]\n }\n }\n}\n```", inputSchema: { type: 'object', properties: { diff --git a/packages/mcp-server/src/tools/refunds/update-refunds.ts b/packages/mcp-server/src/tools/refunds/update-refunds.ts index 67f74f2..50389a2 100644 --- a/packages/mcp-server/src/tools/refunds/update-refunds.ts +++ b/packages/mcp-server/src/tools/refunds/update-refunds.ts @@ -18,7 +18,7 @@ export const metadata: Metadata = { export const tool: Tool = { name: 'update_refunds', description: - "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\nUpdates the properties of a Refund object. This API can be used to attach a reason for the refund or metadata fields\n\n# Response Schema\n```json\n{\n $ref: '#/$defs/refund_response',\n $defs: {\n refund_response: {\n type: 'object',\n properties: {\n amount: {\n type: 'integer',\n description: 'The refund amount, which should be less than or equal to the total payment amount. Amount for the payment in lowest denomination of the currency. (i.e) in cents for USD denomination, in paisa for INR denomination etc'\n },\n connector: {\n type: 'string',\n description: 'The connector used for the refund and the corresponding payment'\n },\n currency: {\n type: 'string',\n description: 'The three-letter ISO currency code'\n },\n payment_id: {\n type: 'string',\n description: 'The payment id against which refund is initiated'\n },\n refund_id: {\n type: 'string',\n description: 'Unique Identifier for the refund'\n },\n status: {\n $ref: '#/$defs/refund_status'\n },\n created_at: {\n type: 'string',\n description: 'The timestamp at which refund is created',\n format: 'date-time'\n },\n error_code: {\n type: 'string',\n description: 'The code for the error'\n },\n error_message: {\n type: 'string',\n description: 'The error message'\n },\n issuer_error_code: {\n type: 'string',\n description: 'Error code received from the issuer in case of failed refunds'\n },\n issuer_error_message: {\n type: 'string',\n description: 'Error message received from the issuer in case of failed refunds'\n },\n merchant_connector_id: {\n type: 'string',\n description: 'The merchant_connector_id of the processor through which this payment went through'\n },\n metadata: {\n type: 'object',\n description: 'You can specify up to 50 keys, with key names up to 40 characters long and values up to 500 characters long. Metadata is useful for storing additional, structured information on an object'\n },\n profile_id: {\n type: 'string',\n description: 'The id of business profile for this refund'\n },\n reason: {\n type: 'string',\n description: 'An arbitrary string attached to the object. Often useful for displaying to users and your customer support executive'\n },\n split_refunds: {\n $ref: '#/$defs/split_refund'\n },\n unified_code: {\n type: 'string',\n description: 'Error code unified across the connectors is received here if there was an error while calling connector'\n },\n unified_message: {\n type: 'string',\n description: 'Error message unified across the connectors is received here if there was an error while calling connector'\n },\n updated_at: {\n type: 'string',\n description: 'The timestamp at which refund is updated',\n format: 'date-time'\n }\n },\n required: [ 'amount',\n 'connector',\n 'currency',\n 'payment_id',\n 'refund_id',\n 'status'\n ]\n },\n refund_status: {\n type: 'string',\n description: 'The status for refunds',\n enum: [ 'succeeded',\n 'failed',\n 'pending',\n 'review'\n ]\n },\n split_refund: {\n anyOf: [ {\n type: 'object',\n properties: {\n stripe_split_refund: {\n type: 'object',\n description: 'Charge specific fields for controlling the revert of funds from either platform or connected account for Stripe. Check sub-fields for more details.',\n properties: {\n revert_platform_fee: {\n type: 'boolean',\n description: 'Toggle for reverting the application fee that was collected for the payment.\\nIf set to false, the funds are pulled from the destination account.'\n },\n revert_transfer: {\n type: 'boolean',\n description: 'Toggle for reverting the transfer that was made during the charge.\\nIf set to false, the funds are pulled from the main platform\\'s account.'\n }\n }\n }\n },\n required: [ 'stripe_split_refund'\n ]\n },\n {\n type: 'object',\n properties: {\n adyen_split_refund: {\n $ref: '#/$defs/adyen_split_data'\n }\n },\n required: [ 'adyen_split_refund'\n ]\n },\n {\n type: 'object',\n properties: {\n xendit_split_refund: {\n $ref: '#/$defs/xendit_split_sub_merchant_data'\n }\n },\n required: [ 'xendit_split_refund'\n ]\n }\n ],\n description: 'Charge specific fields for controlling the revert of funds from either platform or connected account. Check sub-fields for more details.'\n },\n adyen_split_data: {\n type: 'object',\n description: 'Fee information for Split Payments to be charged on the payment being collected for Adyen',\n properties: {\n split_items: {\n type: 'array',\n description: 'Data for the split items',\n items: {\n type: 'object',\n description: 'Data for the split items',\n properties: {\n amount: {\n type: 'integer',\n description: 'The amount of the split item'\n },\n reference: {\n type: 'string',\n description: 'Unique Identifier for the split item'\n },\n split_type: {\n type: 'string',\n enum: [ 'BalanceAccount',\n 'AcquiringFees',\n 'PaymentFee',\n 'AdyenFees',\n 'AdyenCommission',\n 'AdyenMarkup',\n 'Interchange',\n 'SchemeFee',\n 'Commission',\n 'TopUp',\n 'Vat'\n ]\n },\n account: {\n type: 'string',\n description: 'The unique identifier of the account to which the split amount is allocated.'\n },\n description: {\n type: 'string',\n description: 'Description for the part of the payment that will be allocated to the specified account.'\n }\n },\n required: [ 'amount',\n 'reference',\n 'split_type'\n ]\n }\n },\n store: {\n type: 'string',\n description: 'The store identifier'\n }\n },\n required: [ 'split_items'\n ]\n },\n xendit_split_sub_merchant_data: {\n type: 'object',\n description: 'Fee information to be charged on the payment being collected for sub-merchant via xendit',\n properties: {\n for_user_id: {\n type: 'string',\n description: 'The sub-account user-id that you want to make this transaction for.'\n }\n },\n required: [ 'for_user_id'\n ]\n }\n }\n}\n```", + "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\nUpdates the properties of a Refund object. This API can be used to attach a reason for the refund or metadata fields\n\n# Response Schema\n```json\n{\n $ref: '#/$defs/refund_response',\n $defs: {\n refund_response: {\n type: 'object',\n properties: {\n amount: {\n type: 'integer',\n description: 'The refund amount, which should be less than or equal to the total payment amount. Amount for the payment in lowest denomination of the currency. (i.e) in cents for USD denomination, in paisa for INR denomination etc'\n },\n connector: {\n type: 'string',\n description: 'The connector used for the refund and the corresponding payment'\n },\n currency: {\n type: 'string',\n description: 'The three-letter ISO currency code'\n },\n payment_id: {\n type: 'string',\n description: 'The payment id against which refund is initiated'\n },\n refund_id: {\n type: 'string',\n description: 'Unique Identifier for the refund'\n },\n status: {\n $ref: '#/$defs/refund_status'\n },\n created_at: {\n type: 'string',\n description: 'The timestamp at which refund is created',\n format: 'date-time'\n },\n error_code: {\n type: 'string',\n description: 'The code for the error'\n },\n error_message: {\n type: 'string',\n description: 'The error message'\n },\n issuer_error_code: {\n type: 'string',\n description: 'Error code received from the issuer in case of failed refunds'\n },\n issuer_error_message: {\n type: 'string',\n description: 'Error message received from the issuer in case of failed refunds'\n },\n merchant_connector_id: {\n type: 'string',\n description: 'The merchant_connector_id of the processor through which this payment went through'\n },\n metadata: {\n type: 'object',\n description: 'You can specify up to 50 keys, with key names up to 40 characters long and values up to 500 characters long. Metadata is useful for storing additional, structured information on an object',\n additionalProperties: true\n },\n profile_id: {\n type: 'string',\n description: 'The id of business profile for this refund'\n },\n reason: {\n type: 'string',\n description: 'An arbitrary string attached to the object. Often useful for displaying to users and your customer support executive'\n },\n split_refunds: {\n $ref: '#/$defs/split_refund'\n },\n unified_code: {\n type: 'string',\n description: 'Error code unified across the connectors is received here if there was an error while calling connector'\n },\n unified_message: {\n type: 'string',\n description: 'Error message unified across the connectors is received here if there was an error while calling connector'\n },\n updated_at: {\n type: 'string',\n description: 'The timestamp at which refund is updated',\n format: 'date-time'\n }\n },\n required: [ 'amount',\n 'connector',\n 'currency',\n 'payment_id',\n 'refund_id',\n 'status'\n ]\n },\n refund_status: {\n type: 'string',\n description: 'The status for refunds',\n enum: [ 'succeeded',\n 'failed',\n 'pending',\n 'review'\n ]\n },\n split_refund: {\n anyOf: [ {\n type: 'object',\n properties: {\n stripe_split_refund: {\n type: 'object',\n description: 'Charge specific fields for controlling the revert of funds from either platform or connected account for Stripe. Check sub-fields for more details.',\n properties: {\n revert_platform_fee: {\n type: 'boolean',\n description: 'Toggle for reverting the application fee that was collected for the payment.\\nIf set to false, the funds are pulled from the destination account.'\n },\n revert_transfer: {\n type: 'boolean',\n description: 'Toggle for reverting the transfer that was made during the charge.\\nIf set to false, the funds are pulled from the main platform\\'s account.'\n }\n }\n }\n },\n required: [ 'stripe_split_refund'\n ]\n },\n {\n type: 'object',\n properties: {\n adyen_split_refund: {\n $ref: '#/$defs/adyen_split_data'\n }\n },\n required: [ 'adyen_split_refund'\n ]\n },\n {\n type: 'object',\n properties: {\n xendit_split_refund: {\n $ref: '#/$defs/xendit_split_sub_merchant_data'\n }\n },\n required: [ 'xendit_split_refund'\n ]\n }\n ],\n description: 'Charge specific fields for controlling the revert of funds from either platform or connected account. Check sub-fields for more details.'\n },\n adyen_split_data: {\n type: 'object',\n description: 'Fee information for Split Payments to be charged on the payment being collected for Adyen',\n properties: {\n split_items: {\n type: 'array',\n description: 'Data for the split items',\n items: {\n type: 'object',\n description: 'Data for the split items',\n properties: {\n amount: {\n type: 'integer',\n description: 'The amount of the split item'\n },\n reference: {\n type: 'string',\n description: 'Unique Identifier for the split item'\n },\n split_type: {\n type: 'string',\n enum: [ 'BalanceAccount',\n 'AcquiringFees',\n 'PaymentFee',\n 'AdyenFees',\n 'AdyenCommission',\n 'AdyenMarkup',\n 'Interchange',\n 'SchemeFee',\n 'Commission',\n 'TopUp',\n 'Vat'\n ]\n },\n account: {\n type: 'string',\n description: 'The unique identifier of the account to which the split amount is allocated.'\n },\n description: {\n type: 'string',\n description: 'Description for the part of the payment that will be allocated to the specified account.'\n }\n },\n required: [ 'amount',\n 'reference',\n 'split_type'\n ]\n }\n },\n store: {\n type: 'string',\n description: 'The store identifier'\n }\n },\n required: [ 'split_items'\n ]\n },\n xendit_split_sub_merchant_data: {\n type: 'object',\n description: 'Fee information to be charged on the payment being collected for sub-merchant via xendit',\n properties: {\n for_user_id: {\n type: 'string',\n description: 'The sub-account user-id that you want to make this transaction for.'\n }\n },\n required: [ 'for_user_id'\n ]\n }\n }\n}\n```", inputSchema: { type: 'object', properties: { @@ -29,6 +29,7 @@ export const tool: Tool = { type: 'object', description: 'You can specify up to 50 keys, with key names up to 40 characters long and values up to 500 characters long. Metadata is useful for storing additional, structured information on an object.', + additionalProperties: true, }, reason: { type: 'string', diff --git a/packages/mcp-server/src/tools/routing/create-routing.ts b/packages/mcp-server/src/tools/routing/create-routing.ts index 997b2e4..4434c02 100644 --- a/packages/mcp-server/src/tools/routing/create-routing.ts +++ b/packages/mcp-server/src/tools/routing/create-routing.ts @@ -98,6 +98,7 @@ export const tool: Tool = { }, metadata: { type: 'object', + additionalProperties: true, }, rules: { type: 'object', @@ -148,6 +149,7 @@ export const tool: Tool = { }, metadata: { type: 'object', + additionalProperties: true, }, rules: { type: 'object', @@ -374,6 +376,7 @@ export const tool: Tool = { type: 'object', description: 'Additional metadata that the Static Analyzer and Backend does not touch.\nThis can be used to store useful information for the frontend and is required for communication\nbetween the static analyzer and the frontend.', + additionalProperties: true, }, value: { anyOf: [ diff --git a/packages/mcp-server/src/tools/routing/deactivate-routing.ts b/packages/mcp-server/src/tools/routing/deactivate-routing.ts index bc4d2a9..9e5eb70 100644 --- a/packages/mcp-server/src/tools/routing/deactivate-routing.ts +++ b/packages/mcp-server/src/tools/routing/deactivate-routing.ts @@ -98,6 +98,7 @@ export const tool: Tool = { }, metadata: { type: 'object', + additionalProperties: true, }, rules: { type: 'object', @@ -148,6 +149,7 @@ export const tool: Tool = { }, metadata: { type: 'object', + additionalProperties: true, }, rules: { type: 'object', @@ -374,6 +376,7 @@ export const tool: Tool = { type: 'object', description: 'Additional metadata that the Static Analyzer and Backend does not touch.\nThis can be used to store useful information for the frontend and is required for communication\nbetween the static analyzer and the frontend.', + additionalProperties: true, }, value: { anyOf: [ From 23045e5f3a564d3daa3b1256636a6b7395de0ed0 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 15 Aug 2025 03:12:07 +0000 Subject: [PATCH 26/44] chore(mcp): document remote server in README.md --- packages/mcp-server/README.md | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/packages/mcp-server/README.md b/packages/mcp-server/README.md index f34ecc4..0c53397 100644 --- a/packages/mcp-server/README.md +++ b/packages/mcp-server/README.md @@ -147,6 +147,35 @@ over time, you can manually enable or disable certain capabilities: --resource=cards,accounts --operation=read --tag=kyc --no-tool=create_cards ``` +## Running remotely + +Launching the client with `--transport=http` launches the server as a remote server using Streamable HTTP transport. The `--port` setting can choose the port it will run on, and the `--socket` setting allows it to run on a Unix socket. + +Authorization can be provided via the `Authorization` header using the Bearer scheme. + +Additionally, authorization can be provided via the following headers: +| Header | Equivalent client option | Security scheme | +| ----------------------- | ------------------------ | --------------- | +| `api-key` | `apiKey` | api_key | +| `api-key` | `ephemeralKey` | ephemeral_key | +| `x-hyperswitch-jwt-key` | `jwtKey` | jwt_key | +| `api-key` | `publishableKey` | publishable_key | + +A configuration JSON for this server might look like this: + +```json +{ + "mcpServers": { + "hyperswitch_api": { + "url": "http://localhost:3000", # or wherever the server is hosted + "headers": { + "Authorization": "Bearer " + } + } + } +} +``` + ## Importing the tools and server individually ```js From d4a921b33249431274fe01f2e8e71b1df30599dc Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Sat, 16 Aug 2025 03:39:30 +0000 Subject: [PATCH 27/44] chore(deps): update dependency @types/node to v20.17.58 --- yarn.lock | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/yarn.lock b/yarn.lock index 58c08d5..fd164dc 100644 --- a/yarn.lock +++ b/yarn.lock @@ -938,11 +938,11 @@ undici-types "~5.26.4" "@types/node@^20.17.6": - version "20.17.6" - resolved "https://registry.yarnpkg.com/@types/node/-/node-20.17.6.tgz#6e4073230c180d3579e8c60141f99efdf5df0081" - integrity sha512-VEI7OdvK2wP7XHnsuXbAJnEpEkF6NjSN45QJlL4VGqZSXsnicpesdTWsg9RISeSdYd3yeRj/y3k5KGjUXYnFwQ== + version "20.19.11" + resolved "https://registry.yarnpkg.com/@types/node/-/node-20.19.11.tgz#728cab53092bd5f143beed7fbba7ba99de3c16c4" + integrity sha512-uug3FEEGv0r+jrecvUUpbY8lLisvIjg6AAic6a2bSP5OEOLeJsDSnvhCDov7ipFFMXS3orMpzlmi0ZcuGkBbow== dependencies: - undici-types "~6.19.2" + undici-types "~6.21.0" "@types/stack-utils@^2.0.0": version "2.0.3" @@ -3285,6 +3285,7 @@ ts-node@^10.5.0: "tsc-multi@https://github.com/stainless-api/tsc-multi/releases/download/v1.1.8/tsc-multi.tgz": version "1.1.8" + uid f544b359b8f05e607771ffacc280e58201476b04 resolved "https://github.com/stainless-api/tsc-multi/releases/download/v1.1.8/tsc-multi.tgz#f544b359b8f05e607771ffacc280e58201476b04" dependencies: debug "^4.3.7" @@ -3353,10 +3354,10 @@ undici-types@~5.26.4: resolved "https://registry.yarnpkg.com/undici-types/-/undici-types-5.26.5.tgz#bcd539893d00b56e964fd2657a4866b221a65617" integrity sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA== -undici-types@~6.19.2: - version "6.19.8" - resolved "https://registry.yarnpkg.com/undici-types/-/undici-types-6.19.8.tgz#35111c9d1437ab83a7cdc0abae2f26d88eda0a02" - integrity sha512-ve2KP6f/JnbPBFyobGHuerC9g1FYGn/F8n1LWTwNxCEzd6IfqTwUQcNXgEtmmQ6DlRrC1hrSrBnCZPokRrDHjw== +undici-types@~6.21.0: + version "6.21.0" + resolved "https://registry.yarnpkg.com/undici-types/-/undici-types-6.21.0.tgz#691d00af3909be93a7faa13be61b3a5b50ef12cb" + integrity sha512-iwDZqg0QAGrg9Rav5H4n0M64c3mkR59cJ6wQp+7C4nI0gsmExaedaYLNO44eT4AtBBwjbTiGPMlt2Md0T9H9JQ== unicode-emoji-modifier-base@^1.0.0: version "1.0.0" From 8cda3b47c7257a21fc81209d3a99458885d36ac5 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Sat, 16 Aug 2025 03:40:41 +0000 Subject: [PATCH 28/44] chore(mcp): update README --- packages/mcp-server/README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/mcp-server/README.md b/packages/mcp-server/README.md index 0c53397..b36d3e7 100644 --- a/packages/mcp-server/README.md +++ b/packages/mcp-server/README.md @@ -161,13 +161,13 @@ Additionally, authorization can be provided via the following headers: | `x-hyperswitch-jwt-key` | `jwtKey` | jwt_key | | `api-key` | `publishableKey` | publishable_key | -A configuration JSON for this server might look like this: +A configuration JSON for this server might look like this, assuming the server is hosted at `http://localhost:3000`: ```json { "mcpServers": { "hyperswitch_api": { - "url": "http://localhost:3000", # or wherever the server is hosted + "url": "http://localhost:3000", "headers": { "Authorization": "Bearer " } From 019bda15e6c9cb65b27081ea17832deccb08d0f1 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Sat, 16 Aug 2025 03:44:42 +0000 Subject: [PATCH 29/44] chore(internal): formatting change --- src/client.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/client.ts b/src/client.ts index f0b2e83..0270fd0 100644 --- a/src/client.ts +++ b/src/client.ts @@ -1069,6 +1069,7 @@ export class Hyperswitch { authentication: API.Authentication = new API.Authentication(this); accounts: API.Accounts = new API.Accounts(this); } + Hyperswitch.Payments = Payments; Hyperswitch.PaymentLink = PaymentLink; Hyperswitch.Relay = Relay; @@ -1089,6 +1090,7 @@ Hyperswitch.ProfileAcquirers = ProfileAcquirers; Hyperswitch.ThreeDSDecisionResource = ThreeDSDecisionResource; Hyperswitch.Authentication = Authentication; Hyperswitch.Accounts = Accounts; + export declare namespace Hyperswitch { export type RequestOptions = Opts.RequestOptions; From c5699456c5ea54f776c37e38979f1d108c4fe7c7 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 19 Aug 2025 02:50:12 +0000 Subject: [PATCH 30/44] feat(mcp): parse query string as mcp client options in mcp server --- packages/mcp-server/README.md | 13 ++ packages/mcp-server/package.json | 8 +- packages/mcp-server/src/compat.ts | 4 +- packages/mcp-server/src/http.ts | 25 ++- packages/mcp-server/src/index.ts | 4 +- packages/mcp-server/src/options.ts | 121 ++++++++++- packages/mcp-server/tests/options.test.ts | 240 +++++++++++++++++++++- packages/mcp-server/yarn.lock | 116 +++++++++-- 8 files changed, 499 insertions(+), 32 deletions(-) diff --git a/packages/mcp-server/README.md b/packages/mcp-server/README.md index b36d3e7..9159029 100644 --- a/packages/mcp-server/README.md +++ b/packages/mcp-server/README.md @@ -176,6 +176,19 @@ A configuration JSON for this server might look like this, assuming the server i } ``` +The command-line arguments for filtering tools and specifying clients can also be used as query parameters in the URL. +For example, to exclude specific tools while including others, use the URL: + +``` +http://localhost:3000?resource=cards&resource=accounts&no_tool=create_cards +``` + +Or, to configure for the Cursor client, with a custom max tool name length, use the URL: + +``` +http://localhost:3000?client=cursor&capability=tool-name-length%3D40 +``` + ## Importing the tools and server individually ```js diff --git a/packages/mcp-server/package.json b/packages/mcp-server/package.json index e0958b1..2aee48b 100644 --- a/packages/mcp-server/package.json +++ b/packages/mcp-server/package.json @@ -28,20 +28,22 @@ }, "dependencies": { "hyperswitch": "file:../../dist/", + "@cloudflare/cabidela": "^0.2.4", "@modelcontextprotocol/sdk": "^1.11.5", "express": "^5.1.0", "jq-web": "https://github.com/stainless-api/jq-web/releases/download/v0.8.6/jq-web.tar.gz", + "qs": "^6.14.0", "yargs": "^17.7.2", - "@cloudflare/cabidela": "^0.2.4", "zod": "^3.25.20", - "zod-to-json-schema": "^3.24.5" + "zod-to-json-schema": "^3.24.5", + "zod-validation-error": "^4.0.1" }, "bin": { "mcp-server": "dist/index.js" }, "devDependencies": { - "@types/jest": "^29.4.0", "@types/express": "^5.0.3", + "@types/jest": "^29.4.0", "@types/yargs": "^17.0.8", "@typescript-eslint/eslint-plugin": "8.31.1", "@typescript-eslint/parser": "8.31.1", diff --git a/packages/mcp-server/src/compat.ts b/packages/mcp-server/src/compat.ts index 7afd77f..1df7a7a 100644 --- a/packages/mcp-server/src/compat.ts +++ b/packages/mcp-server/src/compat.ts @@ -1,4 +1,5 @@ import { Tool } from '@modelcontextprotocol/sdk/types.js'; +import { z } from 'zod'; import { Endpoint } from './tools'; export interface ClientCapabilities { @@ -19,7 +20,8 @@ export const defaultClientCapabilities: ClientCapabilities = { toolNameLength: undefined, }; -export type ClientType = 'openai-agents' | 'claude' | 'claude-code' | 'cursor'; +export const ClientType = z.enum(['openai-agents', 'claude', 'claude-code', 'cursor']); +export type ClientType = z.infer; // Client presets for compatibility // Note that these could change over time as models get better, so this is diff --git a/packages/mcp-server/src/http.ts b/packages/mcp-server/src/http.ts index e188c9e..ca6d3d2 100644 --- a/packages/mcp-server/src/http.ts +++ b/packages/mcp-server/src/http.ts @@ -4,13 +4,33 @@ import { McpServer } from '@modelcontextprotocol/sdk/server/mcp'; import { StreamableHTTPServerTransport } from '@modelcontextprotocol/sdk/server/streamableHttp.js'; import express from 'express'; -import { McpOptions } from './options'; +import { fromError } from 'zod-validation-error/v3'; +import { McpOptions, parseQueryOptions } from './options'; import { initMcpServer, newMcpServer } from './server'; import { parseAuthHeaders } from './headers'; import { Endpoint } from './tools'; -const newServer = (mcpOptions: McpOptions, req: express.Request, res: express.Response): McpServer | null => { +const newServer = ( + defaultMcpOptions: McpOptions, + req: express.Request, + res: express.Response, +): McpServer | null => { const server = newMcpServer(); + + let mcpOptions: McpOptions; + try { + mcpOptions = parseQueryOptions(defaultMcpOptions, req.query); + } catch (error) { + res.status(400).json({ + jsonrpc: '2.0', + error: { + code: -32000, + message: `Invalid request: ${fromError(error)}`, + }, + }); + return null; + } + try { const authOptions = parseAuthHeaders(req); initMcpServer({ @@ -71,6 +91,7 @@ const del = async (req: express.Request, res: express.Response) => { export const streamableHTTPApp = (options: McpOptions): express.Express => { const app = express(); + app.set('query parser', 'extended'); app.use(express.json()); app.get('/', get); diff --git a/packages/mcp-server/src/index.ts b/packages/mcp-server/src/index.ts index 4c71a3b..05b2ba6 100644 --- a/packages/mcp-server/src/index.ts +++ b/packages/mcp-server/src/index.ts @@ -2,7 +2,7 @@ import { selectTools } from './server'; import { Endpoint, endpoints } from './tools'; -import { McpOptions, parseOptions } from './options'; +import { McpOptions, parseCLIOptions } from './options'; import { launchStdioServer } from './stdio'; import { launchStreamableHTTPServer } from './http'; @@ -40,7 +40,7 @@ if (require.main === module) { function parseOptionsOrError() { try { - return parseOptions(); + return parseCLIOptions(); } catch (error) { console.error('Error parsing options:', error); process.exit(1); diff --git a/packages/mcp-server/src/options.ts b/packages/mcp-server/src/options.ts index c290ca5..0768d93 100644 --- a/packages/mcp-server/src/options.ts +++ b/packages/mcp-server/src/options.ts @@ -1,5 +1,7 @@ +import qs from 'qs'; import yargs from 'yargs'; import { hideBin } from 'yargs/helpers'; +import z from 'zod'; import { endpoints, Filter } from './tools'; import { ClientCapabilities, knownClients, ClientType } from './compat'; @@ -47,7 +49,7 @@ function parseCapabilityValue(cap: string): { name: Capability; value?: number } return { name: cap as Capability }; } -export function parseOptions(): CLIOptions { +export function parseCLIOptions(): CLIOptions { const opts = yargs(hideBin(process.argv)) .option('tools', { type: 'string', @@ -271,6 +273,123 @@ export function parseOptions(): CLIOptions { }; } +const coerceArray = (zodType: T) => + z.preprocess( + (val) => + Array.isArray(val) ? val + : val ? [val] + : val, + z.array(zodType).optional(), + ); + +const QueryOptions = z.object({ + tools: coerceArray(z.enum(['dynamic', 'all'])).describe('Use dynamic tools or all tools'), + no_tools: coerceArray(z.enum(['dynamic', 'all'])).describe('Do not use dynamic tools or all tools'), + tool: coerceArray(z.string()).describe('Include tools matching the specified names'), + resource: coerceArray(z.string()).describe('Include tools matching the specified resources'), + operation: coerceArray(z.enum(['read', 'write'])).describe( + 'Include tools matching the specified operations', + ), + tag: coerceArray(z.string()).describe('Include tools with the specified tags'), + no_tool: coerceArray(z.string()).describe('Exclude tools matching the specified names'), + no_resource: coerceArray(z.string()).describe('Exclude tools matching the specified resources'), + no_operation: coerceArray(z.enum(['read', 'write'])).describe( + 'Exclude tools matching the specified operations', + ), + no_tag: coerceArray(z.string()).describe('Exclude tools with the specified tags'), + client: ClientType.optional().describe('Specify the MCP client being used'), + capability: coerceArray(z.string()).describe('Specify client capabilities'), + no_capability: coerceArray(z.enum(CAPABILITY_CHOICES)).describe('Unset client capabilities'), +}); + +export function parseQueryOptions(defaultOptions: McpOptions, query: unknown): McpOptions { + const queryObject = typeof query === 'string' ? qs.parse(query) : query; + const queryOptions = QueryOptions.parse(queryObject); + + const filters: Filter[] = [...defaultOptions.filters]; + + for (const resource of queryOptions.resource || []) { + filters.push({ type: 'resource', op: 'include', value: resource }); + } + for (const operation of queryOptions.operation || []) { + filters.push({ type: 'operation', op: 'include', value: operation }); + } + for (const tag of queryOptions.tag || []) { + filters.push({ type: 'tag', op: 'include', value: tag }); + } + for (const tool of queryOptions.tool || []) { + filters.push({ type: 'tool', op: 'include', value: tool }); + } + for (const resource of queryOptions.no_resource || []) { + filters.push({ type: 'resource', op: 'exclude', value: resource }); + } + for (const operation of queryOptions.no_operation || []) { + filters.push({ type: 'operation', op: 'exclude', value: operation }); + } + for (const tag of queryOptions.no_tag || []) { + filters.push({ type: 'tag', op: 'exclude', value: tag }); + } + for (const tool of queryOptions.no_tool || []) { + filters.push({ type: 'tool', op: 'exclude', value: tool }); + } + + // Parse client capabilities + const clientCapabilities: ClientCapabilities = { + topLevelUnions: true, + validJson: true, + refs: true, + unions: true, + formats: true, + toolNameLength: undefined, + ...defaultOptions.capabilities, + }; + + for (const cap of queryOptions.capability || []) { + const parsed = parseCapabilityValue(cap); + if (parsed.name === 'top-level-unions') { + clientCapabilities.topLevelUnions = true; + } else if (parsed.name === 'valid-json') { + clientCapabilities.validJson = true; + } else if (parsed.name === 'refs') { + clientCapabilities.refs = true; + } else if (parsed.name === 'unions') { + clientCapabilities.unions = true; + } else if (parsed.name === 'formats') { + clientCapabilities.formats = true; + } else if (parsed.name === 'tool-name-length') { + clientCapabilities.toolNameLength = parsed.value; + } + } + + for (const cap of queryOptions.no_capability || []) { + if (cap === 'top-level-unions') { + clientCapabilities.topLevelUnions = false; + } else if (cap === 'valid-json') { + clientCapabilities.validJson = false; + } else if (cap === 'refs') { + clientCapabilities.refs = false; + } else if (cap === 'unions') { + clientCapabilities.unions = false; + } else if (cap === 'formats') { + clientCapabilities.formats = false; + } else if (cap === 'tool-name-length') { + clientCapabilities.toolNameLength = undefined; + } + } + + return { + client: queryOptions.client ?? defaultOptions.client, + includeDynamicTools: + defaultOptions.includeDynamicTools ?? + (queryOptions.tools?.includes('dynamic') && !queryOptions.no_tools?.includes('dynamic')), + includeAllTools: + defaultOptions.includeAllTools ?? + (queryOptions.tools?.includes('all') && !queryOptions.no_tools?.includes('all')), + filters, + capabilities: clientCapabilities, + }; +} + function getCapabilitiesExplanation(): string { return ` Client Capabilities Explanation: diff --git a/packages/mcp-server/tests/options.test.ts b/packages/mcp-server/tests/options.test.ts index 264aca5..08ea1f1 100644 --- a/packages/mcp-server/tests/options.test.ts +++ b/packages/mcp-server/tests/options.test.ts @@ -1,4 +1,4 @@ -import { parseOptions } from '../src/options'; +import { parseCLIOptions, parseQueryOptions } from '../src/options'; import { Filter } from '../src/tools'; import { parseEmbeddedJSON } from '../src/compat'; @@ -11,7 +11,7 @@ const mockArgv = (args: string[]) => { }; }; -describe('parseOptions', () => { +describe('parseCLIOptions', () => { it('should parse basic filter options', () => { const cleanup = mockArgv([ '--tool=test-tool', @@ -20,7 +20,7 @@ describe('parseOptions', () => { '--tag=test-tag', ]); - const result = parseOptions(); + const result = parseCLIOptions(); expect(result.filters).toEqual([ { type: 'tag', op: 'include', value: 'test-tag' }, @@ -52,7 +52,7 @@ describe('parseOptions', () => { '--no-tag=exclude-tag', ]); - const result = parseOptions(); + const result = parseCLIOptions(); expect(result.filters).toEqual([ { type: 'tag', op: 'exclude', value: 'exclude-tag' }, @@ -76,7 +76,7 @@ describe('parseOptions', () => { it('should parse client presets', () => { const cleanup = mockArgv(['--client=openai-agents']); - const result = parseOptions(); + const result = parseCLIOptions(); expect(result.client).toEqual('openai-agents'); @@ -92,7 +92,7 @@ describe('parseOptions', () => { '--capability=tool-name-length=40', ]); - const result = parseOptions(); + const result = parseCLIOptions(); expect(result.capabilities).toEqual({ topLevelUnions: true, @@ -109,7 +109,7 @@ describe('parseOptions', () => { it('should handle list option', () => { const cleanup = mockArgv(['--list']); - const result = parseOptions(); + const result = parseCLIOptions(); expect(result.list).toBe(true); @@ -119,7 +119,7 @@ describe('parseOptions', () => { it('should handle multiple filters of the same type', () => { const cleanup = mockArgv(['--tool=tool1', '--tool=tool2', '--resource=res1', '--resource=res2']); - const result = parseOptions(); + const result = parseCLIOptions(); expect(result.filters).toEqual([ { type: 'resource', op: 'include', value: 'res1' }, @@ -138,7 +138,7 @@ describe('parseOptions', () => { '--capability=top-level-unions,valid-json,unions', ]); - const result = parseOptions(); + const result = parseCLIOptions(); expect(result.filters).toEqual([ { type: 'resource', op: 'include', value: 'res1' }, @@ -166,7 +166,7 @@ describe('parseOptions', () => { const originalError = console.error; console.error = jest.fn(); - expect(() => parseOptions()).toThrow(); + expect(() => parseCLIOptions()).toThrow(); console.error = originalError; cleanup(); @@ -179,13 +179,231 @@ describe('parseOptions', () => { const originalError = console.error; console.error = jest.fn(); - expect(() => parseOptions()).toThrow(); + expect(() => parseCLIOptions()).toThrow(); console.error = originalError; cleanup(); }); }); +describe('parseQueryOptions', () => { + const defaultOptions = { + client: undefined, + includeDynamicTools: undefined, + includeAllTools: undefined, + filters: [], + capabilities: { + topLevelUnions: true, + validJson: true, + refs: true, + unions: true, + formats: true, + toolNameLength: undefined, + }, + }; + + it('should parse basic filter options from query string', () => { + const query = 'tool=test-tool&resource=test-resource&operation=read&tag=test-tag'; + const result = parseQueryOptions(defaultOptions, query); + + expect(result.filters).toEqual([ + { type: 'resource', op: 'include', value: 'test-resource' }, + { type: 'operation', op: 'include', value: 'read' }, + { type: 'tag', op: 'include', value: 'test-tag' }, + { type: 'tool', op: 'include', value: 'test-tool' }, + ]); + + expect(result.capabilities).toEqual({ + topLevelUnions: true, + validJson: true, + refs: true, + unions: true, + formats: true, + toolNameLength: undefined, + }); + }); + + it('should parse exclusion filters from query string', () => { + const query = 'no_tool=exclude-tool&no_resource=exclude-resource&no_operation=write&no_tag=exclude-tag'; + const result = parseQueryOptions(defaultOptions, query); + + expect(result.filters).toEqual([ + { type: 'resource', op: 'exclude', value: 'exclude-resource' }, + { type: 'operation', op: 'exclude', value: 'write' }, + { type: 'tag', op: 'exclude', value: 'exclude-tag' }, + { type: 'tool', op: 'exclude', value: 'exclude-tool' }, + ]); + }); + + it('should parse client option from query string', () => { + const query = 'client=openai-agents'; + const result = parseQueryOptions(defaultOptions, query); + + expect(result.client).toBe('openai-agents'); + }); + + it('should parse client capabilities from query string', () => { + const query = 'capability=top-level-unions&capability=valid-json&capability=tool-name-length%3D40'; + const result = parseQueryOptions(defaultOptions, query); + + expect(result.capabilities).toEqual({ + topLevelUnions: true, + validJson: true, + refs: true, + unions: true, + formats: true, + toolNameLength: 40, + }); + }); + + it('should parse no-capability options from query string', () => { + const query = 'no_capability=top-level-unions&no_capability=refs&no_capability=formats'; + const result = parseQueryOptions(defaultOptions, query); + + expect(result.capabilities).toEqual({ + topLevelUnions: false, + validJson: true, + refs: false, + unions: true, + formats: false, + toolNameLength: undefined, + }); + }); + + it('should parse tools options from query string', () => { + const query = 'tools=dynamic&tools=all'; + const result = parseQueryOptions(defaultOptions, query); + + expect(result.includeDynamicTools).toBe(true); + expect(result.includeAllTools).toBe(true); + }); + + it('should parse no-tools options from query string', () => { + const query = 'tools=dynamic&tools=all&no_tools=dynamic'; + const result = parseQueryOptions(defaultOptions, query); + + expect(result.includeDynamicTools).toBe(false); + expect(result.includeAllTools).toBe(true); + }); + + it('should handle array values in query string', () => { + const query = 'tool[]=tool1&tool[]=tool2&resource[]=res1&resource[]=res2'; + const result = parseQueryOptions(defaultOptions, query); + + expect(result.filters).toEqual([ + { type: 'resource', op: 'include', value: 'res1' }, + { type: 'resource', op: 'include', value: 'res2' }, + { type: 'tool', op: 'include', value: 'tool1' }, + { type: 'tool', op: 'include', value: 'tool2' }, + ]); + }); + + it('should merge with default options', () => { + const defaultWithFilters = { + ...defaultOptions, + filters: [{ type: 'tag' as const, op: 'include' as const, value: 'existing-tag' }], + client: 'cursor' as const, + includeDynamicTools: true, + }; + + const query = 'tool=new-tool&resource=new-resource'; + const result = parseQueryOptions(defaultWithFilters, query); + + expect(result.filters).toEqual([ + { type: 'tag', op: 'include', value: 'existing-tag' }, + { type: 'resource', op: 'include', value: 'new-resource' }, + { type: 'tool', op: 'include', value: 'new-tool' }, + ]); + + expect(result.client).toBe('cursor'); + expect(result.includeDynamicTools).toBe(true); + }); + + it('should override client from default options', () => { + const defaultWithClient = { + ...defaultOptions, + client: 'cursor' as const, + }; + + const query = 'client=openai-agents'; + const result = parseQueryOptions(defaultWithClient, query); + + expect(result.client).toBe('openai-agents'); + }); + + it('should merge capabilities with default options', () => { + const defaultWithCapabilities = { + ...defaultOptions, + capabilities: { + topLevelUnions: false, + validJson: false, + refs: true, + unions: true, + formats: true, + toolNameLength: 30, + }, + }; + + const query = 'capability=top-level-unions&no_capability=refs'; + const result = parseQueryOptions(defaultWithCapabilities, query); + + expect(result.capabilities).toEqual({ + topLevelUnions: true, + validJson: false, + refs: false, + unions: true, + formats: true, + toolNameLength: 30, + }); + }); + + it('should handle empty query string', () => { + const query = ''; + const result = parseQueryOptions(defaultOptions, query); + + expect(result).toEqual(defaultOptions); + }); + + it('should handle invalid query string gracefully', () => { + const query = 'invalid=value&operation=invalid-operation'; + + // Should throw due to Zod validation for invalid operation + expect(() => parseQueryOptions(defaultOptions, query)).toThrow(); + }); + + it('should preserve default undefined values when not specified', () => { + const defaultWithUndefined = { + ...defaultOptions, + client: undefined, + includeDynamicTools: undefined, + includeAllTools: undefined, + }; + + const query = 'tool=test-tool'; + const result = parseQueryOptions(defaultWithUndefined, query); + + expect(result.client).toBeUndefined(); + expect(result.includeDynamicTools).toBeFalsy(); + expect(result.includeAllTools).toBeFalsy(); + }); + + it('should handle complex query with mixed include and exclude filters', () => { + const query = + 'tool=include-tool&no_tool=exclude-tool&resource=include-res&no_resource=exclude-res&operation=read&tag=include-tag&no_tag=exclude-tag'; + const result = parseQueryOptions(defaultOptions, query); + + expect(result.filters).toEqual([ + { type: 'resource', op: 'include', value: 'include-res' }, + { type: 'operation', op: 'include', value: 'read' }, + { type: 'tag', op: 'include', value: 'include-tag' }, + { type: 'tool', op: 'include', value: 'include-tool' }, + { type: 'resource', op: 'exclude', value: 'exclude-res' }, + { type: 'tag', op: 'exclude', value: 'exclude-tag' }, + { type: 'tool', op: 'exclude', value: 'exclude-tool' }, + ]); + }); +}); + describe('parseEmbeddedJSON', () => { it('should not change non-string values', () => { const args = { diff --git a/packages/mcp-server/yarn.lock b/packages/mcp-server/yarn.lock index 9970ec3..707a2de 100644 --- a/packages/mcp-server/yarn.lock +++ b/packages/mcp-server/yarn.lock @@ -584,15 +584,17 @@ "@jridgewell/resolve-uri" "^3.1.0" "@jridgewell/sourcemap-codec" "^1.4.14" -"@modelcontextprotocol/sdk@^1.6.1": - version "1.11.1" - resolved "https://registry.yarnpkg.com/@modelcontextprotocol/sdk/-/sdk-1.11.1.tgz#c7f4a1432872ef10130f5d9b0072060c17a3946b" - integrity sha512-9LfmxKTb1v+vUS1/emSk1f5ePmTLkb9Le9AxOB5T0XM59EUumwcS45z05h7aiZx3GI0Bl7mjb3FMEglYj+acuQ== +"@modelcontextprotocol/sdk@^1.11.5": + version "1.17.3" + resolved "https://registry.yarnpkg.com/@modelcontextprotocol/sdk/-/sdk-1.17.3.tgz#cf92354220f0183d28179e96a9bf3a8f6d3211ae" + integrity sha512-JPwUKWSsbzx+DLFznf/QZ32Qa+ptfbUlHhRLrBQBAFu9iI1iYvizM4p+zhhRDceSsPutXp4z+R/HPVphlIiclg== dependencies: + ajv "^6.12.6" content-type "^1.0.5" cors "^2.8.5" - cross-spawn "^7.0.3" + cross-spawn "^7.0.5" eventsource "^3.0.2" + eventsource-parser "^3.0.0" express "^5.0.1" express-rate-limit "^7.5.0" pkce-challenge "^5.0.0" @@ -708,6 +710,40 @@ dependencies: "@babel/types" "^7.20.7" +"@types/body-parser@*": + version "1.19.6" + resolved "https://registry.yarnpkg.com/@types/body-parser/-/body-parser-1.19.6.tgz#1859bebb8fd7dac9918a45d54c1971ab8b5af474" + integrity sha512-HLFeCYgz89uk22N5Qg3dvGvsv46B8GLvKKo1zKG4NybA8U2DiEO3w9lqGg29t/tfLRJpJ6iQxnVw4OnB7MoM9g== + dependencies: + "@types/connect" "*" + "@types/node" "*" + +"@types/connect@*": + version "3.4.38" + resolved "https://registry.yarnpkg.com/@types/connect/-/connect-3.4.38.tgz#5ba7f3bc4fbbdeaff8dded952e5ff2cc53f8d858" + integrity sha512-K6uROf1LD88uDQqJCktA4yzL1YYAK6NgfsI0v/mTgyPKWsX1CnJ0XPSDhViejru1GcRkLWb8RlzFYJRqGUbaug== + dependencies: + "@types/node" "*" + +"@types/express-serve-static-core@^5.0.0": + version "5.0.7" + resolved "https://registry.yarnpkg.com/@types/express-serve-static-core/-/express-serve-static-core-5.0.7.tgz#2fa94879c9d46b11a5df4c74ac75befd6b283de6" + integrity sha512-R+33OsgWw7rOhD1emjU7dzCDHucJrgJXMA5PYCzJxVil0dsyx5iBEPHqpPfiKNJQb7lZ1vxwoLR4Z87bBUpeGQ== + dependencies: + "@types/node" "*" + "@types/qs" "*" + "@types/range-parser" "*" + "@types/send" "*" + +"@types/express@^5.0.3": + version "5.0.3" + resolved "https://registry.yarnpkg.com/@types/express/-/express-5.0.3.tgz#6c4bc6acddc2e2a587142e1d8be0bce20757e956" + integrity sha512-wGA0NX93b19/dZC1J18tKWVIYWyyF2ZjT9vin/NRu0qzzvfVzWjs04iq2rQ3H65vCTQYlRqs3YHfY7zjdV+9Kw== + dependencies: + "@types/body-parser" "*" + "@types/express-serve-static-core" "^5.0.0" + "@types/serve-static" "*" + "@types/graceful-fs@^4.1.3": version "4.1.9" resolved "https://registry.yarnpkg.com/@types/graceful-fs/-/graceful-fs-4.1.9.tgz#2a06bc0f68a20ab37b3e36aa238be6abdf49e8b4" @@ -715,6 +751,11 @@ dependencies: "@types/node" "*" +"@types/http-errors@*": + version "2.0.5" + resolved "https://registry.yarnpkg.com/@types/http-errors/-/http-errors-2.0.5.tgz#5b749ab2b16ba113423feb1a64a95dcd30398472" + integrity sha512-r8Tayk8HJnX0FztbZN7oVqGccWgw98T/0neJphO91KkmOzug1KkofZURD4UaD5uH8AqcFLfdPErnBod0u71/qg== + "@types/istanbul-lib-coverage@*", "@types/istanbul-lib-coverage@^2.0.0", "@types/istanbul-lib-coverage@^2.0.1": version "2.0.6" resolved "https://registry.yarnpkg.com/@types/istanbul-lib-coverage/-/istanbul-lib-coverage-2.0.6.tgz#7739c232a1fee9b4d3ce8985f314c0c6d33549d7" @@ -742,6 +783,11 @@ expect "^29.0.0" pretty-format "^29.0.0" +"@types/mime@^1": + version "1.3.5" + resolved "https://registry.yarnpkg.com/@types/mime/-/mime-1.3.5.tgz#1ef302e01cf7d2b5a0fa526790c9123bf1d06690" + integrity sha512-/pyBZWSLD2n0dcHE3hq8s8ZvcETHtEuF+3E7XVt0Ig2nvsVQXdghHVcEkIWjy9A0wKfTn97a/PSDYohKIlnP/w== + "@types/node@*": version "22.15.17" resolved "https://registry.yarnpkg.com/@types/node/-/node-22.15.17.tgz#355ccec95f705b664e4332bb64a7f07db30b7055" @@ -749,6 +795,33 @@ dependencies: undici-types "~6.21.0" +"@types/qs@*": + version "6.14.0" + resolved "https://registry.yarnpkg.com/@types/qs/-/qs-6.14.0.tgz#d8b60cecf62f2db0fb68e5e006077b9178b85de5" + integrity sha512-eOunJqu0K1923aExK6y8p6fsihYEn/BYuQ4g0CxAAgFc4b/ZLN4CrsRZ55srTdqoiLzU2B2evC+apEIxprEzkQ== + +"@types/range-parser@*": + version "1.2.7" + resolved "https://registry.yarnpkg.com/@types/range-parser/-/range-parser-1.2.7.tgz#50ae4353eaaddc04044279812f52c8c65857dbcb" + integrity sha512-hKormJbkJqzQGhziax5PItDUTMAM9uE2XXQmM37dyd4hVM+5aVl7oVxMVUiVQn2oCQFN/LKCZdvSM0pFRqbSmQ== + +"@types/send@*": + version "0.17.5" + resolved "https://registry.yarnpkg.com/@types/send/-/send-0.17.5.tgz#d991d4f2b16f2b1ef497131f00a9114290791e74" + integrity sha512-z6F2D3cOStZvuk2SaP6YrwkNO65iTZcwA2ZkSABegdkAh/lf+Aa/YQndZVfmEXT5vgAp6zv06VQ3ejSVjAny4w== + dependencies: + "@types/mime" "^1" + "@types/node" "*" + +"@types/serve-static@*": + version "1.15.8" + resolved "https://registry.yarnpkg.com/@types/serve-static/-/serve-static-1.15.8.tgz#8180c3fbe4a70e8f00b9f70b9ba7f08f35987877" + integrity sha512-roei0UY3LhpOJvjbIP6ZZFngyLKl5dskOtDhxY5THRSpO+ZI+nzJ+m5yUMzGrp89YRa7lvknKkMYjqQFGwA7Sg== + dependencies: + "@types/http-errors" "*" + "@types/node" "*" + "@types/send" "*" + "@types/stack-utils@^2.0.0": version "2.0.3" resolved "https://registry.yarnpkg.com/@types/stack-utils/-/stack-utils-2.0.3.tgz#6209321eb2c1712a7e7466422b8cb1fc0d9dd5d8" @@ -885,7 +958,7 @@ aggregate-error@^3.0.0: clean-stack "^2.0.0" indent-string "^4.0.0" -ajv@^6.12.4: +ajv@^6.12.4, ajv@^6.12.6: version "6.12.6" resolved "https://registry.yarnpkg.com/ajv/-/ajv-6.12.6.tgz#baf5a62e802b07d977034586f8c3baf5adf26df4" integrity sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g== @@ -1246,7 +1319,7 @@ create-require@^1.1.0: resolved "https://registry.yarnpkg.com/create-require/-/create-require-1.1.1.tgz#c1d7e8f1e5f6cfc9ff65f9cd352d37348756c333" integrity sha512-dcKFX3jn0MpIaXjisoRvexIJVEKzaq7z2rZKxf+MSr9TkdmHmsU4m2lcLojrj/FHl8mk5VxMmYA+ftRkP/3oKQ== -cross-spawn@^7.0.2, cross-spawn@^7.0.3: +cross-spawn@^7.0.2, cross-spawn@^7.0.3, cross-spawn@^7.0.5: version "7.0.6" resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-7.0.6.tgz#8a58fe78f00dcd70c370451759dfbfaf03e8ee9f" integrity sha512-uV2QOWP2nWzsy2aMp8aRibhi9dlzF5Hgh5SHaB9OiTGEyDTiJJyx0uy51QXdyWbtAHNua4XJzUKca3OzKUd3vA== @@ -1514,6 +1587,11 @@ etag@^1.8.1: resolved "https://registry.yarnpkg.com/etag/-/etag-1.8.1.tgz#41ae2eeb65efa62268aebfea83ac7d79299b0887" integrity sha512-aIL5Fx7mawVa300al2BnEE4iNvo1qETxLrPI/o05L7z6go7fCw1J6EQmbK4FmJ2AS7kgVF/KEZWufBfdClMcPg== +eventsource-parser@^3.0.0: + version "3.0.3" + resolved "https://registry.yarnpkg.com/eventsource-parser/-/eventsource-parser-3.0.3.tgz#e9af1d40b77e6268cdcbc767321e8b9f066adea8" + integrity sha512-nVpZkTMM9rF6AQ9gPJpFsNAMt48wIzB5TQgiTLdHiuO8XEDhUgZEhqKlZWXbIzo9VmJ/HvysHqEaVeD5v9TPvA== + eventsource-parser@^3.0.1: version "3.0.1" resolved "https://registry.yarnpkg.com/eventsource-parser/-/eventsource-parser-3.0.1.tgz#5e358dba9a55ba64ca90da883c4ca35bd82467bd" @@ -1562,7 +1640,7 @@ express-rate-limit@^7.5.0: resolved "https://registry.yarnpkg.com/express-rate-limit/-/express-rate-limit-7.5.0.tgz#6a67990a724b4fbbc69119419feef50c51e8b28f" integrity sha512-eB5zbQh5h+VenMPM3fh+nw1YExi5nMr6HUCR62ELSP11huvxm/Uir1H1QEyTkk5QX6A58pX6NmaTMceKZ0Eodg== -express@^5.0.1: +express@^5.0.1, express@^5.1.0: version "5.1.0" resolved "https://registry.yarnpkg.com/express/-/express-5.1.0.tgz#d31beaf715a0016f0d53f47d3b4d7acf28c75cc9" integrity sha512-DT9ck5YIRU+8GYzzU5kT3eHGA5iL+1Zd0EutOmTE9Dtk+Tvuzd23VBU+ec7HPNSTxXYO55gPV/hq4pSBJDjFpA== @@ -2404,6 +2482,10 @@ jest@^29.4.0: import-local "^3.0.2" jest-cli "^29.7.0" +"jq-web@https://github.com/stainless-api/jq-web/releases/download/v0.8.6/jq-web.tar.gz": + version "0.8.6" + resolved "https://github.com/stainless-api/jq-web/releases/download/v0.8.6/jq-web.tar.gz#14d0e126987736e82e964d675c3838b5944faa6f" + js-tokens@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-4.0.0.tgz#19203fb59991df98e3a287050d4647cdeaf32499" @@ -3305,9 +3387,9 @@ ts-node@^10.5.0: v8-compile-cache-lib "^3.0.1" yn "3.1.1" -"tsc-multi@https://github.com/stainless-api/tsc-multi/releases/download/v1.1.7/tsc-multi.tgz": - version "1.1.7" - resolved "https://github.com/stainless-api/tsc-multi/releases/download/v1.1.7/tsc-multi.tgz#52f40adf8b808bd0b633346d11cc4a8aeea465cd" +"tsc-multi@https://github.com/stainless-api/tsc-multi/releases/download/v1.1.8/tsc-multi.tgz": + version "1.1.8" + resolved "https://github.com/stainless-api/tsc-multi/releases/download/v1.1.8/tsc-multi.tgz#f544b359b8f05e607771ffacc280e58201476b04" dependencies: debug "^4.3.7" fast-glob "^3.3.2" @@ -3508,7 +3590,17 @@ zod-to-json-schema@^3.24.1, zod-to-json-schema@^3.24.5: resolved "https://registry.yarnpkg.com/zod-to-json-schema/-/zod-to-json-schema-3.24.5.tgz#d1095440b147fb7c2093812a53c54df8d5df50a3" integrity sha512-/AuWwMP+YqiPbsJx5D6TfgRTc4kTLjsh5SOcd4bLsfUg2RcEXrFMJl1DGgdHy2aCfsIA/cr/1JM0xcB2GZji8g== -zod@^3.23.8, zod@^3.24.4: +zod-validation-error@^4.0.1: + version "4.0.1" + resolved "https://registry.yarnpkg.com/zod-validation-error/-/zod-validation-error-4.0.1.tgz#a105723eb40299578a6a38cb86647068f6d005b1" + integrity sha512-F3rdaCOHs5ViJ5YTz5zzRtfkQdMdIeKudJAoxy7yB/2ZMEHw73lmCAcQw11r7++20MyGl4WV59EVh7A9rNAyog== + +zod@^3.23.8: version "3.24.4" resolved "https://registry.yarnpkg.com/zod/-/zod-3.24.4.tgz#e2e2cca5faaa012d76e527d0d36622e0a90c315f" integrity sha512-OdqJE9UDRPwWsrHjLN2F8bPxvwJBK22EHLWtanu0LSYr5YqzsaaW3RMgmjwr8Rypg5k+meEJdSPXJZXE/yqOMg== + +zod@^3.25.20: + version "3.25.76" + resolved "https://registry.yarnpkg.com/zod/-/zod-3.25.76.tgz#26841c3f6fd22a6a2760e7ccb719179768471e34" + integrity sha512-gzUt/qt81nXsFGKIFcC3YnfEAx5NkunCfnDlvuBSSFS02bcXu4Lmea0AFIUwbLWxWPx3d9p8S5QoaujKcNQxcQ== From ce949f6cad7f4226d9742e6b7d71463a18814083 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 19 Aug 2025 02:52:06 +0000 Subject: [PATCH 31/44] chore(internal): refactor array check --- packages/mcp-server/src/headers.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/mcp-server/src/headers.ts b/packages/mcp-server/src/headers.ts index 27a7d59..bcb55e2 100644 --- a/packages/mcp-server/src/headers.ts +++ b/packages/mcp-server/src/headers.ts @@ -16,14 +16,14 @@ export const parseAuthHeaders = (req: IncomingMessage): Partial = } } - const apiKey = req.headers['api-key'] instanceof Array ? req.headers['api-key'][0] : req.headers['api-key']; + const apiKey = Array.isArray(req.headers['api-key']) ? req.headers['api-key'][0] : req.headers['api-key']; const ephemeralKey = - req.headers['api-key'] instanceof Array ? req.headers['api-key'][0] : req.headers['api-key']; + Array.isArray(req.headers['api-key']) ? req.headers['api-key'][0] : req.headers['api-key']; const jwtKey = - req.headers['x-hyperswitch-jwt-key'] instanceof Array ? + Array.isArray(req.headers['x-hyperswitch-jwt-key']) ? req.headers['x-hyperswitch-jwt-key'][0] : req.headers['x-hyperswitch-jwt-key']; const publishableKey = - req.headers['api-key'] instanceof Array ? req.headers['api-key'][0] : req.headers['api-key']; + Array.isArray(req.headers['api-key']) ? req.headers['api-key'][0] : req.headers['api-key']; return { apiKey, ephemeralKey, jwtKey, publishableKey }; }; From b34d42bad22fb1dc838bd3aa08e57a47162a3d6d Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 20 Aug 2025 06:15:32 +0000 Subject: [PATCH 32/44] chore(mcp): add cors to oauth metadata route --- packages/mcp-server/package.json | 2 ++ 1 file changed, 2 insertions(+) diff --git a/packages/mcp-server/package.json b/packages/mcp-server/package.json index 2aee48b..ddf49aa 100644 --- a/packages/mcp-server/package.json +++ b/packages/mcp-server/package.json @@ -30,6 +30,7 @@ "hyperswitch": "file:../../dist/", "@cloudflare/cabidela": "^0.2.4", "@modelcontextprotocol/sdk": "^1.11.5", + "cors": "^2.8.5", "express": "^5.1.0", "jq-web": "https://github.com/stainless-api/jq-web/releases/download/v0.8.6/jq-web.tar.gz", "qs": "^6.14.0", @@ -42,6 +43,7 @@ "mcp-server": "dist/index.js" }, "devDependencies": { + "@types/cors": "^2.8.19", "@types/express": "^5.0.3", "@types/jest": "^29.4.0", "@types/yargs": "^17.0.8", From 28a0bd05e0c5988e1cc36f8e5db6090a6b35ee7d Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 20 Aug 2025 06:18:09 +0000 Subject: [PATCH 33/44] feat(mcp): add code execution tool --- package.json | 2 +- packages/mcp-server/package.json | 3 +- packages/mcp-server/src/code-tool-paths.cts | 3 + packages/mcp-server/src/code-tool-types.ts | 14 ++ packages/mcp-server/src/code-tool-worker.ts | 46 ++++++ packages/mcp-server/src/code-tool.ts | 149 ++++++++++++++++++++ packages/mcp-server/src/options.ts | 18 ++- packages/mcp-server/src/server.ts | 3 + yarn.lock | 7 +- 9 files changed, 233 insertions(+), 12 deletions(-) create mode 100644 packages/mcp-server/src/code-tool-paths.cts create mode 100644 packages/mcp-server/src/code-tool-types.ts create mode 100644 packages/mcp-server/src/code-tool-worker.ts create mode 100644 packages/mcp-server/src/code-tool.ts diff --git a/package.json b/package.json index ace1745..293e098 100644 --- a/package.json +++ b/package.json @@ -44,7 +44,7 @@ "publint": "^0.2.12", "ts-jest": "^29.1.0", "ts-node": "^10.5.0", - "tsc-multi": "https://github.com/stainless-api/tsc-multi/releases/download/v1.1.8/tsc-multi.tgz", + "tsc-multi": "https://github.com/stainless-api/tsc-multi/releases/download/v1.1.9/tsc-multi.tgz", "tsconfig-paths": "^4.0.0", "typescript": "5.8.3", "typescript-eslint": "8.31.1" diff --git a/packages/mcp-server/package.json b/packages/mcp-server/package.json index ddf49aa..bf5ac35 100644 --- a/packages/mcp-server/package.json +++ b/packages/mcp-server/package.json @@ -30,6 +30,7 @@ "hyperswitch": "file:../../dist/", "@cloudflare/cabidela": "^0.2.4", "@modelcontextprotocol/sdk": "^1.11.5", + "@valtown/deno-http-worker": "^0.0.21", "cors": "^2.8.5", "express": "^5.1.0", "jq-web": "https://github.com/stainless-api/jq-web/releases/download/v0.8.6/jq-web.tar.gz", @@ -57,7 +58,7 @@ "ts-jest": "^29.1.0", "ts-morph": "^19.0.0", "ts-node": "^10.5.0", - "tsc-multi": "https://github.com/stainless-api/tsc-multi/releases/download/v1.1.8/tsc-multi.tgz", + "tsc-multi": "https://github.com/stainless-api/tsc-multi/releases/download/v1.1.9/tsc-multi.tgz", "tsconfig-paths": "^4.0.0", "typescript": "5.8.3" }, diff --git a/packages/mcp-server/src/code-tool-paths.cts b/packages/mcp-server/src/code-tool-paths.cts new file mode 100644 index 0000000..15ce7f5 --- /dev/null +++ b/packages/mcp-server/src/code-tool-paths.cts @@ -0,0 +1,3 @@ +// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +export const workerPath = require.resolve('./code-tool-worker.mjs'); diff --git a/packages/mcp-server/src/code-tool-types.ts b/packages/mcp-server/src/code-tool-types.ts new file mode 100644 index 0000000..cd89f85 --- /dev/null +++ b/packages/mcp-server/src/code-tool-types.ts @@ -0,0 +1,14 @@ +// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +import { type ClientOptions } from 'hyperswitch/client'; + +export type WorkerInput = { + opts: ClientOptions; + code: string; +}; +export type WorkerSuccess = { + result: unknown | null; + logLines: string[]; + errLines: string[]; +}; +export type WorkerError = { message: string | undefined }; diff --git a/packages/mcp-server/src/code-tool-worker.ts b/packages/mcp-server/src/code-tool-worker.ts new file mode 100644 index 0000000..d86928b --- /dev/null +++ b/packages/mcp-server/src/code-tool-worker.ts @@ -0,0 +1,46 @@ +// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +import util from 'node:util'; +import { WorkerInput, WorkerSuccess, WorkerError } from './code-tool-types'; +import { Hyperswitch } from 'hyperswitch'; + +const fetch = async (req: Request): Promise => { + const { opts, code } = (await req.json()) as WorkerInput; + const client = new Hyperswitch({ + ...opts, + }); + + const logLines: string[] = []; + const errLines: string[] = []; + const console = { + log: (...args: unknown[]) => { + logLines.push(util.format(...args)); + }, + error: (...args: unknown[]) => { + errLines.push(util.format(...args)); + }, + }; + try { + let run_ = async (client: any) => {}; + eval(` + ${code} + run_ = run; + `); + const result = await run_(client); + return Response.json({ + result, + logLines, + errLines, + } satisfies WorkerSuccess); + } catch (e) { + const message = e instanceof Error ? e.message : undefined; + return Response.json( + { + message, + } satisfies WorkerError, + { status: 400, statusText: 'Code execution error' }, + ); + } +}; + +export default { fetch }; diff --git a/packages/mcp-server/src/code-tool.ts b/packages/mcp-server/src/code-tool.ts new file mode 100644 index 0000000..929293d --- /dev/null +++ b/packages/mcp-server/src/code-tool.ts @@ -0,0 +1,149 @@ +// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +import { type ClientOptions } from 'hyperswitch/client'; + +import { dirname } from 'node:path'; +import { pathToFileURL } from 'node:url'; +import Hyperswitch from 'hyperswitch'; +import { Endpoint, ContentBlock, Metadata } from './tools/types'; + +import { Tool } from '@modelcontextprotocol/sdk/types.js'; + +import { newDenoHTTPWorker } from '@valtown/deno-http-worker'; +import { WorkerInput, WorkerError, WorkerSuccess } from './code-tool-types'; +import { workerPath } from './code-tool-paths.cjs'; + +/** + * A tool that runs code against a copy of the SDK. + * + * Instead of exposing every endpoint as it's own tool, which uses up too many tokens for LLMs to use at once, + * we expose a single tool that can be used to search for endpoints by name, resource, operation, or tag, and then + * a generic endpoint that can be used to invoke any endpoint with the provided arguments. + * + * @param endpoints - The endpoints to include in the list. + */ +export function codeTool(): Endpoint { + const metadata: Metadata = { resource: 'all', operation: 'write', tags: [] }; + const tool: Tool = { + name: 'execute', + description: + 'Runs Typescript code to interact with the API.\nYou are a skilled programmer writing code to interface with the service.\nDefine an async function named "run" that takes a single parameter of an initialized client, and it will be run.\nDo not initialize a client, but instead use the client that you are given as a parameter.\nYou will be returned anything that your function returns, plus the results of any console.log statements.\nIf any code triggers an error, the tool will return an error response, so you do not need to add error handling unless you want to output something more helpful than the raw error.\nIt is not necessary to add comments to code, unless by adding those comments you believe that you can generate better code.\nThis code will run in a container, and you will not be able to use fetch or otherwise interact with the network calls other than through the client you are given.\nAny variables you define won\'t live between successive uses of this call, so make sure to return or log any data you might need later.', + inputSchema: { type: 'object', properties: { code: { type: 'string' } } }, + }; + + const handler = async (client: Hyperswitch, args: unknown) => { + const baseURLHostname = new URL(client.baseURL).hostname; + const { code } = args as { code: string }; + + const worker = await newDenoHTTPWorker(pathToFileURL(workerPath), { + runFlags: [ + `--node-modules-dir=manual`, + `--allow-read=code-tool-worker.mjs,${workerPath.replace(/([\/\\]node_modules)[\/\\].+$/, '$1')}/`, + `--allow-net=${baseURLHostname}`, + // Allow environment variables because instantiating the client will try to read from them, + // even though they are not set. + '--allow-env', + ], + printOutput: true, + spawnOptions: { + cwd: dirname(workerPath), + }, + }); + + try { + const resp = await new Promise((resolve, reject) => { + worker.addEventListener('exit', (exitCode) => { + reject(new Error(`Worker exited with code ${exitCode}`)); + }); + + const opts: ClientOptions = { + baseURL: client.baseURL, + apiKey: client.apiKey, + ephemeralKey: client.ephemeralKey, + jwtKey: client.jwtKey, + publishableKey: client.publishableKey, + defaultHeaders: { + 'X-Stainless-MCP': 'true', + }, + }; + + const req = worker.request( + 'http://localhost', + { + headers: { + 'content-type': 'application/json', + }, + method: 'POST', + }, + (resp) => { + const body: Uint8Array[] = []; + resp.on('error', (err) => { + reject(err); + }); + resp.on('data', (chunk) => { + body.push(chunk); + }); + resp.on('end', () => { + resolve( + new Response(Buffer.concat(body).toString(), { + status: resp.statusCode ?? 200, + headers: resp.headers as any, + }), + ); + }); + }, + ); + + const body = JSON.stringify({ + opts, + code, + } satisfies WorkerInput); + + req.write(body, (err) => { + if (err !== null && err !== undefined) { + reject(err); + } + }); + + req.end(); + }); + + if (resp.status === 200) { + const { result, logLines, errLines } = (await resp.json()) as WorkerSuccess; + const returnOutput: ContentBlock | null = + result === null ? null + : result === undefined ? null + : { + type: 'text', + text: typeof result === 'string' ? (result as string) : JSON.stringify(result), + }; + const logOutput: ContentBlock | null = + logLines.length === 0 ? + null + : { + type: 'text', + text: logLines.join('\n'), + }; + const errOutput: ContentBlock | null = + errLines.length === 0 ? + null + : { + type: 'text', + text: 'Error output:\n' + errLines.join('\n'), + }; + return { + content: [returnOutput, logOutput, errOutput].filter((block) => block !== null), + }; + } else { + const { message } = (await resp.json()) as WorkerError; + throw new Error(message); + } + } catch (e) { + throw e; + } finally { + worker.terminate(); + } + }; + + return { metadata, tool, handler }; +} diff --git a/packages/mcp-server/src/options.ts b/packages/mcp-server/src/options.ts index 0768d93..a174591 100644 --- a/packages/mcp-server/src/options.ts +++ b/packages/mcp-server/src/options.ts @@ -16,6 +16,7 @@ export type McpOptions = { client: ClientType | undefined; includeDynamicTools: boolean | undefined; includeAllTools: boolean | undefined; + includeCodeTools: boolean | undefined; filters: Filter[]; capabilities?: Partial; }; @@ -54,13 +55,13 @@ export function parseCLIOptions(): CLIOptions { .option('tools', { type: 'string', array: true, - choices: ['dynamic', 'all'], + choices: ['dynamic', 'all', 'code'], description: 'Use dynamic tools or all tools', }) .option('no-tools', { type: 'string', array: true, - choices: ['dynamic', 'all'], + choices: ['dynamic', 'all', 'code'], description: 'Do not use any dynamic or all tools', }) .option('tool', { @@ -251,11 +252,13 @@ export function parseCLIOptions(): CLIOptions { } } + const shouldIncludeToolType = (toolType: 'dynamic' | 'all' | 'code') => + explicitTools ? argv.tools?.includes(toolType) && !argv.noTools?.includes(toolType) : undefined; + const explicitTools = Boolean(argv.tools || argv.noTools); - const includeDynamicTools = - explicitTools ? argv.tools?.includes('dynamic') && !argv.noTools?.includes('dynamic') : undefined; - const includeAllTools = - explicitTools ? argv.tools?.includes('all') && !argv.noTools?.includes('all') : undefined; + const includeDynamicTools = shouldIncludeToolType('dynamic'); + const includeAllTools = shouldIncludeToolType('all'); + const includeCodeTools = shouldIncludeToolType('code'); const transport = argv.transport as 'stdio' | 'http'; @@ -264,6 +267,7 @@ export function parseCLIOptions(): CLIOptions { client: client && knownClients[client] ? client : undefined, includeDynamicTools, includeAllTools, + includeCodeTools, filters, capabilities: clientCapabilities, list: argv.list || false, @@ -385,6 +389,8 @@ export function parseQueryOptions(defaultOptions: McpOptions, query: unknown): M includeAllTools: defaultOptions.includeAllTools ?? (queryOptions.tools?.includes('all') && !queryOptions.no_tools?.includes('all')), + // Never include code tools on remote server. + includeCodeTools: undefined, filters, capabilities: clientCapabilities, }; diff --git a/packages/mcp-server/src/server.ts b/packages/mcp-server/src/server.ts index d0a8a0e..d46fe67 100644 --- a/packages/mcp-server/src/server.ts +++ b/packages/mcp-server/src/server.ts @@ -14,6 +14,7 @@ import { parseEmbeddedJSON, } from './compat'; import { dynamicTools } from './dynamic-tools'; +import { codeTool } from './code-tool'; import { McpOptions } from './options'; export { McpOptions } from './options'; @@ -116,6 +117,8 @@ export function selectTools(endpoints: Endpoint[], options: McpOptions): Endpoin includedTools = endpoints; } else if (options.includeDynamicTools) { includedTools = dynamicTools(endpoints); + } else if (options.includeCodeTools) { + includedTools = [codeTool()]; } else { includedTools = endpoints; } diff --git a/yarn.lock b/yarn.lock index fd164dc..8311caf 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3283,10 +3283,9 @@ ts-node@^10.5.0: v8-compile-cache-lib "^3.0.0" yn "3.1.1" -"tsc-multi@https://github.com/stainless-api/tsc-multi/releases/download/v1.1.8/tsc-multi.tgz": - version "1.1.8" - uid f544b359b8f05e607771ffacc280e58201476b04 - resolved "https://github.com/stainless-api/tsc-multi/releases/download/v1.1.8/tsc-multi.tgz#f544b359b8f05e607771ffacc280e58201476b04" +"tsc-multi@https://github.com/stainless-api/tsc-multi/releases/download/v1.1.9/tsc-multi.tgz": + version "1.1.9" + resolved "https://github.com/stainless-api/tsc-multi/releases/download/v1.1.9/tsc-multi.tgz#777f6f5d9e26bf0e94e5170990dd3a841d6707cd" dependencies: debug "^4.3.7" fast-glob "^3.3.2" From c61ae9b0861a98460adcb0b0e0f926d9c38aff0d Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 21 Aug 2025 05:29:46 +0000 Subject: [PATCH 34/44] chore(internal): make mcp-server publishing public by defaut --- packages/mcp-server/package.json | 3 +++ 1 file changed, 3 insertions(+) diff --git a/packages/mcp-server/package.json b/packages/mcp-server/package.json index bf5ac35..738283f 100644 --- a/packages/mcp-server/package.json +++ b/packages/mcp-server/package.json @@ -15,6 +15,9 @@ "license": "Apache-2.0", "packageManager": "yarn@1.22.22", "private": false, + "publishConfig": { + "access": "public" + }, "scripts": { "test": "jest", "build": "bash ./build", From f767f9418c3a828254d31132a1ea487aedb46056 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 21 Aug 2025 05:38:14 +0000 Subject: [PATCH 35/44] feat(mcp): add option to infer mcp client --- packages/mcp-server/src/compat.ts | 4 +- packages/mcp-server/src/http.ts | 7 +- packages/mcp-server/src/index.ts | 4 +- packages/mcp-server/src/options.ts | 46 +++++------- packages/mcp-server/src/server.ts | 85 ++++++++++++++--------- packages/mcp-server/src/stdio.ts | 7 +- packages/mcp-server/tests/options.test.ts | 25 +------ 7 files changed, 78 insertions(+), 100 deletions(-) diff --git a/packages/mcp-server/src/compat.ts b/packages/mcp-server/src/compat.ts index 1df7a7a..f84053c 100644 --- a/packages/mcp-server/src/compat.ts +++ b/packages/mcp-server/src/compat.ts @@ -20,13 +20,13 @@ export const defaultClientCapabilities: ClientCapabilities = { toolNameLength: undefined, }; -export const ClientType = z.enum(['openai-agents', 'claude', 'claude-code', 'cursor']); +export const ClientType = z.enum(['openai-agents', 'claude', 'claude-code', 'cursor', 'infer']); export type ClientType = z.infer; // Client presets for compatibility // Note that these could change over time as models get better, so this is // a best effort. -export const knownClients: Record = { +export const knownClients: Record, ClientCapabilities> = { 'openai-agents': { topLevelUnions: false, validJson: true, diff --git a/packages/mcp-server/src/http.ts b/packages/mcp-server/src/http.ts index ca6d3d2..c11185b 100644 --- a/packages/mcp-server/src/http.ts +++ b/packages/mcp-server/src/http.ts @@ -8,7 +8,6 @@ import { fromError } from 'zod-validation-error/v3'; import { McpOptions, parseQueryOptions } from './options'; import { initMcpServer, newMcpServer } from './server'; import { parseAuthHeaders } from './headers'; -import { Endpoint } from './tools'; const newServer = ( defaultMcpOptions: McpOptions, @@ -101,11 +100,7 @@ export const streamableHTTPApp = (options: McpOptions): express.Express => { return app; }; -export const launchStreamableHTTPServer = async ( - options: McpOptions, - endpoints: Endpoint[], - port: number | string | undefined, -) => { +export const launchStreamableHTTPServer = async (options: McpOptions, port: number | string | undefined) => { const app = streamableHTTPApp(options); const server = app.listen(port); const address = server.address(); diff --git a/packages/mcp-server/src/index.ts b/packages/mcp-server/src/index.ts index 05b2ba6..c450e4b 100644 --- a/packages/mcp-server/src/index.ts +++ b/packages/mcp-server/src/index.ts @@ -23,10 +23,10 @@ async function main() { switch (options.transport) { case 'stdio': - await launchStdioServer(options, selectedTools); + await launchStdioServer(options); break; case 'http': - await launchStreamableHTTPServer(options, selectedTools, options.port ?? options.socket); + await launchStreamableHTTPServer(options, options.port ?? options.socket); break; } } diff --git a/packages/mcp-server/src/options.ts b/packages/mcp-server/src/options.ts index a174591..9eb00b4 100644 --- a/packages/mcp-server/src/options.ts +++ b/packages/mcp-server/src/options.ts @@ -13,12 +13,12 @@ export type CLIOptions = McpOptions & { }; export type McpOptions = { - client: ClientType | undefined; - includeDynamicTools: boolean | undefined; - includeAllTools: boolean | undefined; - includeCodeTools: boolean | undefined; - filters: Filter[]; - capabilities?: Partial; + client?: ClientType | undefined; + includeDynamicTools?: boolean | undefined; + includeAllTools?: boolean | undefined; + includeCodeTools?: boolean | undefined; + filters?: Filter[] | undefined; + capabilities?: Partial | undefined; }; const CAPABILITY_CHOICES = [ @@ -204,14 +204,7 @@ export function parseCLIOptions(): CLIOptions { } // Parse client capabilities - const clientCapabilities: ClientCapabilities = { - topLevelUnions: true, - validJson: true, - refs: true, - unions: true, - formats: true, - toolNameLength: undefined, - }; + const clientCapabilities: Partial = {}; // Apply individual capability overrides if (Array.isArray(argv.capability)) { @@ -264,7 +257,7 @@ export function parseCLIOptions(): CLIOptions { const client = argv.client as ClientType; return { - client: client && knownClients[client] ? client : undefined, + client: client && client !== 'infer' && knownClients[client] ? client : undefined, includeDynamicTools, includeAllTools, includeCodeTools, @@ -310,7 +303,7 @@ export function parseQueryOptions(defaultOptions: McpOptions, query: unknown): M const queryObject = typeof query === 'string' ? qs.parse(query) : query; const queryOptions = QueryOptions.parse(queryObject); - const filters: Filter[] = [...defaultOptions.filters]; + const filters: Filter[] = [...(defaultOptions.filters ?? [])]; for (const resource of queryOptions.resource || []) { filters.push({ type: 'resource', op: 'include', value: resource }); @@ -338,15 +331,7 @@ export function parseQueryOptions(defaultOptions: McpOptions, query: unknown): M } // Parse client capabilities - const clientCapabilities: ClientCapabilities = { - topLevelUnions: true, - validJson: true, - refs: true, - unions: true, - formats: true, - toolNameLength: undefined, - ...defaultOptions.capabilities, - }; + const clientCapabilities: Partial = { ...defaultOptions.capabilities }; for (const cap of queryOptions.capability || []) { const parsed = parseCapabilityValue(cap); @@ -384,12 +369,13 @@ export function parseQueryOptions(defaultOptions: McpOptions, query: unknown): M return { client: queryOptions.client ?? defaultOptions.client, includeDynamicTools: - defaultOptions.includeDynamicTools ?? - (queryOptions.tools?.includes('dynamic') && !queryOptions.no_tools?.includes('dynamic')), + defaultOptions.includeDynamicTools === false ? + false + : queryOptions.tools?.includes('dynamic') && !queryOptions.no_tools?.includes('dynamic'), includeAllTools: - defaultOptions.includeAllTools ?? - (queryOptions.tools?.includes('all') && !queryOptions.no_tools?.includes('all')), - // Never include code tools on remote server. + defaultOptions.includeAllTools === false ? + false + : queryOptions.tools?.includes('all') && !queryOptions.no_tools?.includes('all'), includeCodeTools: undefined, filters, capabilities: clientCapabilities, diff --git a/packages/mcp-server/src/server.ts b/packages/mcp-server/src/server.ts index d46fe67..bc47342 100644 --- a/packages/mcp-server/src/server.ts +++ b/packages/mcp-server/src/server.ts @@ -3,7 +3,12 @@ import { Server } from '@modelcontextprotocol/sdk/server/index.js'; import { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js'; import { Endpoint, endpoints, HandlerFunction, query } from './tools'; -import { CallToolRequestSchema, ListToolsRequestSchema, Tool } from '@modelcontextprotocol/sdk/types.js'; +import { + CallToolRequestSchema, + Implementation, + ListToolsRequestSchema, + Tool, +} from '@modelcontextprotocol/sdk/types.js'; import { ClientOptions } from 'hyperswitch'; import Hyperswitch from 'hyperswitch'; import { @@ -41,29 +46,29 @@ export const server = newMcpServer(); */ export function initMcpServer(params: { server: Server | McpServer; - clientOptions: ClientOptions; - mcpOptions: McpOptions; - endpoints?: { tool: Tool; handler: HandlerFunction }[]; -}) { - const transformedEndpoints = selectTools(endpoints, params.mcpOptions); - const client = new Hyperswitch(params.clientOptions); - const capabilities = { - ...defaultClientCapabilities, - ...(params.mcpOptions.client ? knownClients[params.mcpOptions.client] : params.mcpOptions.capabilities), - }; - init({ server: params.server, client, endpoints: transformedEndpoints, capabilities }); -} - -export function init(params: { - server: Server | McpServer; - client?: Hyperswitch; - endpoints?: { tool: Tool; handler: HandlerFunction }[]; - capabilities?: Partial; + clientOptions?: ClientOptions; + mcpOptions?: McpOptions; }) { const server = params.server instanceof McpServer ? params.server.server : params.server; - const providedEndpoints = params.endpoints || endpoints; - - const endpointMap = Object.fromEntries(providedEndpoints.map((endpoint) => [endpoint.tool.name, endpoint])); + const mcpOptions = params.mcpOptions ?? {}; + + let providedEndpoints: Endpoint[] | null = null; + let endpointMap: Record | null = null; + + const initTools = (implementation?: Implementation) => { + if (implementation && (!mcpOptions.client || mcpOptions.client === 'infer')) { + mcpOptions.client = + implementation.name.toLowerCase().includes('claude') ? 'claude' + : implementation.name.toLowerCase().includes('cursor') ? 'cursor' + : undefined; + mcpOptions.capabilities = { + ...(mcpOptions.client && knownClients[mcpOptions.client]), + ...mcpOptions.capabilities, + }; + } + providedEndpoints = selectTools(endpoints, mcpOptions); + endpointMap = Object.fromEntries(providedEndpoints.map((endpoint) => [endpoint.tool.name, endpoint])); + }; const logAtLevel = (level: 'debug' | 'info' | 'warning' | 'error') => @@ -80,51 +85,63 @@ export function init(params: { error: logAtLevel('error'), }; - const client = - params.client || new Hyperswitch({ defaultHeaders: { 'X-Stainless-MCP': 'true' }, logger: logger }); + const client = new Hyperswitch({ + logger, + ...params.clientOptions, + defaultHeaders: { + ...params.clientOptions?.defaultHeaders, + 'X-Stainless-MCP': 'true', + }, + }); server.setRequestHandler(ListToolsRequestSchema, async () => { + if (providedEndpoints === null) { + initTools(server.getClientVersion()); + } return { - tools: providedEndpoints.map((endpoint) => endpoint.tool), + tools: providedEndpoints!.map((endpoint) => endpoint.tool), }; }); server.setRequestHandler(CallToolRequestSchema, async (request) => { + if (endpointMap === null) { + initTools(server.getClientVersion()); + } const { name, arguments: args } = request.params; - const endpoint = endpointMap[name]; + const endpoint = endpointMap![name]; if (!endpoint) { throw new Error(`Unknown tool: ${name}`); } - return executeHandler(endpoint.tool, endpoint.handler, client, args, params.capabilities); + return executeHandler(endpoint.tool, endpoint.handler, client, args, mcpOptions.capabilities); }); } /** * Selects the tools to include in the MCP Server based on the provided options. */ -export function selectTools(endpoints: Endpoint[], options: McpOptions): Endpoint[] { - const filteredEndpoints = query(options.filters, endpoints); +export function selectTools(endpoints: Endpoint[], options?: McpOptions): Endpoint[] { + const filteredEndpoints = query(options?.filters ?? [], endpoints); let includedTools = filteredEndpoints; if (includedTools.length > 0) { - if (options.includeDynamicTools) { + if (options?.includeDynamicTools) { includedTools = dynamicTools(includedTools); } } else { - if (options.includeAllTools) { + if (options?.includeAllTools) { includedTools = endpoints; - } else if (options.includeDynamicTools) { + } else if (options?.includeDynamicTools) { includedTools = dynamicTools(endpoints); - } else if (options.includeCodeTools) { + } else if (options?.includeCodeTools) { includedTools = [codeTool()]; } else { includedTools = endpoints; } } - const capabilities = { ...defaultClientCapabilities, ...options.capabilities }; + const capabilities = { ...defaultClientCapabilities, ...options?.capabilities }; return applyCompatibilityTransformations(includedTools, capabilities); } diff --git a/packages/mcp-server/src/stdio.ts b/packages/mcp-server/src/stdio.ts index b269163..d902a5b 100644 --- a/packages/mcp-server/src/stdio.ts +++ b/packages/mcp-server/src/stdio.ts @@ -1,12 +1,11 @@ import { StdioServerTransport } from '@modelcontextprotocol/sdk/server/stdio.js'; -import { init, newMcpServer } from './server'; -import { Endpoint } from './tools'; +import { initMcpServer, newMcpServer } from './server'; import { McpOptions } from './options'; -export const launchStdioServer = async (options: McpOptions, endpoints: Endpoint[]) => { +export const launchStdioServer = async (options: McpOptions) => { const server = newMcpServer(); - init({ server, endpoints }); + initMcpServer({ server, mcpOptions: options }); const transport = new StdioServerTransport(); await server.connect(transport); diff --git a/packages/mcp-server/tests/options.test.ts b/packages/mcp-server/tests/options.test.ts index 08ea1f1..24604b8 100644 --- a/packages/mcp-server/tests/options.test.ts +++ b/packages/mcp-server/tests/options.test.ts @@ -29,15 +29,7 @@ describe('parseCLIOptions', () => { { type: 'operation', op: 'include', value: 'read' }, ] as Filter[]); - // Default client capabilities - expect(result.capabilities).toEqual({ - topLevelUnions: true, - validJson: true, - refs: true, - unions: true, - formats: true, - toolNameLength: undefined, - }); + expect(result.capabilities).toEqual({}); expect(result.list).toBe(false); @@ -61,14 +53,7 @@ describe('parseCLIOptions', () => { { type: 'operation', op: 'exclude', value: 'write' }, ] as Filter[]); - expect(result.capabilities).toEqual({ - topLevelUnions: true, - validJson: true, - refs: true, - unions: true, - formats: true, - toolNameLength: undefined, - }); + expect(result.capabilities).toEqual({}); cleanup(); }); @@ -99,7 +84,6 @@ describe('parseCLIOptions', () => { validJson: true, refs: true, unions: true, - formats: true, toolNameLength: 40, }); @@ -150,10 +134,7 @@ describe('parseCLIOptions', () => { expect(result.capabilities).toEqual({ topLevelUnions: true, validJson: true, - refs: true, unions: true, - formats: true, - toolNameLength: undefined, }); cleanup(); @@ -316,7 +297,7 @@ describe('parseQueryOptions', () => { ]); expect(result.client).toBe('cursor'); - expect(result.includeDynamicTools).toBe(true); + expect(result.includeDynamicTools).toBe(undefined); }); it('should override client from default options', () => { From a6a6b0c2f1fc9f56fe40173ad3f8b4914149927f Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 22 Aug 2025 06:20:23 +0000 Subject: [PATCH 36/44] chore(mcp): update package.json --- packages/mcp-server/package.json | 1 + packages/mcp-server/src/headers.ts | 3 +-- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/mcp-server/package.json b/packages/mcp-server/package.json index 738283f..772a452 100644 --- a/packages/mcp-server/package.json +++ b/packages/mcp-server/package.json @@ -50,6 +50,7 @@ "@types/cors": "^2.8.19", "@types/express": "^5.0.3", "@types/jest": "^29.4.0", + "@types/qs": "^6.14.0", "@types/yargs": "^17.0.8", "@typescript-eslint/eslint-plugin": "8.31.1", "@typescript-eslint/parser": "8.31.1", diff --git a/packages/mcp-server/src/headers.ts b/packages/mcp-server/src/headers.ts index bcb55e2..115a2cc 100644 --- a/packages/mcp-server/src/headers.ts +++ b/packages/mcp-server/src/headers.ts @@ -1,8 +1,7 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import { type ClientOptions } from 'hyperswitch/client'; - import { IncomingMessage } from 'node:http'; +import { ClientOptions } from 'hyperswitch'; export const parseAuthHeaders = (req: IncomingMessage): Partial => { if (req.headers.authorization) { From 1d02aa64c1b9fdd69668ed0618b2e9f9ed580de8 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 22 Aug 2025 06:35:05 +0000 Subject: [PATCH 37/44] chore(mcp): update types --- packages/mcp-server/src/code-tool-types.ts | 2 +- packages/mcp-server/src/code-tool.ts | 4 +--- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/packages/mcp-server/src/code-tool-types.ts b/packages/mcp-server/src/code-tool-types.ts index cd89f85..da0e05f 100644 --- a/packages/mcp-server/src/code-tool-types.ts +++ b/packages/mcp-server/src/code-tool-types.ts @@ -1,6 +1,6 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import { type ClientOptions } from 'hyperswitch/client'; +import { ClientOptions } from 'hyperswitch'; export type WorkerInput = { opts: ClientOptions; diff --git a/packages/mcp-server/src/code-tool.ts b/packages/mcp-server/src/code-tool.ts index 929293d..028cfad 100644 --- a/packages/mcp-server/src/code-tool.ts +++ b/packages/mcp-server/src/code-tool.ts @@ -1,10 +1,8 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import { type ClientOptions } from 'hyperswitch/client'; - import { dirname } from 'node:path'; import { pathToFileURL } from 'node:url'; -import Hyperswitch from 'hyperswitch'; +import Hyperswitch, { ClientOptions } from 'hyperswitch'; import { Endpoint, ContentBlock, Metadata } from './tools/types'; import { Tool } from '@modelcontextprotocol/sdk/types.js'; From a69ea91d5e8d4ed628ad043af7dfe9bd7bed4904 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 22 Aug 2025 06:37:34 +0000 Subject: [PATCH 38/44] chore: add package to package.json --- package.json | 1 + scripts/bootstrap | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/package.json b/package.json index 293e098..dab5117 100644 --- a/package.json +++ b/package.json @@ -46,6 +46,7 @@ "ts-node": "^10.5.0", "tsc-multi": "https://github.com/stainless-api/tsc-multi/releases/download/v1.1.9/tsc-multi.tgz", "tsconfig-paths": "^4.0.0", + "tslib": "^2.8.1", "typescript": "5.8.3", "typescript-eslint": "8.31.1" }, diff --git a/scripts/bootstrap b/scripts/bootstrap index 0af58e2..062a034 100755 --- a/scripts/bootstrap +++ b/scripts/bootstrap @@ -15,4 +15,4 @@ echo "==> Installing Node dependencies…" PACKAGE_MANAGER=$(command -v yarn >/dev/null 2>&1 && echo "yarn" || echo "npm") -$PACKAGE_MANAGER install +$PACKAGE_MANAGER install "$@" From 2d8c2f4a2e49baa2cc793b2ee01089971a775241 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 22 Aug 2025 06:40:18 +0000 Subject: [PATCH 39/44] chore(internal): codegen related update --- .github/workflows/ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index d77a383..a4c18e6 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -24,7 +24,7 @@ jobs: - name: Set up Node uses: actions/setup-node@v4 with: - node-version: '20' + node-version: '22' - name: Bootstrap run: ./scripts/bootstrap @@ -46,7 +46,7 @@ jobs: - name: Set up Node uses: actions/setup-node@v4 with: - node-version: '20' + node-version: '22' - name: Bootstrap run: ./scripts/bootstrap From 32af13dd4600728cf05e934461b7d02e062197f5 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 22 Aug 2025 06:44:59 +0000 Subject: [PATCH 40/44] chore(client): qualify global Blob --- src/client.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/client.ts b/src/client.ts index 0270fd0..2165799 100644 --- a/src/client.ts +++ b/src/client.ts @@ -1009,7 +1009,7 @@ export class Hyperswitch { // Preserve legacy string encoding behavior for now headers.values.has('content-type')) || // `Blob` is superset of `File` - body instanceof Blob || + ((globalThis as any).Blob && body instanceof (globalThis as any).Blob) || // `FormData` -> `multipart/form-data` body instanceof FormData || // `URLSearchParams` -> `application/x-www-form-urlencoded` From 9e50c83d0f409cf619ea703a08b411aa36e46a97 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Sat, 23 Aug 2025 04:56:55 +0000 Subject: [PATCH 41/44] chore: update CI script --- .github/workflows/ci.yml | 9 +++++++++ scripts/utils/upload-artifact.sh | 2 +- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index a4c18e6..6fb9f10 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -68,6 +68,15 @@ jobs: AUTH: ${{ steps.github-oidc.outputs.github_token }} SHA: ${{ github.sha }} run: ./scripts/utils/upload-artifact.sh + + - name: Upload MCP Server tarball + if: github.repository == 'stainless-sdks/hyperswitch-typescript' + env: + URL: https://pkg.stainless.com/s?subpackage=mcp-server + AUTH: ${{ steps.github-oidc.outputs.github_token }} + SHA: ${{ github.sha }} + BUILD_PATH: packages/mcp-server/dist + run: ./scripts/utils/upload-artifact.sh test: timeout-minutes: 10 name: test diff --git a/scripts/utils/upload-artifact.sh b/scripts/utils/upload-artifact.sh index c0f3652..936f093 100755 --- a/scripts/utils/upload-artifact.sh +++ b/scripts/utils/upload-artifact.sh @@ -12,7 +12,7 @@ if [[ "$SIGNED_URL" == "null" ]]; then exit 1 fi -UPLOAD_RESPONSE=$(tar -cz dist | curl -v -X PUT \ +UPLOAD_RESPONSE=$(tar -cz "${BUILD_PATH:-dist}" | curl -v -X PUT \ -H "Content-Type: application/gzip" \ --data-binary @- "$SIGNED_URL" 2>&1) From 5c85e4364844fca77e314541db6152542b899c29 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Sun, 24 Aug 2025 02:27:42 +0000 Subject: [PATCH 42/44] chore(internal): codegen related update --- packages/mcp-server/src/options.ts | 20 ++++++++++++-------- packages/mcp-server/tests/options.test.ts | 2 +- 2 files changed, 13 insertions(+), 9 deletions(-) diff --git a/packages/mcp-server/src/options.ts b/packages/mcp-server/src/options.ts index 9eb00b4..2100cf5 100644 --- a/packages/mcp-server/src/options.ts +++ b/packages/mcp-server/src/options.ts @@ -366,16 +366,20 @@ export function parseQueryOptions(defaultOptions: McpOptions, query: unknown): M } } + let dynamicTools: boolean | undefined = + queryOptions.no_tools && !queryOptions.no_tools?.includes('dynamic') ? false + : queryOptions.tools?.includes('dynamic') ? true + : defaultOptions.includeDynamicTools; + + let allTools: boolean | undefined = + queryOptions.no_tools && !queryOptions.no_tools?.includes('all') ? false + : queryOptions.tools?.includes('all') ? true + : defaultOptions.includeAllTools; + return { client: queryOptions.client ?? defaultOptions.client, - includeDynamicTools: - defaultOptions.includeDynamicTools === false ? - false - : queryOptions.tools?.includes('dynamic') && !queryOptions.no_tools?.includes('dynamic'), - includeAllTools: - defaultOptions.includeAllTools === false ? - false - : queryOptions.tools?.includes('all') && !queryOptions.no_tools?.includes('all'), + includeDynamicTools: dynamicTools, + includeAllTools: allTools, includeCodeTools: undefined, filters, capabilities: clientCapabilities, diff --git a/packages/mcp-server/tests/options.test.ts b/packages/mcp-server/tests/options.test.ts index 24604b8..a8a5b81 100644 --- a/packages/mcp-server/tests/options.test.ts +++ b/packages/mcp-server/tests/options.test.ts @@ -297,7 +297,7 @@ describe('parseQueryOptions', () => { ]); expect(result.client).toBe('cursor'); - expect(result.includeDynamicTools).toBe(undefined); + expect(result.includeDynamicTools).toBe(true); }); it('should override client from default options', () => { From b17a4e526619f0f359673e4e337f75de862ecb30 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 29 Aug 2025 03:35:42 +0000 Subject: [PATCH 43/44] chore(internal): update global Error reference --- src/client.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/client.ts b/src/client.ts index 2165799..7b48a91 100644 --- a/src/client.ts +++ b/src/client.ts @@ -702,7 +702,7 @@ export class Hyperswitch { const response = await this.fetchWithTimeout(url, req, timeout, controller).catch(castToError); const headersTime = Date.now(); - if (response instanceof Error) { + if (response instanceof globalThis.Error) { const retryMessage = `retrying, ${retriesRemaining} attempts remaining`; if (options.signal?.aborted) { throw new Errors.APIUserAbortError(); From 7eb79078b7aa1e21f43bd6cf21adcc39e61b8f32 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 29 Aug 2025 03:36:06 +0000 Subject: [PATCH 44/44] release: 0.1.0-alpha.1 --- .release-please-manifest.json | 2 +- CHANGELOG.md | 58 +++++++++++++++++++++++++++++++ package.json | 2 +- packages/mcp-server/package.json | 2 +- packages/mcp-server/src/server.ts | 2 +- src/version.ts | 2 +- 6 files changed, 63 insertions(+), 5 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 063a4ae..d7a8735 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.0.1-alpha.1" + ".": "0.1.0-alpha.1" } diff --git a/CHANGELOG.md b/CHANGELOG.md index 118e076..6c30d06 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,63 @@ # Changelog +## 0.1.0-alpha.1 (2025-08-29) + +Full Changelog: [v0.0.1-alpha.1...v0.1.0-alpha.1](https://github.com/gorakhnathy7/hs-mcp/compare/v0.0.1-alpha.1...v0.1.0-alpha.1) + +### Features + +* clean up environment call outs ([67f1a1d](https://github.com/gorakhnathy7/hs-mcp/commit/67f1a1d670e8e6345a78f14eb4e358a9af00050b)) +* **mcp:** add code execution tool ([28a0bd0](https://github.com/gorakhnathy7/hs-mcp/commit/28a0bd05e0c5988e1cc36f8e5db6090a6b35ee7d)) +* **mcp:** add logging when environment variable is set ([3f111e0](https://github.com/gorakhnathy7/hs-mcp/commit/3f111e072ea107f1a95355e4be21eb12be1286fd)) +* **mcp:** add option to infer mcp client ([f767f94](https://github.com/gorakhnathy7/hs-mcp/commit/f767f9418c3a828254d31132a1ea487aedb46056)) +* **mcp:** add unix socket option for remote MCP ([21a5331](https://github.com/gorakhnathy7/hs-mcp/commit/21a5331ea0916bbf264b58cb2c71a67020a565b5)) +* **mcp:** parse query string as mcp client options in mcp server ([c569945](https://github.com/gorakhnathy7/hs-mcp/commit/c5699456c5ea54f776c37e38979f1d108c4fe7c7)) +* **mcp:** remote server with passthru auth ([3e8772b](https://github.com/gorakhnathy7/hs-mcp/commit/3e8772b34da07e178818095c96c1439ba4f859b2)) + + +### Bug Fixes + +* **mcp:** avoid sending `jq_filter` to base API ([5d9293a](https://github.com/gorakhnathy7/hs-mcp/commit/5d9293ae60f78233ec2f879ac873299eb69fcec3)) +* **mcp:** fix bug in header handling ([2e52a55](https://github.com/gorakhnathy7/hs-mcp/commit/2e52a55ba19a293660d678184e6ebefc6b4ad95a)) +* **mcp:** fix tool description of jq_filter ([93d9fc6](https://github.com/gorakhnathy7/hs-mcp/commit/93d9fc6e4c0b78d09ccebc5f43723a5b280f209e)) +* **mcp:** generate additionalProperties=true for map schemas to avoid validation issues ([1f09439](https://github.com/gorakhnathy7/hs-mcp/commit/1f0943926f80c18063262273840e96fc6bc98876)) +* **mcp:** include required section for top-level properties and support naming transformations ([c80d7e4](https://github.com/gorakhnathy7/hs-mcp/commit/c80d7e4087257b9b45fc3d53deffec0f5c2c37ac)) +* **mcp:** reverse validJson capability option and limit scope ([7524d52](https://github.com/gorakhnathy7/hs-mcp/commit/7524d520dcbaaaed1d6cf8bcb2c15ab0276e8783)) +* **mcp:** support jq filtering on cloudflare workers ([c564d5b](https://github.com/gorakhnathy7/hs-mcp/commit/c564d5bc3893c126fa175fe6cfe14cbb4d3048e2)) + + +### Chores + +* add docs to RequestOptions type ([b19a4e9](https://github.com/gorakhnathy7/hs-mcp/commit/b19a4e9c549f751fe6c53f15a7888a530bb0fa56)) +* add package to package.json ([a69ea91](https://github.com/gorakhnathy7/hs-mcp/commit/a69ea91d5e8d4ed628ad043af7dfe9bd7bed4904)) +* **client:** qualify global Blob ([32af13d](https://github.com/gorakhnathy7/hs-mcp/commit/32af13dd4600728cf05e934461b7d02e062197f5)) +* **deps:** update dependency @types/node to v20.17.58 ([d4a921b](https://github.com/gorakhnathy7/hs-mcp/commit/d4a921b33249431274fe01f2e8e71b1df30599dc)) +* **internal:** codegen related update ([5c85e43](https://github.com/gorakhnathy7/hs-mcp/commit/5c85e4364844fca77e314541db6152542b899c29)) +* **internal:** codegen related update ([2d8c2f4](https://github.com/gorakhnathy7/hs-mcp/commit/2d8c2f4a2e49baa2cc793b2ee01089971a775241)) +* **internal:** codegen related update ([247a7c8](https://github.com/gorakhnathy7/hs-mcp/commit/247a7c81d0ed517450132ac5bb42a7c0865b1d1c)) +* **internal:** codegen related update ([e0977be](https://github.com/gorakhnathy7/hs-mcp/commit/e0977bea956db2822da1a4fa1585273e1bd99e77)) +* **internal:** codegen related update ([1eba97c](https://github.com/gorakhnathy7/hs-mcp/commit/1eba97c82c9501f1be5d958502e9d069bb99cc0a)) +* **internal:** formatting change ([019bda1](https://github.com/gorakhnathy7/hs-mcp/commit/019bda15e6c9cb65b27081ea17832deccb08d0f1)) +* **internal:** make mcp-server publishing public by defaut ([c61ae9b](https://github.com/gorakhnathy7/hs-mcp/commit/c61ae9b0861a98460adcb0b0e0f926d9c38aff0d)) +* **internal:** move publish config ([fa09aca](https://github.com/gorakhnathy7/hs-mcp/commit/fa09aca8fab54a0bcd7cf5ccbdc10bf40913ff01)) +* **internal:** refactor array check ([ce949f6](https://github.com/gorakhnathy7/hs-mcp/commit/ce949f6cad7f4226d9742e6b7d71463a18814083)) +* **internal:** remove redundant imports config ([a1e0b4a](https://github.com/gorakhnathy7/hs-mcp/commit/a1e0b4a0cccd7fd08cf779e0a889a4a5ece9201c)) +* **internal:** update comment in script ([9753a3d](https://github.com/gorakhnathy7/hs-mcp/commit/9753a3d0305ae850c5f89449e4a66e34545818a6)) +* **internal:** update global Error reference ([b17a4e5](https://github.com/gorakhnathy7/hs-mcp/commit/b17a4e526619f0f359673e4e337f75de862ecb30)) +* make some internal functions async ([a4cd427](https://github.com/gorakhnathy7/hs-mcp/commit/a4cd42713bbe37d5c2b1441359676a5cb2dd50c2)) +* **mcp:** add cors to oauth metadata route ([b34d42b](https://github.com/gorakhnathy7/hs-mcp/commit/b34d42bad22fb1dc838bd3aa08e57a47162a3d6d)) +* **mcp:** document remote server in README.md ([23045e5](https://github.com/gorakhnathy7/hs-mcp/commit/23045e5f3a564d3daa3b1256636a6b7395de0ed0)) +* **mcp:** formatting ([60e25ff](https://github.com/gorakhnathy7/hs-mcp/commit/60e25ff32e3fa9efd1f8eec0358d04119c6b031f)) +* **mcp:** minor cleanup of types and package.json ([83fdd3e](https://github.com/gorakhnathy7/hs-mcp/commit/83fdd3e24c87d99e52db624917a1dd85d5fd5952)) +* **mcp:** refactor streamable http transport ([7ea0e98](https://github.com/gorakhnathy7/hs-mcp/commit/7ea0e9801d973e095c1aad8115ba01aa0b73bdce)) +* **mcp:** rework imports in tools ([39f8847](https://github.com/gorakhnathy7/hs-mcp/commit/39f8847d28feb43481d28cd454f3d6d470fbfbc6)) +* **mcp:** update package.json ([a6a6b0c](https://github.com/gorakhnathy7/hs-mcp/commit/a6a6b0c2f1fc9f56fe40173ad3f8b4914149927f)) +* **mcp:** update README ([8cda3b4](https://github.com/gorakhnathy7/hs-mcp/commit/8cda3b47c7257a21fc81209d3a99458885d36ac5)) +* **mcp:** update types ([1d02aa6](https://github.com/gorakhnathy7/hs-mcp/commit/1d02aa64c1b9fdd69668ed0618b2e9f9ed580de8)) +* **ts:** reorder package.json imports ([bb5d6c1](https://github.com/gorakhnathy7/hs-mcp/commit/bb5d6c1a9a216f6bb9c0b80d4e1636ce359e10d6)) +* update @stainless-api/prism-cli to v5.15.0 ([f7386b8](https://github.com/gorakhnathy7/hs-mcp/commit/f7386b839fd22de3b3da4103f96dbdd98caa5cd3)) +* update CI script ([9e50c83](https://github.com/gorakhnathy7/hs-mcp/commit/9e50c83d0f409cf619ea703a08b411aa36e46a97)) + ## 0.0.1-alpha.1 (2025-07-01) Full Changelog: [v0.0.1-alpha.0...v0.0.1-alpha.1](https://github.com/gorakhnathy7/hs-mcp/compare/v0.0.1-alpha.0...v0.0.1-alpha.1) diff --git a/package.json b/package.json index dab5117..341430a 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "hyperswitch", - "version": "0.0.1-alpha.1", + "version": "0.1.0-alpha.1", "description": "The official TypeScript library for the Hyperswitch API", "author": "Hyperswitch ", "types": "dist/index.d.ts", diff --git a/packages/mcp-server/package.json b/packages/mcp-server/package.json index 772a452..22a89ed 100644 --- a/packages/mcp-server/package.json +++ b/packages/mcp-server/package.json @@ -1,6 +1,6 @@ { "name": "hyperswitch-mcp", - "version": "0.0.1-alpha.1", + "version": "0.1.0-alpha.1", "description": "The official MCP Server for the Hyperswitch API", "author": "Hyperswitch ", "types": "dist/index.d.ts", diff --git a/packages/mcp-server/src/server.ts b/packages/mcp-server/src/server.ts index bc47342..5eb6080 100644 --- a/packages/mcp-server/src/server.ts +++ b/packages/mcp-server/src/server.ts @@ -32,7 +32,7 @@ export const newMcpServer = () => new McpServer( { name: 'hyperswitch_api', - version: '0.0.1-alpha.1', + version: '0.1.0-alpha.1', }, { capabilities: { tools: {}, logging: {} } }, ); diff --git a/src/version.ts b/src/version.ts index 2c77b51..b0bfd9e 100644 --- a/src/version.ts +++ b/src/version.ts @@ -1 +1 @@ -export const VERSION = '0.0.1-alpha.1'; // x-release-please-version +export const VERSION = '0.1.0-alpha.1'; // x-release-please-version