# 2374 Tun 1ad5 Wrap Tools As Tinyagent Agenttool E4bbcd88

> Summary

- Skill: `tools-only/2374-tun-1ad5-wrap-tools-as-tinyagent-agenttool-e4bbcd88` (Agent Skill, multi-file: 3 files)
- Install (CLI): `npx skillmds@latest add tools-only/2374-tun-1ad5-wrap-tools-as-tinyagent-agenttool-e4bbcd88`
- Raw SKILL.md: https://api.skillmd.com/api/skills/tools-only/2374-tun-1ad5-wrap-tools-as-tinyagent-agenttool-e4bbcd88/raw
- Safety review: pending (external: skill-scanner PASS, skillspector PASS)
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Coding & Dev Tools
- Author: tools-only (https://skillmd.com/u/tools-only)
- Updated: 2026-09-22
- Page: https://skillmd.com/skills/tools-only/2374-tun-1ad5-wrap-tools-as-tinyagent-agenttool-e4bbcd88

---


## Summary

Removed the pydantic-ai `ModelRetry` bridge from the tool layer and added a tinyAgent adapter that exposes TunaCode tools as `tinyagent.AgentTool` instances with the fixed `execute(tool_call_id, args, signal, on_update)` signature.

## Changes

- `src/tunacode/tools/decorators.py`
  - `ToolRetryError` now passes through (no conversion to `pydantic_ai.ModelRetry`).
  - `file_tool` converts `FileNotFoundError` to `ToolRetryError` instead of `ModelRetry`.
  - Added `to_tinyagent_tool()` to emit `tinyagent.AgentTool` objects.
  - Added best-effort OpenAI-function JSON schema generation from tool signatures.

- `src/tunacode/core/agents/agent_components/tool_executor.py`
  - `ToolRetryError` is now treated as non-retryable by the automatic tool retry loop.

- Tests
  - Updated decorator/path-validation/retry tests to assert `ToolRetryError` instead of `ModelRetry`.
  - Added unit tests for `to_tinyagent_tool()`.

## Behavioral Impact

- Tool retry hints are now represented as `ToolRetryError` all the way up to the agent loop.
- Tools can be registered into tinyAgent without additional per-tool wrappers.

## Related Cards

- [[tun-1658-tinyagent-migration]]

