Skip to content

Conversation

@gary149
Copy link
Collaborator

@gary149 gary149 commented Jan 28, 2026

Summary

Updated the tool usage instructions in the LLM system prompt to provide clearer, more specific guidance on when tools should and should not be used. This aims to reduce unnecessary tool calls for tasks the model can handle from its own knowledge.

Changes

  • Replaced vague instruction with explicit list of tasks that should NOT trigger tool calls (writing code, generating files, creative writing, explanations, math, translations, summaries, Q&A)
  • Added clarifying instruction that tools should only be used for external, up-to-date, or user-specific information (e.g., current API docs, recent library changes, real-time data)
  • Improved specificity by providing concrete examples of when tool usage is appropriate

Details

The previous prompt used a general guideline ("only use a tool if you cannot answer without it") which was ambiguous and led to over-reliance on tools. The new guidance explicitly enumerates common tasks that should be handled without tools, while clarifying the legitimate use cases for tool invocation. This should improve response latency and reduce unnecessary API calls while maintaining accuracy for queries requiring external information.

https://claude.ai/code/session_012q4MT9VeNuP1sHkeQMxcxf

claude and others added 3 commits January 27, 2026 21:41
The previous instruction "Only use a tool if you cannot answer without
it" was too weak and allowed models to call tools for purely creative
tasks like generating HTML files, writing code, etc.

The new prompt:
- Adds explicit IMPORTANT prefix for emphasis
- Lists specific task types that should NOT trigger tool calls (writing
  code, generating files, creative writing, explanations, math, etc.)
- Separates the positive guidance (when to call tools) into its own
  sentence for clarity

https://claude.ai/code/session_012q4MT9VeNuP1sHkeQMxcxf
Refined the tool preprompt to acknowledge that some code tasks DO
benefit from tool calls—specifically when current API documentation,
recent library changes, or real-time data is needed.

Changes:
- "writing code" → "writing standard code" (generic patterns vs API-specific)
- Added concrete examples of valid tool use: API docs, library changes,
  real-time data

https://claude.ai/code/session_012q4MT9VeNuP1sHkeQMxcxf
Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 564bcccef5

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +18 to +19
`IMPORTANT: Do NOT call any tool for tasks you can complete from your own knowledge. This includes: writing standard code, generating files (HTML, JSON, etc.), creative writing, explanations, math, translations, summaries, and general Q&A.`,
`Only call a tool when you genuinely need external, up-to-date, or user-specific information you lack—for example, current API documentation, recent library changes, or real-time data.`,

Choose a reason for hiding this comment

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

P2 Badge Allow tool calls for action/side‑effect tools

This new guidance restricts tool usage to “external, up‑to‑date, or user‑specific information.” That breaks MCP servers that expose action/side‑effect tools (e.g., create tickets, write files, trigger jobs), because the model is now explicitly told those are out of scope and will likely answer in plain text instead of invoking the tool. This regression shows up whenever a user relies on a non‑informational MCP tool; those workflows will silently fail.

Useful? React with 👍 / 👎.

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