Expand description
Tool (function) calling: tool declarations in each model family’s own syntax, parsing of the
calls a model emits, and a few built-in tools for the command line. The host runs the tools;
chat::ChatFormat feeds the results back in the format the model was trained on.
Gemma 4 declares tools as <|tool>declaration:NAME{...}<tool|> in the system turn and calls
them with <|tool_call>call:NAME{key:<|"|>value<|"|>}<tool_call|>; Qwen 3.5 / 3.8 lists JSON
schemas inside <tools> and calls with <tool_call><function=NAME><parameter=key>value </parameter></function></tool_call>.
Modules§
Structs§
- Tool
Call - Tool
Result - Tool
Spec - A tool the model may call: a name, what it does, and a JSON schema (
type: object) for its arguments.
Functions§
- builtin_
specs - default_
system_ prompt - The default system prompt of the command line.
- local_
now - Local wall-clock time: (
YYYY-MM-DD HH:MM:SS, weekday, UTC offset in seconds, zone name). - now_
string - “2026-10-24 14:05:09 Friday (UTC+09:00, JST)”.
- run_
builtin - Runs a built-in tool; unknown tools and bad arguments come back as error text for the model.