@inkeep/agents-sdk 0.0.0-dev-20251022190909 → 0.0.0-dev-20251022211302

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.cjs CHANGED
@@ -2756,6 +2756,29 @@ var Tool = class {
2756
2756
  }
2757
2757
  throw new Error(`Failed to update tool: ${updateResponse.status}`);
2758
2758
  }
2759
+ /**
2760
+ * Creates a new AgentMcpConfig with the given configuration.
2761
+ *
2762
+ * @param config - The configuration for the AgentMcpConfig
2763
+ * @returns A new AgentMcpConfig
2764
+ *
2765
+ * example:
2766
+ * ```typescript
2767
+ * const tool = new Tool({
2768
+ * id: 'tool-id',
2769
+ * name: 'Tool Name',
2770
+ * serverUrl: 'https://example.com/mcp',
2771
+ * });
2772
+ * const agentMcpConfig = tool.with({ selectedTools: ['tool-1', 'tool-2'], headers: { 'Authorization': 'Bearer token' } });
2773
+ * ```
2774
+ */
2775
+ with(config) {
2776
+ return {
2777
+ server: this,
2778
+ selectedTools: config.selectedTools,
2779
+ headers: config.headers
2780
+ };
2781
+ }
2759
2782
  };
2760
2783
 
2761
2784
  // src/utils/tool-normalization.ts
package/dist/index.d.cts CHANGED
@@ -40,6 +40,7 @@ interface ToolInterface {
40
40
  getServerUrl(): string;
41
41
  getActiveTools(): string[] | undefined;
42
42
  getCredentialReferenceId(): string | null | undefined;
43
+ with(config: AgentMcpConfigInput): AgentMcpConfig;
43
44
  }
44
45
  declare class Tool implements ToolInterface {
45
46
  config: MCPToolConfig$1;
@@ -59,6 +60,23 @@ declare class Tool implements ToolInterface {
59
60
  skipDatabaseRegistration?: boolean;
60
61
  }): Promise<void>;
61
62
  private upsertTool;
63
+ /**
64
+ * Creates a new AgentMcpConfig with the given configuration.
65
+ *
66
+ * @param config - The configuration for the AgentMcpConfig
67
+ * @returns A new AgentMcpConfig
68
+ *
69
+ * example:
70
+ * ```typescript
71
+ * const tool = new Tool({
72
+ * id: 'tool-id',
73
+ * name: 'Tool Name',
74
+ * serverUrl: 'https://example.com/mcp',
75
+ * });
76
+ * const agentMcpConfig = tool.with({ selectedTools: ['tool-1', 'tool-2'], headers: { 'Authorization': 'Bearer token' } });
77
+ * ```
78
+ */
79
+ with(config: AgentMcpConfigInput): AgentMcpConfig;
62
80
  }
63
81
 
64
82
  declare class SubAgent implements SubAgentInterface {
@@ -149,6 +167,15 @@ type AgentMcpConfig = {
149
167
  selectedTools?: string[];
150
168
  headers?: Record<string, string>;
151
169
  };
170
+ /**
171
+ * Input configuration for MCP tool customization
172
+ */
173
+ type AgentMcpConfigInput = {
174
+ /** Specific tools to enable from the MCP server */
175
+ selectedTools?: string[];
176
+ /** Custom headers for MCP server requests */
177
+ headers?: Record<string, string>;
178
+ };
152
179
  /**
153
180
  * Creates a transfer configuration for agent transfers.
154
181
  *
@@ -1187,6 +1214,14 @@ declare function dataComponent(config: DataComponentConfig): DataComponent;
1187
1214
  * ```
1188
1215
  */
1189
1216
  declare function statusComponent(config: StatusComponentConfig): StatusComponent;
1217
+ /**
1218
+ * (deprecated in favor of mcpTool.with()) Creates an agent MCP configuration.
1219
+ *
1220
+ * Agent MCP configurations are used to configure the MCP server for an agent.
1221
+ *
1222
+ * @param config - Agent MCP configuration
1223
+ * @returns An AgentMcpConfig instance
1224
+ */
1190
1225
  declare function agentMcp(config: AgentMcpConfig): AgentMcpConfig;
1191
1226
  /**
1192
1227
  * Creates a function tool that executes user-defined code in a sandboxed environment.
package/dist/index.d.ts CHANGED
@@ -40,6 +40,7 @@ interface ToolInterface {
40
40
  getServerUrl(): string;
41
41
  getActiveTools(): string[] | undefined;
42
42
  getCredentialReferenceId(): string | null | undefined;
43
+ with(config: AgentMcpConfigInput): AgentMcpConfig;
43
44
  }
44
45
  declare class Tool implements ToolInterface {
45
46
  config: MCPToolConfig$1;
@@ -59,6 +60,23 @@ declare class Tool implements ToolInterface {
59
60
  skipDatabaseRegistration?: boolean;
60
61
  }): Promise<void>;
61
62
  private upsertTool;
63
+ /**
64
+ * Creates a new AgentMcpConfig with the given configuration.
65
+ *
66
+ * @param config - The configuration for the AgentMcpConfig
67
+ * @returns A new AgentMcpConfig
68
+ *
69
+ * example:
70
+ * ```typescript
71
+ * const tool = new Tool({
72
+ * id: 'tool-id',
73
+ * name: 'Tool Name',
74
+ * serverUrl: 'https://example.com/mcp',
75
+ * });
76
+ * const agentMcpConfig = tool.with({ selectedTools: ['tool-1', 'tool-2'], headers: { 'Authorization': 'Bearer token' } });
77
+ * ```
78
+ */
79
+ with(config: AgentMcpConfigInput): AgentMcpConfig;
62
80
  }
63
81
 
64
82
  declare class SubAgent implements SubAgentInterface {
@@ -149,6 +167,15 @@ type AgentMcpConfig = {
149
167
  selectedTools?: string[];
150
168
  headers?: Record<string, string>;
151
169
  };
170
+ /**
171
+ * Input configuration for MCP tool customization
172
+ */
173
+ type AgentMcpConfigInput = {
174
+ /** Specific tools to enable from the MCP server */
175
+ selectedTools?: string[];
176
+ /** Custom headers for MCP server requests */
177
+ headers?: Record<string, string>;
178
+ };
152
179
  /**
153
180
  * Creates a transfer configuration for agent transfers.
154
181
  *
@@ -1187,6 +1214,14 @@ declare function dataComponent(config: DataComponentConfig): DataComponent;
1187
1214
  * ```
1188
1215
  */
1189
1216
  declare function statusComponent(config: StatusComponentConfig): StatusComponent;
1217
+ /**
1218
+ * (deprecated in favor of mcpTool.with()) Creates an agent MCP configuration.
1219
+ *
1220
+ * Agent MCP configurations are used to configure the MCP server for an agent.
1221
+ *
1222
+ * @param config - Agent MCP configuration
1223
+ * @returns An AgentMcpConfig instance
1224
+ */
1190
1225
  declare function agentMcp(config: AgentMcpConfig): AgentMcpConfig;
1191
1226
  /**
1192
1227
  * Creates a function tool that executes user-defined code in a sandboxed environment.
package/dist/index.js CHANGED
@@ -2729,6 +2729,29 @@ var Tool = class {
2729
2729
  }
2730
2730
  throw new Error(`Failed to update tool: ${updateResponse.status}`);
2731
2731
  }
2732
+ /**
2733
+ * Creates a new AgentMcpConfig with the given configuration.
2734
+ *
2735
+ * @param config - The configuration for the AgentMcpConfig
2736
+ * @returns A new AgentMcpConfig
2737
+ *
2738
+ * example:
2739
+ * ```typescript
2740
+ * const tool = new Tool({
2741
+ * id: 'tool-id',
2742
+ * name: 'Tool Name',
2743
+ * serverUrl: 'https://example.com/mcp',
2744
+ * });
2745
+ * const agentMcpConfig = tool.with({ selectedTools: ['tool-1', 'tool-2'], headers: { 'Authorization': 'Bearer token' } });
2746
+ * ```
2747
+ */
2748
+ with(config) {
2749
+ return {
2750
+ server: this,
2751
+ selectedTools: config.selectedTools,
2752
+ headers: config.headers
2753
+ };
2754
+ }
2732
2755
  };
2733
2756
 
2734
2757
  // src/utils/tool-normalization.ts
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@inkeep/agents-sdk",
3
- "version": "0.0.0-dev-20251022190909",
3
+ "version": "0.0.0-dev-20251022211302",
4
4
  "description": "Agents SDK for building and managing agents in the Inkeep Agent Framework",
5
5
  "main": "dist/index.js",
6
6
  "type": "module",
@@ -12,7 +12,7 @@
12
12
  "nanoid": "^5.1.5",
13
13
  "typescript": "^5.3.3",
14
14
  "zod": "^4.1.11",
15
- "@inkeep/agents-core": "^0.0.0-dev-20251022190909"
15
+ "@inkeep/agents-core": "^0.0.0-dev-20251022211302"
16
16
  },
17
17
  "devDependencies": {
18
18
  "@types/js-yaml": "^4.0.9",