Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions docs/agents/workflows.md
Original file line number Diff line number Diff line change
Expand Up @@ -312,3 +312,10 @@ async def main() -> None:
max_display_instances=20,
)
```

Child cards can define `tool_input_schema` to control how they appear as
`agent__*` tools to the parent model. If omitted, fast-agent falls back to the
legacy schema requiring a single `message` string argument.

For structured child schemas that do not include `message`, fast-agent forwards
tool arguments to the child as deterministic JSON in the first user message.
22 changes: 22 additions & 0 deletions docs/ref/agent_cards.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,28 @@ mcp_connect:
When both target-derived values and explicit fields are present, explicit fields
(`headers`, `auth`, etc.) win.

## Child-owned tool schemas (`tool_input_schema`)

Agent cards can declare an optional tool schema used when that card is exposed as
a child tool (`agent__<name>`) by a parent `agent`/`smart` card.

```yaml
tool_input_schema:
type: object
properties:
query:
type: string
description: What to investigate.
required: [query]
```

- If omitted, fast-agent falls back to the legacy schema:
`{ type: object, properties: { message: string }, required: [message] }`.
- For structured schemas without `message`, child invocation receives a
deterministic JSON rendering of the tool arguments as user input.
- Use `properties.<param>.description` (especially for required params) to help
parent LLM tool-call quality.

If an inferred/provided name collides with another server using different settings,
startup fails with a collision error. Prefer explicit `name` values for stability.

Expand Down