From 893fbc7937700db19c29d50733cee4f95451d990 Mon Sep 17 00:00:00 2001 From: Brian Strauch Date: Tue, 26 May 2026 15:22:33 -0700 Subject: [PATCH] feat: export McpTool from package index McpTool is already a public class in `tools/mcp-tool.ts`, but it isn't re-exported from the package index, so it's unreachable from outside the package: the `exports` field only whitelists `.`, and Node's subpath enforcement blocks any deeper imports. This makes it impossible to subclass McpClient (which is exported) and return McpTool instances from a custom `listTools()`, since the McpTool constructor reference isn't accessible. Surface McpTool alongside the other tool exports (FunctionTool, ZodTool, tool factory) so external code can construct it directly. --- strands-ts/src/index.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/strands-ts/src/index.ts b/strands-ts/src/index.ts index 1108c4fee..a19e418c5 100644 --- a/strands-ts/src/index.ts +++ b/strands-ts/src/index.ts @@ -140,6 +140,9 @@ export type { ZodToolConfig } from './tools/zod-tool.js' // Tool factory function export { tool } from './tools/tool-factory.js' +// McpTool implementation +export { McpTool } from './tools/mcp-tool.js' + // Streaming event types export type { Usage,