adk-tool-builder
БесплатноБез исполняемых скриптовНе проверенGuide for creating custom ADK tools. Use when adding new function tools, working with ToolContext, saving artifacts, or integrating external APIs into the…
Об этом скилле
ADK Tool Builder
Quick Start
- Create
app/tools/my_tool.py - Use signature:
def my_tool(param: str, tool_context: ToolContext) -> dict - Export in
app/tools/__init__.py - Add to agent's
tools=[my_tool]list
Basic Tool Template
from google.adk.tools import ToolContext
def my_tool(query: str, tool_context: ToolContext) -> dict:
"""Search for relevant information.
Args:
query: The search query.
Returns:
dict with status and results.
"""
try:
# Access state if needed
location = tool_context.state.get("target_location", "")
# Perform the operation
results = do_something(query, location)
return {
"status": "success",
"results": results,
"count": len(results),
}
except Exception as e:
return {
"status": "error",
"error_message": str(e),
}
Key Patterns
| Pattern | Usage |
|---|---|
| ToolContext | Always include as last parameter |
| State access | tool_context.state.get("key") |
| Return format | Always return dict with "status" key |
| Async tools | Use async def for save_artifact() |
| Docstrings | LLM uses these to understand the tool |
Async Tool (for Artifacts)
async def save_report(html: str, tool_context: ToolContext) -> dict:
"""Save HTML report as artifact."""
artifact = types.Part.from_bytes(
data=html.encode('utf-8'),
mime_type="text/html"
)
await tool_context.save_artifact(
filename="report.html",
artifact=artifact
)
return {"status": "success", "filename": "report.html"}
Common Mistakes
- Forgetting
tool_context: ToolContextparameter - Not handling exceptions properly
- Missing docstring (LLM needs it!)
- Using sync for
save_artifact()(must be async)
[See references/tool-patterns.md for API examples and advanced patterns]
Установить adk-tool-builder в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
FAQ
Что делает скилл adk-tool-builder?
Guide for creating custom ADK tools. Use when adding new function tools, working with ToolContext, saving artifacts, or integrating external APIs into the agent pipeline.
Как установить скилл adk-tool-builder?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл adk-tool-builder запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
ci-review
The scan that the plugin's GitHub Action runs.
от Anthropicazure-static-web-apps
Helps create, configure, and deploy Azure Static Web Apps using the SWA CLI. Use when deploying static sites to Azure, setting up SWA local development…
от GitHubai-ready
Make any repo AI-ready — analyzes your codebase and generates AGENTS.md, copilot-instructions.md, CI workflows, issue templates, and more. Mines your PR…
от GitHubaws-cdk-python-setup
Setup and initialization guide for developing AWS CDK (Cloud Development Kit) applications in Python. This skill enables users to configure environment…
от GitHub