//! `Tool` trait and `ToolDefinition` schema — verbatim from the original
//! `agent.rs`, extended with [`Tool::read_only_hint`] used by the loop's
//! parallel-dispatch and permission logic.
use async_trait;
use Value;
/// JSON-schema description of a tool, sent to the model in the request.
/// Tool callable from the agent loop.
///
/// `read_only_hint()` defaults to `false`. Tools that don't mutate the host
/// system (Read, Glob, Grep, Web*) should override it to `true` so the loop
/// runs them in parallel and so `PermissionMode::Plan` allows them.