Skip to content

feat(agents)!: Improve toolspec api with schemars and support all possible types#940

Merged
timonv merged 11 commits intomasterfrom
refactor-toolspec
Oct 12, 2025
Merged

feat(agents)!: Improve toolspec api with schemars and support all possible types#940
timonv merged 11 commits intomasterfrom
refactor-toolspec

Conversation

@timonv
Copy link
Copy Markdown
Member

@timonv timonv commented Sep 30, 2025

Summary

  • refactor tool macro parameter handling to rely on schemars-derived schemas, allowing complex argument types without bespoke ParamType bookkeeping
  • refresh the agent examples to demonstrate both primitive and structured tool arguments, including the new custom schema showcase
  • add tool_custom_schema example that wraps a manual Tool implementation around a schema_for! definition for fine-grained schema control

BREAKING CHANGE: macro-level json_type overrides beyond the basic primitives are no longer enforced; rely on Rust type inference or provide an explicit schemars-derived struct/custom schema when specific shapes are required

@timonv timonv force-pushed the refactor-toolspec branch from bb841b2 to 1cc2658 Compare October 12, 2025 11:07
@timonv timonv merged commit 9ae3331 into master Oct 12, 2025
3 checks passed
@timonv timonv deleted the refactor-toolspec branch October 12, 2025 14:07
timonv pushed a commit that referenced this pull request Nov 5, 2025
## 🤖 New release

* `swiftide-core`: 0.31.3 -> 0.32.0 (✓ API compatible changes)
* `swiftide-macros`: 0.31.3 -> 0.32.0
* `swiftide-indexing`: 0.31.3 -> 0.32.0 (✓ API compatible changes)
* `swiftide-agents`: 0.31.3 -> 0.32.0 (✓ API compatible changes)
* `swiftide-integrations`: 0.31.3 -> 0.32.0 (✓ API compatible changes)
* `swiftide-langfuse`: 0.31.3 -> 0.32.0 (✓ API compatible changes)
* `swiftide-query`: 0.31.3 -> 0.32.0 (✓ API compatible changes)
* `swiftide`: 0.31.3 -> 0.32.0 (✓ API compatible changes)

<details><summary><i><b>Changelog</b></i></summary><p>








## `swiftide`

<blockquote>

##
[0.32.0](v0.31.3...v0.32.0)
- 2025-11-05

### New features

-
[9ae3331](9ae3331)
*(agents)* [**breaking**] Improve toolspec api with schemars and support
all possible types
([#940](#940))

**BREAKING CHANGE**: macro-level `json_type` overrides beyond the basic
primitives are no longer enforced; rely on Rust type inference or
provide an explicit schemars-derived struct/custom schema when specific
shapes are required

-
[a0cc8d7](a0cc8d7)
*(agents)* Stop with args with optional schema
([#950](#950))

-
[8ad7d97](8ad7d97)
*(agents)* Add configurable timeouts to commands and local executor
([#963](#963))

-
[29289d3](29289d3)
*(agents)* [**breaking**] Add working directories for executor and
commands ([#941](#941))

**BREAKING CHANGE**: Add working directories for executor and commands
([#941](#941))

-
[ce724e5](ce724e5)
*(agents/mcp)* Prefix mcp tools with the server name
([#958](#958))

### Bug fixes

-
[04cd88b](04cd88b)
*(docs)* Replace `feature(doc_auto_cfg)` with `doc(auto_cfg)`

-
[7873ce5](7873ce5)
*(integrations/openai)* Simplefy responses api and improve chat
completion request ergonomics
([#956](#956))

-
[24328d0](24328d0)
*(macros)* Ensure deny_unknown_attributes is set on generated args
([#948](#948))

-
[54245d0](54245d0)
Update async-openai and fix responses api
([#964](#964))

-
[72a6c92](72a6c92)
Force additionalProperties properly on completion requests
([#949](#949))


**Full Changelog**:
0.31.3...0.32.0
</blockquote>


</p></details>

---
This PR was generated with
[release-plz](https://github.com/release-plz/release-plz/).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant