Skip to main content
Meerkat’s tool system is trait-based. You implement AgentToolDispatcher, and the engine handles dispatch, parallel execution, and result injection. MCP servers are first-class — register them and their tools appear alongside your custom tools with no code changes.

Custom tools

Implement the AgentToolDispatcher trait:
struct MathTools;

#[async_trait]
impl AgentToolDispatcher for MathTools {
    fn tools(&self) -> Arc<[Arc<ToolDef>]> {
        vec![Arc::new(ToolDef {
            name: "add".to_string(),
            description: "Add two numbers".to_string(),
            input_schema: json!({
                "type": "object",
                "properties": {
                    "a": {"type": "number"},
                    "b": {"type": "number"}
                },
                "required": ["a", "b"]
            }),
        })].into()
    }

    async fn dispatch(&self, call: ToolCallView<'_>) -> Result<ToolResult, ToolError> {
        match call.name {
            "add" => {
                let args: AddArgs = call.parse_args()
                    .map_err(|e| ToolError::InvalidArguments(e.to_string()))?;
                Ok(ToolResult::success(call.id, format!("{}", args.a + args.b)))
            }
            _ => Err(ToolError::not_found(call.name)),
        }
    }
}
ToolCallView is a zero-allocation borrowed view ({ id: &str, name: &str, args: &RawValue }). When the model requests multiple tool calls, Meerkat dispatches them in parallel.

MCP servers

Register any MCP server and its tools automatically appear in the agent’s tool set:
rkat mcp add filesystem -- npx -y @anthropic/mcp-server-filesystem /tmp
rkat mcp add api --url https://mcp.example.com/api
Config is stored in .rkat/mcp.toml (project) or ~/.rkat/mcp.toml (user). Supports stdio, streamable HTTP, and SSE transports. See the MCP reference for full details.

Built-in tools

Meerkat ships with tool categories you enable per-agent. Nothing is on by default — you choose what your agent can do.
CategoryToolsEnable with
Task managementtask_create, task_list, task_get, task_updateenable_builtins
Shellshell, shell_jobs, shell_job_status, shell_job_cancelenable_shell
Sub-agentsagent_spawn, agent_fork, agent_status, agent_cancel, agent_listenable_subagents
Memorymemory_searchenable_memory
Commssend_message, send_request, send_response, list_peersenable_comms
Shell tools support allow/deny list security policies. Sub-agent tools enforce concurrency limits and prevent recursive spawning. See the built-in tools reference for parameter details.

Composition

Tools from different sources (custom, MCP, built-in) are composed into a single dispatcher. The agent sees one flat tool list regardless of where each tool comes from. Hooks can intercept tool calls before and after execution for guardrails, audit, or argument rewriting.