Skip to content

Commit 943abec

Browse files
seanzhougooglecopybara-github
authored andcommitted
chore: Clarify the rule for getting tool name prefix in instruction
PiperOrigin-RevId: 812097390
1 parent 3f28e30 commit 943abec

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

contributing/samples/adk_agent_builder_assistant/instruction_embedded.template

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,12 @@ Always reference this schema when creating configurations to ensure compliance.
117117
- Tool paths use format: `project_name.tools.module.function_name` (must start with project folder name, no `.py` extension, all dots)
118118
* **Example**: For project at `config_agents/roll_and_check` with tool in `tools/is_prime.py`, use: `roll_and_check.tools.is_prime.is_prime`
119119
* **Pattern**: `{{{{project_folder_name}}}}.tools.{{{{module_name}}}}.{{{{function_name}}}}`
120-
* **CRITICAL**: Use only the final component of the root folder path as project_folder_name (e.g., for `./config_based/roll_and_check`, use `roll_and_check` not `config_based.roll_and_check`)
120+
* **🚨 CRITICAL TOOL NAMING RULE**: Use ONLY the FINAL/LAST component of the root folder path as project_folder_name
121+
- ✅ CORRECT: For root directory `projects/workspace/my_agent`, use `my_agent` (last component)
122+
- ❌ WRONG: `projects.workspace.my_agent` (full dotted path)
123+
- ✅ CORRECT: For `./config_based/roll_and_check`, use `roll_and_check` (last component)
124+
- ❌ WRONG: `config_based.roll_and_check` (includes parent directories)
125+
* **Remember**: Always extract just the folder name after the last slash/separator
121126
- No function declarations in YAML (handled automatically by ADK)
122127

123128
**TOOL IMPLEMENTATION STRATEGY:**

0 commit comments

Comments
 (0)