pub struct ToolGroup {
pub id: String,
pub title: String,
pub description: String,
pub instructions: Option<String>,
pub members: Vec<String>,
}Expand description
A related set of callables surfaced together from one source.
A group tells the model that a bundle of tools share an origin (for example
a single MCP server, or the built-in filesystem tools) and are meant to be
combined to complete related work. Groups are a discovery-layer concept
only: they are never sent to model providers as part of the function-calling
schema. They are returned by the built-in discovery helpers (tools_search /
tools_select) so the model can understand a bundle’s purpose and pull in
sibling tools as needed.
instructions, title, and description may originate from untrusted
remote metadata. They are surfaced as plain data the model reads, never as
system instructions, so they cannot escalate into runtime directives.
Fields§
§id: StringStable group id, unique across providers (for example mcp:filesystem).
title: StringHuman-facing group title.
description: StringConcise summary of what this bundle of tools does.
instructions: Option<String>Optional usage instructions describing how the member tools work together. Untrusted remote metadata; treat as reference, not directives.
members: Vec<String>Model-facing names of the tools that belong to this group.
Implementations§
Source§impl ToolGroup
impl ToolGroup
Sourcepub fn from_info(info: ToolGroupInfo, members: Vec<String>) -> Self
pub fn from_info(info: ToolGroupInfo, members: Vec<String>) -> Self
Builds a group from a per-tool ToolGroupInfo and resolved members.