Skip to content

v0.1.1

Choose a tag to compare

@folathecoder folathecoder released this 29 Oct 16:42
· 32 commits to main since this release
45fd5d8

v0.1.1: Dynamic tools

Tools whose schemas come from somewhere else (an MCP server, an OpenAPI spec,
a plugin) now work, and a running session can gain or lose tools.

Highlights:

  • AgentSession.add_tools() and remove_tools() change a live session's tools.
    The model sees the change from its next call, and each call is all or
    nothing.
  • Tool.validate_arguments and @tool(validate_arguments=...) let a remote
    server do the validation; Tool.validate() checks arguments without running
    the tool.
  • Validation no longer crashes on union types such as ["string", "null"],
    skips keywords it doesn't implement, and only rejects extra arguments when
    additionalProperties is false.
  • Tool names and schemas are checked wherever a tool is registered.
  • Docstrings now say which errors are reserved and that provider errors reach
    the caller unwrapped.

Behaviour change: a Tool subclass whose schema doesn't set
"additionalProperties": false now accepts extra arguments. @tool schemas still
reject them.

Full changelog: CHANGELOG.md