Skip to content

fix(skilltoolset): document load_skill param as name, not skill_name#919

Open
koriyoshi2041 wants to merge 1 commit into
google:mainfrom
koriyoshi2041:fix/skilltoolset-load-skill-param-name
Open

fix(skilltoolset): document load_skill param as name, not skill_name#919
koriyoshi2041 wants to merge 1 commit into
google:mainfrom
koriyoshi2041:fix/skilltoolset-load-skill-param-name

Conversation

@koriyoshi2041
Copy link
Copy Markdown

Closes #912.

The default SkillToolset system instruction tells the model:

use the load_skill tool with skill_name="<SKILL_NAME>"

but the load_skill tool input (skilltool.LoadSkillArgs) marshals its field as name:

type LoadSkillArgs struct {
    Name string `json:"name" jsonschema:"The name of the skill to load."`
}

So the first load_skill call in a session is rejected for an unknown skill_name field and only succeeds after the model retries with name. Updated the instruction to document name="<SKILL_NAME>" to match the schema. (load_skill_resource keeps its own skill_name parameter — that one is unchanged.)

Added TestDefaultInstructionMatchesLoadSkillSchema, which reflects the JSON tag off LoadSkillArgs.Name and asserts the default instruction documents that exact parameter for load_skill (and no longer skill_name=), so the two cannot drift apart again. go test ./tool/skilltoolset/... passes.

@indurireddy-TF
Copy link
Copy Markdown
Contributor

Thank you for opening this PR. This correctly resolves the schema mismatch in skilltoolset where the default system instruction incorrectly directed models to use skill_name instead of name for load_skill

I have verified the test cases, and they are working as expected.

@kdroste-google @foxfrikses @baptmont , could you please take a look at these changes and review the PR when you have a moment?

The default system instruction told the model to call the load_skill tool
with skill_name="<SKILL_NAME>", but LoadSkillArgs marshals its field as
"name". The first load_skill call in each session was therefore rejected for
an unknown field and only recovered via retry. Use name= to match the schema.
@koriyoshi2041 koriyoshi2041 force-pushed the fix/skilltoolset-load-skill-param-name branch from 2326ad5 to a6ee693 Compare June 7, 2026 09:37
@koriyoshi2041
Copy link
Copy Markdown
Author

Rebased this onto current main so the PR is no longer behind. Rechecked the touched skilltoolset package with go test ./tool/skilltoolset/....

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

SkillToolset default SystemInstruction documents skill_name= for load_skill, but the schema expects name=

2 participants