adk-tool-scaffold
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseADK Tool Scaffold Skill
ADK Tool 脚手架技能
This skill automates the creation of standard implementations for the Agent Development Kit.
BaseTool该技能可自动为Agent开发工具包创建标准的实现。
BaseToolInstructions
操作说明
-
Identify the Tool Name: Extract the name of the tool the user wants to build (e.g., "StockPrice", "EmailSender").
-
Review the Example: Checkto understand the expected structure of an ADK tool (imports, inheritance, schema).
examples/WeatherTool.py -
Run the Scaffolder: Execute the python script to generate the initial file.bash
python scripts/scaffold_tool.py <ToolName> -
Refine: After generation, you must edit the file to:
- Update the method with real logic.
execute - Define the JSON schema in .
get_schema
- Update the
-
确定工具名称: 提取用户想要构建的工具名称(例如:"StockPrice"、"EmailSender")。
-
查看示例: 查看以了解ADK工具的预期结构(导入、继承、模式)。
examples/WeatherTool.py -
运行脚手架生成器: 执行Python脚本以生成初始文件。bash
python scripts/scaffold_tool.py <ToolName> -
优化完善: 生成后,你需要编辑文件以:
- 使用实际逻辑更新方法。
execute - 在中定义JSON模式。
get_schema
- 使用实际逻辑更新
Example Usage
示例用法
User: "Create a tool to search Wikipedia."
Agent:
- Runs
python scripts/scaffold_tool.py WikipediaSearch - Editing to add the
WikipediaSearchTool.pylogic andrequestsargument schema.query
用户:"创建一个用于搜索维基百科的工具。"
Agent:
- 运行
python scripts/scaffold_tool.py WikipediaSearch - 编辑以添加
WikipediaSearchTool.py逻辑和requests参数模式。query