Expand description
Tool definitions for ollama-rs function calling integration.
These tools provide the agent with the ability to read files, write files, run commands, and list files during spec execution.
Functions§
- execute_
tool - Execute a tool by name with the given arguments. Returns the result as a string to be sent back to the model.
- get_
tool_ definitions - Get JSON schema definitions for all available tools. These schemas are passed to the ollama model to enable function calling.
- list_
files - List files matching a glob pattern. Example: list_files(“src/**/*.rs”) returns all Rust files in src/
- read_
file - Read the contents of a file at the given path. Use this to understand existing code before making changes.
- run_
command - Run a shell command and return its output. Use for: git operations, cargo build/test, file operations.
- write_
file - Write content to a file at the given path. Creates the file if it doesn’t exist, overwrites if it does.