Skip to content
Back to skills

2374 Tun 1ad5 Wrap Tools As Tinyagent Agenttool E4bbcd88

ASecurity

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.

  • 9 stars
  • 0 votes
  • 0 copies
  • 2 views
  • Added October 11, 2026
testing

Security analysis

A100/100

Scanned October 11, 2026

npx -y skills add tools-only/X-Skills --skill 2374-tun-1ad5-wrap-tools-as-tinyagent-agenttool_e4bbcd88 --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of 2374 Tun 1ad5 Wrap Tools As Tinyagent Agenttool E4bbcd88?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for 2374 Tun 1ad5 Wrap Tools As Tinyagent Agenttool E4bbcd88
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/tools-only-2374-tun-1ad5-wrap-tools-as-tinyagent-agenttool-e4/badge)](https://www.skillsdirectory.com/skills/tools-only-2374-tun-1ad5-wrap-tools-as-tinyagent-agenttool-e4)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

SKILL.md
---
title: "Phase 2: Wrap tools as tinyAgent AgentTool.execute (remove ModelRetry bridge)"
link: "tun-1ad5-wrap-tools-as-tinyagent-agenttool"
type: "delta"
path:
  - "src/tunacode/tools/decorators.py"
  - "src/tunacode/exceptions.py"
  - "src/tunacode/core/agents/agent_components/tool_executor.py"
  - "tests/unit/tools/test_tool_decorators.py"
  - "tests/integration/tools/test_glob_grep_path_validation.py"
  - "tests/integration/tools/test_tool_retry.py"
  - "tests/unit/core/test_text_match.py"
  - "tests/unit/tools/test_tinyagent_tool_adapter.py"
depth: 0
seams: [A, M]
ontological_relations:
  - relates_to: "[[tun-1658-tinyagent-migration]]"
  - affects: "[[tunacode-tools]]"
  - affects: "[[tool-retry-semantics]]"
tags:
  - migration
  - tinyagent
  - tools
  - retry
created_at: 2026-02-07T15:48:00-06:00
updated_at: 2026-02-07T15:48:00-06:00
uuid: 1b451b9c-8f72-4f1e-9dfe-fb73bb8d053d
---

## 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]]

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.