Skip to content

Reduce builtin tool prompt lengths while preserving key examples#1879

Merged
dgageot merged 1 commit intodocker:mainfrom
dgageot:reduce-prompts
Mar 3, 2026
Merged

Reduce builtin tool prompt lengths while preserving key examples#1879
dgageot merged 1 commit intodocker:mainfrom
dgageot:reduce-prompts

Conversation

@dgageot
Copy link
Member

@dgageot dgageot commented Feb 28, 2026

Shorten Instructions() and tool descriptions across all builtin tools: shell, LSP, fetch, memory, think, tasks, deferred, and user_prompt. Remove redundant prose, verbose output format sections, and excessive examples. Retain essential examples for critical workflows (symbol search, references, shell heredocs, user_prompt schemas). Update corresponding tests to match reduced descriptions.

Assisted-By: cagent

Shorten Instructions() and tool descriptions across all builtin tools:
shell, LSP, fetch, memory, think, tasks, deferred, and user_prompt.
Remove redundant prose, verbose output format sections, and excessive
examples. Retain essential examples for critical workflows (symbol
search, references, shell heredocs, user_prompt schemas). Update
corresponding tests to match reduced descriptions.

Assisted-By: cagent
@dgageot dgageot requested a review from a team as a code owner February 28, 2026 08:48
Copy link

@docker-agent docker-agent bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review Summary

This PR successfully reduces builtin tool prompt lengths while preserving essential information. The changes are focused on removing redundant prose, verbose output format sections, and excessive examples from Instructions() and tool descriptions across all builtin tools.

The edits maintain the key workflows and critical examples (symbol search, references, shell heredocs, user_prompt schemas) while making the documentation more concise. Test assertions have been appropriately updated to match the reduced descriptions.

No functional changes detected. All modifications are cosmetic documentation improvements that enhance readability without impacting tool behavior.

Copy link
Contributor

@gtardif gtardif left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

small nit question, happy to merge as is anyway


// Should mention the tools are stateless
assert.Contains(t, instructions, "stateless")
assert.Contains(t, instructions, "Stateless")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: compare with toLower() to make this more resilient? (if we need this change, feels like a sign to me)

@dgageot dgageot merged commit a3526f4 into docker:main Mar 3, 2026
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants