# Add Tool

Add a new `@tool` function that agents can use during their ReAct loop.

**User request:** $ARGUMENTS

---

Read `CLAUDE.md` and `skills/add-tool/SKILL.md` fully before doing anything.

Based on the description above:

1. **Create the `@tool` function** in `tools/my_tools.py` (or a new file under `tools/`). Write a complete docstring that tells the LLM when and how to call it — the docstring IS the LLM's API contract. Return error strings (prefixed `"ERROR:"`) instead of raising exceptions.

2. **Expose via a getter function** so agents import cleanly (`get_my_tools() -> list`).

3. **Update the agent's `execute()`** to pass the tool to `run_react(tools=[...])`:
```python
tools=get_research_tools() + create_workspace_tools(Path("workspace")) + get_my_tools()
```

4. **Update `prompts/{agent}.md`** — this step is mandatory and the most commonly missed. The LLM will silently ignore any tool that is not mentioned by name in the prompt. Add an explicit instruction like:
```
Call `tool_name` to do X. Pass {argument} as the parameter. Use the result to Y.
```
If the tool should be called for every item in a list, say so literally: "Call `tool_name` for EVERY item before adding it to your output."
