claude-code - 💡(How to fix) Fix [FEATURE] ToolBuild hooks: Pre & Post [1 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
anthropics/claude-code#60555Fetched 2026-05-20 03:55:33
View on GitHub
Comments
0
Participants
1
Timeline
3
Reactions
0
Author
Participants
Timeline (top)
labeled ×3
RAW_BUFFERClick to expand / collapse

Preflight Checklist

  • I have searched existing requests and this feature hasn't been requested yet
  • This is a single feature request (not multiple features)

Problem Statement

I'd like to be able to manipulate the list of tools sent to LLM based on the user query. For this purpose, I'd like to have PreToolBuild and PostToolBuild hooks.

So I can add, remove, or modify tools, their properties and enums.

Neither MCP SPEC nor current hooks allow this.

Proposed Solution

Implement ToolBuild hooks so I could fire them at runtime and make manipulations with the tools the agent has based on the user query.

Alternative Solutions

A proxy server that intercepts and modifies the tools. Is a classy solution.

Priority

High - Significant impact on productivity

Feature Category

Configuration and settings

Use Case Example

I’d like to intelligently remove and modify unnecessary tools or optional and not relevant properties or enums to save tokens and have LLM focused.

Additional Context

No response

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING