Skip to content

Commit 67f9a26

Browse files
authored
Merge pull request #32 from evalstate/docs/tool-input-schema-child-tools
docs: add tool_input_schema guidance for agents-as-tools
2 parents 436cd5c + 4da95ce commit 67f9a26

2 files changed

Lines changed: 29 additions & 0 deletions

File tree

docs/agents/workflows.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -312,3 +312,10 @@ async def main() -> None:
312312
max_display_instances=20,
313313
)
314314
```
315+
316+
Child cards can define `tool_input_schema` to control how they appear as
317+
`agent__*` tools to the parent model. If omitted, fast-agent falls back to the
318+
legacy schema requiring a single `message` string argument.
319+
320+
For structured child schemas that do not include `message`, fast-agent forwards
321+
tool arguments to the child as deterministic JSON in the first user message.

docs/ref/agent_cards.md

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,28 @@ mcp_connect:
7373
When both target-derived values and explicit fields are present, explicit fields
7474
(`headers`, `auth`, etc.) win.
7575

76+
## Child-owned tool schemas (`tool_input_schema`)
77+
78+
Agent cards can declare an optional tool schema used when that card is exposed as
79+
a child tool (`agent__<name>`) by a parent `agent`/`smart` card.
80+
81+
```yaml
82+
tool_input_schema:
83+
type: object
84+
properties:
85+
query:
86+
type: string
87+
description: What to investigate.
88+
required: [query]
89+
```
90+
91+
- If omitted, fast-agent falls back to the legacy schema:
92+
`{ type: object, properties: { message: string }, required: [message] }`.
93+
- For structured schemas without `message`, child invocation receives a
94+
deterministic JSON rendering of the tool arguments as user input.
95+
- Use `properties.<param>.description` (especially for required params) to help
96+
parent LLM tool-call quality.
97+
7698
If an inferred/provided name collides with another server using different settings,
7799
startup fails with a collision error. Prefer explicit `name` values for stability.
78100

0 commit comments

Comments
 (0)