Skip to content

Flatten Tool metadata API - #2029

Merged
gold-silver-copper merged 3 commits into
mainfrom
flat-tool-api-single-source-names
Jul 7, 2026
Merged

Flatten Tool metadata API#2029
gold-silver-copper merged 3 commits into
mainfrom
flat-tool-api-single-source-names

Conversation

@gold-silver-copper

Copy link
Copy Markdown
Contributor

Summary

  • flatten Tool and ToolDyn metadata to name / description / parameters
  • remove prompt-dependent definition(...) from tool authoring and erased runtime traits
  • generate provider-facing ToolDefinitions at registry/request boundaries from registered tool names
  • update #[rig_tool], MCP/vector-store tools, examples, provider tests, and changelogs

Migration

Tool authors now write:

const NAME: &'static str = "search";

fn description(&self) -> String {
    "Search docs".into()
}

fn parameters(&self) -> serde_json::Value {
    serde_json::json!({ /* schema */ })
}

instead of returning a ToolDefinition from definition(prompt).

Verification

  • cargo fmt
  • cargo check -p rig-core --all-targets --all-features
  • cargo check --workspace --all-targets --all-features
  • cargo clippy --all-targets --all-features
  • cargo test -p rig-core --lib
  • cargo test -p rig-derive
  • cargo test --doc --workspace --all-features

@gold-silver-copper
gold-silver-copper added this pull request to the merge queue Jul 7, 2026
Merged via the queue into main with commit 4c25682 Jul 7, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant