Skip to content

Commit 7cf3006

Browse files
stainless-app[bot]DannyNemer
authored andcommitted
fix(mcp): avoid sending jq_filter to base API
1 parent ded7ee7 commit 7cf3006

File tree

69 files changed

+187
-137
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

69 files changed

+187
-137
lines changed

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,8 +53,8 @@ export const tool: Tool = {
5353
};
5454

5555
export const handler = async (conductor: Conductor, args: Record<string, unknown> | undefined) => {
56-
const body = args as any;
57-
return asTextContentResult(await maybeFilter(args, await conductor.authSessions.create(body)));
56+
const { jq_filter, ...body } = args as any;
57+
return asTextContentResult(await maybeFilter(jq_filter, await conductor.authSessions.create(body)));
5858
};
5959

6060
export default { metadata, tool, handler };

packages/mcp-server/src/tools/end-users/create-end-users.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,8 @@ export const tool: Tool = {
4848
};
4949

5050
export const handler = async (conductor: Conductor, args: Record<string, unknown> | undefined) => {
51-
const body = args as any;
52-
return asTextContentResult(await maybeFilter(args, await conductor.endUsers.create(body)));
51+
const { jq_filter, ...body } = args as any;
52+
return asTextContentResult(await maybeFilter(jq_filter, await conductor.endUsers.create(body)));
5353
};
5454

5555
export default { metadata, tool, handler };

packages/mcp-server/src/tools/end-users/delete-end-users.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,8 @@ export const tool: Tool = {
4040
};
4141

4242
export const handler = async (conductor: Conductor, args: Record<string, unknown> | undefined) => {
43-
const { id, ...body } = args as any;
44-
return asTextContentResult(await maybeFilter(args, await conductor.endUsers.delete(id)));
43+
const { id, jq_filter, ...body } = args as any;
44+
return asTextContentResult(await maybeFilter(jq_filter, await conductor.endUsers.delete(id)));
4545
};
4646

4747
export default { metadata, tool, handler };

packages/mcp-server/src/tools/end-users/list-end-users.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,8 @@ export const tool: Tool = {
3636
};
3737

3838
export const handler = async (conductor: Conductor, args: Record<string, unknown> | undefined) => {
39-
return asTextContentResult(await maybeFilter(args, await conductor.endUsers.list()));
39+
const { jq_filter } = args as any;
40+
return asTextContentResult(await maybeFilter(jq_filter, await conductor.endUsers.list()));
4041
};
4142

4243
export default { metadata, tool, handler };

packages/mcp-server/src/tools/end-users/passthrough-end-users.ts

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,9 +47,12 @@ export const tool: Tool = {
4747
};
4848

4949
export const handler = async (conductor: Conductor, args: Record<string, unknown> | undefined) => {
50-
const { id, integrationSlug, ...body } = args as any;
50+
const { id, integrationSlug, jq_filter, ...body } = args as any;
5151
return asTextContentResult(
52-
await maybeFilter(args, await conductor.endUsers.passthrough(id, integrationSlug, body['qbd_payload'])),
52+
await maybeFilter(
53+
jq_filter,
54+
await conductor.endUsers.passthrough(id, integrationSlug, body['qbd_payload']),
55+
),
5356
);
5457
};
5558

packages/mcp-server/src/tools/end-users/retrieve-end-users.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,8 @@ export const tool: Tool = {
4040
};
4141

4242
export const handler = async (conductor: Conductor, args: Record<string, unknown> | undefined) => {
43-
const { id, ...body } = args as any;
44-
return asTextContentResult(await maybeFilter(args, await conductor.endUsers.retrieve(id)));
43+
const { id, jq_filter, ...body } = args as any;
44+
return asTextContentResult(await maybeFilter(jq_filter, await conductor.endUsers.retrieve(id)));
4545
};
4646

4747
export default { metadata, tool, handler };

packages/mcp-server/src/tools/qbd/account-tax-lines/list-qbd-account-tax-lines.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,8 @@ export const tool: Tool = {
4141
};
4242

4343
export const handler = async (conductor: Conductor, args: Record<string, unknown> | undefined) => {
44-
const body = args as any;
45-
return asTextContentResult(await maybeFilter(args, await conductor.qbd.accountTaxLines.list(body)));
44+
const { jq_filter, ...body } = args as any;
45+
return asTextContentResult(await maybeFilter(jq_filter, await conductor.qbd.accountTaxLines.list(body)));
4646
};
4747

4848
export default { metadata, tool, handler };

packages/mcp-server/src/tools/qbd/bill-check-payments/delete-qbd-bill-check-payments.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,10 @@ export const tool: Tool = {
4545
};
4646

4747
export const handler = async (conductor: Conductor, args: Record<string, unknown> | undefined) => {
48-
const { id, ...body } = args as any;
49-
return asTextContentResult(await maybeFilter(args, await conductor.qbd.billCheckPayments.delete(id, body)));
48+
const { id, jq_filter, ...body } = args as any;
49+
return asTextContentResult(
50+
await maybeFilter(jq_filter, await conductor.qbd.billCheckPayments.delete(id, body)),
51+
);
5052
};
5153

5254
export default { metadata, tool, handler };

packages/mcp-server/src/tools/qbd/bill-credit-card-payments/delete-qbd-bill-credit-card-payments.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,9 +45,9 @@ export const tool: Tool = {
4545
};
4646

4747
export const handler = async (conductor: Conductor, args: Record<string, unknown> | undefined) => {
48-
const { id, ...body } = args as any;
48+
const { id, jq_filter, ...body } = args as any;
4949
return asTextContentResult(
50-
await maybeFilter(args, await conductor.qbd.billCreditCardPayments.delete(id, body)),
50+
await maybeFilter(jq_filter, await conductor.qbd.billCreditCardPayments.delete(id, body)),
5151
);
5252
};
5353

packages/mcp-server/src/tools/qbd/bills/delete-qbd-bills.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,8 @@ export const tool: Tool = {
4545
};
4646

4747
export const handler = async (conductor: Conductor, args: Record<string, unknown> | undefined) => {
48-
const { id, ...body } = args as any;
49-
return asTextContentResult(await maybeFilter(args, await conductor.qbd.bills.delete(id, body)));
48+
const { id, jq_filter, ...body } = args as any;
49+
return asTextContentResult(await maybeFilter(jq_filter, await conductor.qbd.bills.delete(id, body)));
5050
};
5151

5252
export default { metadata, tool, handler };

0 commit comments

Comments
 (0)