Pi 1.5.0 moves tool argument validation to pi-schema, changing how tools are checked
Pi 1.5.0 runs tool argument validation on pi-schema, so some TypeBox-only features no longer apply to tool arguments.
Pi 1.5.0, the release of the Pi coding agent, moves tool argument validation onto the @earendil-works/pi-schema package. That move changes which schema features work for tool arguments. The release lists TypeBox features outside JSON Schema as no longer applying to tool arguments: Type.Refine(), Type.BigInt(), Type.Undefined(), codecs, and Format.Set() formats. Anyone who relied on those in a tool's parameter schema will find that Pi no longer enforces them there. The release notes file this under Breaking Changes and point readers to Tool parameter schemas and TypeBox for details.
The change also goes the other way for plain JSON Schema. Tools written in JSON Schema, including MCP tools, now receive the same coercion that TypeBox tools already got. The notes give two examples: a numeric string is converted to a number, and a single value is wrapped into an array. Pi's validator now treats both kinds of tool alike, so the schema style no longer decides how arguments are coerced.
Validation errors also change in wording, and this matters for the model. When arguments fail, the model now sees pi-schema's messages, which list each problem by path, such as "- path: missing" and "- limit: expected number, got string". Earlier versions reported TypeBox's wording, such as "must have required properties path" and "must be number".
The release also says extensions keep working with their existing imports. Extensions can keep importing Type, Static and TSchema from @earendil-works/pi-ai, and Pi maps those imports to pi-ai's compat entry plus the TypeBox it bundles. The notes say pi-ai itself no longer re-exports TypeBox, and that its StringEnum still produces a TypeBox TUnsafe<T>. The built-in tool factories, such as createReadTool(), return TypeBoxAgentTool<typeof schema>, which keeps their params typed for TypeBox. The notes don't say whether extensions that use TypeBox-only features in their own tools will fail at load time or simply stop enforcing those features, and the excerpt doesn't include the linked schema documentation that would answer that.
What changed
Pi 1.5.0 moves tool argument validation to @earendil-works/pi-schema, so TypeBox-only features Type.Refine(), Type.BigInt(), Type.Undefined(), codecs and Format.Set() formats no longer apply to tool arguments, while plain JSON Schema tools now get TypeBox-style coercion.
Type: Breaking change · Applies to: Pi 1.5.0, @earendil-works/pi-schema
Why it matters
Developers with custom tools that depend on TypeBox-specific validation may see different argument handling and different error text. MCP tool arguments are now coerced, which can change what those tools receive.
What you can do
Review custom tool parameter schemas for TypeBox-only features before upgrading to Pi 1.5.0.
Original source
Where we saw it
Pi releases
AI wrote this summary from the sources listed, and nobody reviewed it individually before publication. Check the original source before you rely on it. How it works