#!/bin/bash
# args_json: {"type":"object","required":["name"],"properties":{"name":{"type":"string","description":"Tool name to load into the current session/agent"}}}
# ollie:prompt
# ## tool_load
#
# Load a tool into the current session/agent.
#
# **Args**: `name` (required) — the tool name to load.
#
# ```
# tool_load(name="file_read")
# ```
# ollie:end

set -euo pipefail

# This tool just outputs the name - the actual loading is handled by
# the agent framework when it receives the tool result.
name=$(grep -oP '"name"\s*:\s*"\K[^"]+')
echo "STATUS=ok TOOL_LOAD=$name"
