@superblocksteam/sdk-api 2.0.170-next.1 → 2.0.171-next.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (49) hide show
  1. package/README.md +1 -0
  2. package/dist/index.d.ts +3 -1
  3. package/dist/index.d.ts.map +1 -1
  4. package/dist/index.js +2 -1
  5. package/dist/index.js.map +1 -1
  6. package/dist/integrations/base/request-body.d.ts +1 -0
  7. package/dist/integrations/base/request-body.d.ts.map +1 -1
  8. package/dist/integrations/base/request-body.js +4 -4
  9. package/dist/integrations/base/request-body.js.map +1 -1
  10. package/dist/integrations/declarations.d.ts +10 -0
  11. package/dist/integrations/declarations.d.ts.map +1 -1
  12. package/dist/integrations/declarations.js +9 -0
  13. package/dist/integrations/declarations.js.map +1 -1
  14. package/dist/integrations/index.d.ts +3 -1
  15. package/dist/integrations/index.d.ts.map +1 -1
  16. package/dist/integrations/index.js +2 -1
  17. package/dist/integrations/index.js.map +1 -1
  18. package/dist/integrations/mcpintegration/client.d.ts +71 -0
  19. package/dist/integrations/mcpintegration/client.d.ts.map +1 -0
  20. package/dist/integrations/mcpintegration/client.js +353 -0
  21. package/dist/integrations/mcpintegration/client.js.map +1 -0
  22. package/dist/integrations/mcpintegration/client.test.d.ts +17 -0
  23. package/dist/integrations/mcpintegration/client.test.d.ts.map +1 -0
  24. package/dist/integrations/mcpintegration/client.test.js +432 -0
  25. package/dist/integrations/mcpintegration/client.test.js.map +1 -0
  26. package/dist/integrations/mcpintegration/index.d.ts +8 -0
  27. package/dist/integrations/mcpintegration/index.d.ts.map +1 -0
  28. package/dist/integrations/mcpintegration/index.js +7 -0
  29. package/dist/integrations/mcpintegration/index.js.map +1 -0
  30. package/dist/integrations/mcpintegration/types.d.ts +164 -0
  31. package/dist/integrations/mcpintegration/types.d.ts.map +1 -0
  32. package/dist/integrations/mcpintegration/types.js +9 -0
  33. package/dist/integrations/mcpintegration/types.js.map +1 -0
  34. package/dist/integrations/registry.d.ts +1 -0
  35. package/dist/integrations/registry.d.ts.map +1 -1
  36. package/dist/integrations/registry.js +5 -0
  37. package/dist/integrations/registry.js.map +1 -1
  38. package/package.json +3 -3
  39. package/src/index.ts +12 -0
  40. package/src/integrations/base/request-body.ts +7 -4
  41. package/src/integrations/declarations.ts +16 -0
  42. package/src/integrations/index.ts +14 -0
  43. package/src/integrations/mcpintegration/README.md +149 -0
  44. package/src/integrations/mcpintegration/client.test.ts +588 -0
  45. package/src/integrations/mcpintegration/client.ts +544 -0
  46. package/src/integrations/mcpintegration/docs.manifest.json +5 -0
  47. package/src/integrations/mcpintegration/index.ts +16 -0
  48. package/src/integrations/mcpintegration/types.ts +185 -0
  49. package/src/integrations/registry.ts +6 -0
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/integrations/mcpintegration/types.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAE7B,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,gBAAgB,CAAC;AAE5D;;;;;GAKG;AACH,MAAM,WAAW,eAAe;IAC9B,IAAI,EAAE,MAAM,CAAC;IACb,gCAAgC;IAChC,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;CACxB;AAED;;GAEG;AACH,MAAM,WAAW,cAAc;IAC7B,kCAAkC;IAClC,OAAO,EAAE,eAAe,EAAE,CAAC;IAC3B,0EAA0E;IAC1E,iBAAiB,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAC5C,+EAA+E;IAC/E,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,KAAK,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CACjC;AAED;;GAEG;AACH,MAAM,WAAW,eAAe;IAC9B,KAAK,CAAC,EAAE,MAAM,CAAC;IAC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IAAI,EAAE,MAAM,EACZ,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,SAAS,EACzC,OAAO,EAAE,kBAAkB,CAAC,CAAC,CAAC,GAAG;QAAE,MAAM,EAAE,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,CAAA;KAAE,GAC1D,OAAO,CAAC,CAAC,CAAC,CAAC;IAEd;;;;;;;;;;;OAWG;IACH,QAAQ,CACN,IAAI,EAAE,MAAM,EACZ,IAAI,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAC9B,OAAO,CAAC,EAAE,iBAAiB,GAC1B,OAAO,CAAC,cAAc,CAAC,CAAC;IAE3B;;;OAGG;IACH,QAAQ,CAAC,CAAC,EACR,IAAI,EAAE,MAAM,EACZ,IAAI,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAC9B,OAAO,CAAC,EAAE,kBAAkB,CAAC,CAAC,CAAC,GAC9B,OAAO,CAAC,cAAc,GAAG,CAAC,CAAC,CAAC;IAE/B;;;;;;;;;OASG;IACH,SAAS,CAAC,OAAO,CAAC,EAAE,iBAAiB,GAAG,OAAO,CAAC,IAAI,EAAE,CAAC,CAAC;CACzD"}
@@ -0,0 +1,9 @@
1
+ /**
2
+ * MCP Server client types.
3
+ *
4
+ * An MCP Server integration points at a remote Model Context Protocol server.
5
+ * The client exposes the tools surface of that server: list the tools it
6
+ * advertises and call one of them. Resources and prompts are not exposed yet.
7
+ */
8
+ export {};
9
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/integrations/mcpintegration/types.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG"}
@@ -68,6 +68,7 @@ export declare const SUPPORTED_PLUGINS: {
68
68
  readonly lakebase: "lakebase";
69
69
  readonly snowflakepostgres: "snowflakepostgres";
70
70
  readonly smtp: "smtp";
71
+ readonly mcpintegration: "mcpintegration";
71
72
  readonly restapiintegration: "restapiintegration";
72
73
  };
73
74
  export type SupportedPluginId = (typeof SUPPORTED_PLUGINS)[keyof typeof SUPPORTED_PLUGINS];
@@ -1 +1 @@
1
- {"version":3,"file":"registry.d.ts","sourceRoot":"","sources":["../../src/integrations/registry.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAuCH,OAAO,KAAK,EAAE,iBAAiB,EAAE,qBAAqB,EAAE,MAAM,YAAY,CAAC;AA4B3E;;GAEG;AACH,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAkEpB,CAAC;AAEX,MAAM,MAAM,iBAAiB,GAC3B,CAAC,OAAO,iBAAiB,CAAC,CAAC,MAAM,OAAO,iBAAiB,CAAC,CAAC;AAE7D;;;GAGG;AACH,eAAO,MAAM,oBAAoB,EAE5B,iBAAiB,EAAE,CAAC;AAEzB;;;;;;;;;;GAUG;AACH,MAAM,WAAW,aAAa;IAC5B,6EAA6E;IAC7E,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,yDAAyD;IACzD,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED;;;;;;;;;;GAUG;AACH,MAAM,MAAM,aAAa,GAAG,CAC1B,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAChC,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAClC,QAAQ,CAAC,EAAE,aAAa,KACrB,OAAO,CAAC,OAAO,CAAC,CAAC;AAEtB;;GAEG;AACH,MAAM,WAAW,mBAAmB;IAClC,sDAAsD;IACtD,MAAM,EAAE,iBAAiB,CAAC;IAE1B,qEAAqE;IACrE,YAAY,EAAE,aAAa,CAAC;CAC7B;AAED;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,wBAAgB,YAAY,CAC1B,OAAO,EAAE,mBAAmB,GAC3B,qBAAqB,CAgMvB;AAED;;;;;GAKG;AACH,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,MAAM,GACf,QAAQ,IAAI,iBAAiB,CAI/B"}
@@ -27,6 +27,7 @@ import { HubSpotClientImpl } from "./hubspot/index.js";
27
27
  import { IntercomClientImpl } from "./intercom/index.js";
28
28
  import { JiraClientImpl } from "./jira/index.js";
29
29
  import { LaunchDarklyClientImpl } from "./launchdarkly/index.js";
30
+ import { McpClientImpl } from "./mcpintegration/index.js";
30
31
  import { MistralClientImpl } from "./mistral/index.js";
31
32
  import { NotionClientImpl } from "./notion/index.js";
32
33
  import { OpenAIClientImpl } from "./openai_v2/index.js";
@@ -134,6 +135,8 @@ export const SUPPORTED_PLUGINS = {
134
135
  snowflakepostgres: "snowflakepostgres",
135
136
  // Email
136
137
  smtp: "smtp",
138
+ // MCP servers
139
+ mcpintegration: "mcpintegration",
137
140
  // REST API plugins
138
141
  restapiintegration: "restapiintegration",
139
142
  };
@@ -288,6 +291,8 @@ export function createClient(options) {
288
291
  return new SnowflakePostgresClientImpl(config, executeQuery);
289
292
  case SUPPORTED_PLUGINS.smtp:
290
293
  return new SmtpClientImpl(config, executeQuery);
294
+ case SUPPORTED_PLUGINS.mcpintegration:
295
+ return new McpClientImpl(config, executeQuery);
291
296
  case SUPPORTED_PLUGINS.restapiintegration:
292
297
  return new RestApiIntegrationPluginClientImpl(config, executeQuery);
293
298
  default:
@@ -1 +1 @@
1
- {"version":3,"file":"registry.js","sourceRoot":"","sources":["../../src/integrations/registry.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,kBAAkB,EAAE,MAAM,qBAAqB,CAAC;AACzD,OAAO,EAAE,mBAAmB,EAAE,MAAM,sBAAsB,CAAC;AAC3D,OAAO,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AACnD,OAAO,EAAE,mBAAmB,EAAE,MAAM,sBAAsB,CAAC;AAC3D,OAAO,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAC/C,OAAO,EAAE,kBAAkB,EAAE,MAAM,qBAAqB,CAAC;AACzD,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AY,CAAC,CAAC;QAEtE;YACE,MAAM,IAAI,KAAK,CACb,uBAAuB,MAAM,CAAC,QAAQ,IAAI;gBACxC,sBAAsB,MAAM,CAAC,MAAM,CAAC,iBAAiB,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CACtE,CAAC;IACN,CAAC;AACH,CAAC;AAED;;;;;GAKG;AACH,MAAM,UAAU,iBAAiB,CAC/B,QAAgB;IAEhB,OAAO,MAAM,CAAC,MAAM,CAAC,iBAAiB,CAAC,CAAC,QAAQ,CAC9C,QAA6B,CAC9B,CAAC;AACJ,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@superblocksteam/sdk-api",
3
- "version": "2.0.170-next.1",
3
+ "version": "2.0.171-next.0",
4
4
  "description": "Superblocks SDK for TypeScript-based API definitions",
5
5
  "license": "Superblocks Community Software License",
6
6
  "files": [
@@ -16,13 +16,13 @@
16
16
  "registry": "https://registry.npmjs.org"
17
17
  },
18
18
  "dependencies": {
19
- "@superblocksteam/types": "1.351.0",
19
+ "@superblocksteam/types": "1.771.0",
20
20
  "zod": "^3.23.8"
21
21
  },
22
22
  "devDependencies": {
23
23
  "@bufbuild/protobuf": "1.3.0",
24
24
  "@eslint/js": "^9.39.1",
25
- "@superblocksteam/shared": "0.9617.8",
25
+ "@superblocksteam/shared": "0.9618.0",
26
26
  "@types/node": "^20",
27
27
  "dotenv": "^16.4.5",
28
28
  "eslint": "^9.39.1",
package/src/index.ts CHANGED
@@ -143,6 +143,7 @@ export {
143
143
  lakebase,
144
144
  snowflakePostgres,
145
145
  smtp,
146
+ mcpIntegration,
146
147
  // Types for advanced use
147
148
  type IntegrationDeclaration,
148
149
  type PostgresRef,
@@ -205,6 +206,7 @@ export {
205
206
  type LakebaseRef,
206
207
  type SnowflakePostgresRef,
207
208
  type SmtpRef,
209
+ type McpIntegrationRef,
208
210
  } from "./integrations/index.js";
209
211
 
210
212
  // Integration client types (for advanced use cases)
@@ -267,6 +269,15 @@ export type { RestApiIntegrationPluginClient } from "./integrations/restapiinteg
267
269
  export type { LakebaseClient } from "./integrations/lakebase/index.js";
268
270
  export type { SnowflakePostgresClient } from "./integrations/snowflakepostgres/index.js";
269
271
  export type { SmtpClient, SmtpSendOptions } from "./integrations/smtp/index.js";
272
+ export type {
273
+ McpClient,
274
+ McpCallToolOptions,
275
+ McpRequestOptions,
276
+ CallToolResult,
277
+ McpContentBlock,
278
+ Tool,
279
+ ToolAnnotations,
280
+ } from "./integrations/mcpintegration/index.js";
270
281
 
271
282
  // Runtime (for orchestrator use)
272
283
  export {
@@ -321,3 +332,4 @@ export {
321
332
  QueryValidationError,
322
333
  CodeExecutionError,
323
334
  } from "./errors.js";
335
+ export { McpToolUnavailableError } from "./integrations/mcpintegration/index.js";
@@ -80,17 +80,20 @@ export function encodeRequestBody(input: {
80
80
  // throwing toJSON()/getter contributes an arbitrary caller-authored string.
81
81
  // Every other message in this module goes through describeOptionValue's
82
82
  // bounded conventions; classify the failure instead of echoing its text.
83
- function describeJsonSerializationFailure(error: unknown): string {
83
+ export function describeJsonSerializationFailure(
84
+ error: unknown,
85
+ subject = "the body",
86
+ ): string {
84
87
  if (
85
88
  error instanceof TypeError &&
86
89
  /circular (structure|reference)/i.test(error.message)
87
90
  ) {
88
- return "the body contains a circular reference";
91
+ return `${subject} contains a circular reference`;
89
92
  }
90
93
  if (error instanceof TypeError && /BigInt/i.test(error.message)) {
91
- return "the body contains a BigInt value";
94
+ return `${subject} contains a BigInt value`;
92
95
  }
93
- return "a nested value's toJSON, toString, or getter threw while serializing the body";
96
+ return `a nested value's toJSON, toString, or getter threw while serializing ${subject}`;
94
97
  }
95
98
 
96
99
  function encodeJsonBody(body: unknown): RequestBodyWireFields {
@@ -64,6 +64,7 @@ import type { JiraClient } from "./jira/index.js";
64
64
  import type { LakebaseClient } from "./lakebase/index.js";
65
65
  import type { LaunchDarklyClient } from "./launchdarkly/index.js";
66
66
  import type { MariaDBClient } from "./mariadb/index.js";
67
+ import type { McpClient } from "./mcpintegration/index.js";
67
68
  import type { MistralClient } from "./mistral/index.js";
68
69
  import type { MongoDBClient } from "./mongodb/index.js";
69
70
  import type { MSSQLClient } from "./mssql/index.js";
@@ -338,6 +339,9 @@ export type SnowflakePostgresRef = IntegrationRef<
338
339
  /** Reference to an SMTP integration */
339
340
  export type SmtpRef = IntegrationRef<"smtp", SmtpClient>;
340
341
 
342
+ /** Reference to an MCP Server integration */
343
+ export type McpIntegrationRef = IntegrationRef<"mcpintegration", McpClient>;
344
+
341
345
  /** Reference to a REST API Integration */
342
346
  export type RestApiIntegrationRef = IntegrationRef<
343
347
  "restapiintegration",
@@ -1039,6 +1043,18 @@ export function smtp<T extends string>(id: LiteralString<T>): SmtpRef {
1039
1043
  return createRef<"smtp", SmtpClient, T>("smtp", id);
1040
1044
  }
1041
1045
 
1046
+ /**
1047
+ * Declare an MCP Server integration.
1048
+ *
1049
+ * @param id - The integration ID (UUID)
1050
+ * @returns An integration reference for use in the API config
1051
+ */
1052
+ export function mcpIntegration<T extends string>(
1053
+ id: LiteralString<T>,
1054
+ ): McpIntegrationRef {
1055
+ return createRef<"mcpintegration", McpClient, T>("mcpintegration", id);
1056
+ }
1057
+
1042
1058
  /**
1043
1059
  * Declare a REST API Integration.
1044
1060
  *
@@ -74,6 +74,7 @@ export {
74
74
  lakebase,
75
75
  snowflakePostgres,
76
76
  smtp,
77
+ mcpIntegration,
77
78
  restApiIntegration,
78
79
  // Utility functions
79
80
  extractIntegrationDeclarations,
@@ -144,6 +145,7 @@ export {
144
145
  type LakebaseRef,
145
146
  type SnowflakePostgresRef,
146
147
  type SmtpRef,
148
+ type McpIntegrationRef,
147
149
  type RestApiIntegrationRef,
148
150
  } from "./declarations.js";
149
151
 
@@ -421,6 +423,18 @@ export { SnowflakePostgresClientImpl } from "./snowflakepostgres/index.js";
421
423
  export type { SmtpClient, SmtpSendOptions } from "./smtp/index.js";
422
424
  export { SmtpClientImpl } from "./smtp/index.js";
423
425
 
426
+ // MCP Server client
427
+ export type {
428
+ McpClient,
429
+ McpCallToolOptions,
430
+ McpRequestOptions,
431
+ CallToolResult,
432
+ McpContentBlock,
433
+ Tool,
434
+ ToolAnnotations,
435
+ } from "./mcpintegration/index.js";
436
+ export { McpClientImpl } from "./mcpintegration/index.js";
437
+
424
438
  // REST API Integration client
425
439
  export type { RestApiIntegrationPluginClient } from "./restapiintegration/index.js";
426
440
  export { RestApiIntegrationPluginClientImpl } from "./restapiintegration/index.js";
@@ -0,0 +1,149 @@
1
+ # MCP Server Client
2
+
3
+ Call tools on a remote Model Context Protocol (MCP) server through an MCP Server integration. The worker plugin runs the MCP handshake and session for every call; the SDK shapes the request and interprets the result.
4
+
5
+ ## Methods
6
+
7
+ | Method | Description |
8
+ | --------------------------------- | --------------------------------------------------------------------------------------------- |
9
+ | `callTool(name, args?, options?)` | Call a tool. Returns the raw `CallToolResult`, or the validated value when `schema` is given |
10
+ | `listTools(options?)` | Return every tool the server advertises, following `nextCursor` until the catalog is complete |
11
+
12
+ Both methods accept `options.label` (shown in the Trace View) and `options.headers` (extra HTTP headers for that one request).
13
+
14
+ ## Usage
15
+
16
+ ### Call a tool and validate the result
17
+
18
+ ```typescript
19
+ import { api, z, mcpIntegration } from "@superblocksteam/sdk-api";
20
+
21
+ // Integration ID from the integrations panel
22
+ const GITHUB_MCP = "a1b2c3d4-5678-90ab-cdef-111111111111";
23
+
24
+ const IssueSchema = z.object({
25
+ number: z.number(),
26
+ title: z.string(),
27
+ state: z.string(),
28
+ });
29
+
30
+ export default api({
31
+ name: "SearchIssues",
32
+ integrations: {
33
+ github: mcpIntegration(GITHUB_MCP),
34
+ },
35
+ input: z.object({
36
+ query: z.string(),
37
+ }),
38
+ output: z.object({
39
+ issues: z.array(IssueSchema),
40
+ }),
41
+ async run(ctx, { query }) {
42
+ const result = await ctx.integrations.github.callTool(
43
+ "search_issues",
44
+ { query },
45
+ {
46
+ schema: z.object({ items: z.array(IssueSchema) }),
47
+ label: "Search open issues",
48
+ },
49
+ );
50
+
51
+ return { issues: result.items };
52
+ },
53
+ });
54
+ ```
55
+
56
+ When `schema` is given, the value validated is `structuredContent` if the server returns an object, otherwise the first `text` content block. Text that is JSON is validated as the parsed value first and as the raw string second, so `z.object(...)` works for JSON output and `z.string()` still accepts text such as `12345` or `true` as a string. Text that is not JSON is validated as a plain string. Only the first text block is used; tools that return several blocks should expose `structuredContent` or be read through the raw result.
57
+
58
+ The options always go in the third argument. A call like `callTool("x", { schema })` would otherwise ship the schema to the server as tool arguments, so the client rejects a Zod schema found inside `args` with a `TypeError`.
59
+
60
+ ### Call a tool and read the raw result
61
+
62
+ ```typescript
63
+ const result = await ctx.integrations.github.callTool("get_me");
64
+
65
+ // result: { content: [{ type: "text", text: "..." }], structuredContent?, isError? }
66
+ const text = result.content
67
+ .filter((block) => block.type === "text")
68
+ .map((block) => block.text)
69
+ .join("\n");
70
+ ```
71
+
72
+ ### List the server's tools
73
+
74
+ ```typescript
75
+ const tools = await ctx.integrations.github.listTools();
76
+
77
+ for (const tool of tools) {
78
+ console.log(tool.name, tool.description, tool.inputSchema);
79
+ }
80
+ ```
81
+
82
+ `listTools()` pages through `tools/list` until the server stops returning `nextCursor`. It throws an `IntegrationError` if a cursor repeats or the catalog does not finish within 50 pages.
83
+
84
+ ### Tools depend on the user
85
+
86
+ The server decides which tools a user can call, from that user's credentials. The catalog seen while building the app is the builder's; an end user may have fewer tools.
87
+
88
+ - Before showing a feature that needs a specific tool, call `listTools()` at runtime and show a "not available for your account" state when the tool is missing.
89
+ - Still catch `McpToolUnavailableError` on `callTool`: the catalog can change after `listTools()`. It covers a tool the server rejects as unknown; a tool the server lists but refuses for missing permissions throws a plain `IntegrationError`.
90
+ - In a view that combines several tools, a missing tool hides its own panel, not the whole page.
91
+ - Results belong to the user who made the call. Cache `listTools()` and tool results per user only, never across users.
92
+
93
+ ```typescript
94
+ import { McpToolUnavailableError } from "@superblocksteam/sdk-api";
95
+
96
+ try {
97
+ return await ctx.integrations.github.callTool("list_pull_requests", {
98
+ state: "open",
99
+ });
100
+ } catch (error) {
101
+ if (error instanceof McpToolUnavailableError) {
102
+ return { unavailable: true };
103
+ }
104
+ throw error;
105
+ }
106
+ ```
107
+
108
+ ### Choosing and calling tools
109
+
110
+ - Treat the integration like a REST API: call any tool the builder asks for, including tools that write.
111
+ - Pick tools by name and description. Gateway servers namespace their tools, for example `jira_search` or `salesforce_query`.
112
+ - Agent tools take a natural-language prompt and return markdown. Render the markdown and show a loading state, because the response arrives only when the tool finishes.
113
+ - For chat apps, make one call per message, pass the history in, and keep the history in app storage.
114
+ - For dashboards, call independent tools in parallel and show partial results when one source fails.
115
+ - For search tools, keep the source links in the result and use the tool's own pagination arguments.
116
+
117
+ ### Per-request headers
118
+
119
+ ```typescript
120
+ await ctx.integrations.github.callTool(
121
+ "list_repos",
122
+ { owner: "superblocksteam" },
123
+ { headers: { "Mcp-Param-Org": "superblocksteam" } },
124
+ );
125
+ ```
126
+
127
+ Headers passed here are sent in addition to the headers configured on the integration. Authentication headers come from the integration's auth settings; do not pass credentials from API code.
128
+
129
+ ### Sessions
130
+
131
+ Some MCP servers require a handshake and a session (`Mcp-Session-Id`). The worker plugin runs that handshake and returns the session it opened; the client sends it back as headers on every later call made through the same client instance, so a run that calls several tools, or pages through `listTools()`, handshakes once. The plugin's `sessionId` and `protocolVersion` fields are removed from results before they reach API code. A header you pass yourself with the same name wins.
132
+
133
+ ## Errors
134
+
135
+ | Situation | Error thrown |
136
+ | ----------------------------------------------------- | ------------------------------------------------------------------------------- |
137
+ | Server rejects the tool as unknown (see below) | `McpToolUnavailableError` (an `IntegrationError`) with `toolName` |
138
+ | Server returns `isError: true` | `IntegrationError`; `details.cause` has `tool`, `message` and the full `result` |
139
+ | Result does not match `schema` | `RestApiValidationError` with the Zod error and the data |
140
+ | Result has no `structuredContent` and no `text` block | `IntegrationError` (only when a `schema` is given) |
141
+ | A Zod schema is passed inside `args` | `TypeError`, nothing is sent |
142
+ | `tools/list` repeats a cursor or exceeds 50 pages | `IntegrationError` |
143
+ | The plugin or server fails the request | `IntegrationError` wrapping the underlying error |
144
+
145
+ Detection of an unknown tool depends on the server's wording. The client matches `Unknown tool: <name>` and `Tool <name> not found`. Other wording, such as `No such tool: <name>`, throws a plain `IntegrationError`. For an unknown tool in an `isError` result, `details.cause` has the same `tool`, `message` and `result` fields.
146
+
147
+ ## Not supported yet
148
+
149
+ Resources (`resources/list`, `resources/read`) and prompts (`prompts/list`, `prompts/get`) are not exposed by this client.