@ai-sdk/[email protected]
@ai-sdk/[email protected]
ai
Release Notes
Patch Changes
2a150f8: fix(mcp): lock first sse endpoint received via event
b44b051: fix(mcp): prevent prototype-named tools from bypassing the
schemasallowlistWhen using
client.tools({ schemas })to expose only an explicitly allowed subset of an MCP server's tools, the allowlist check used theinoperator, which also matches inheritedObject.prototypeproperties. A server-advertised tool namedconstructor,toString,__proto__, etc. would pass the check even though the developer never defined it inschemas, and was then exposed to the model and executable. The check now usesObject.hasOwn, so only explicitly defined tools are returned.Updated dependencies [aeda373]
Updated dependencies [375fdd7]
Updated dependencies [b4507d5]
- @ai-sdk/[email protected]