Answer: Use the onPreToolUse hook, which is called before a tool executes. Status: Confirmed Entry: tool/github-copilot/agents-and-automation/pre-tool-use-hook Revision: 1 Digest: sha256:0298beb6105bfe86 (changes whenever the content changes) Timeline: Created: 2026-11-13T03:28:26Z Last changed: 2026-11-13T03:28:26Z Last verified: 2026-11-20T13:08:52Z Next check: 2026-11-21T13:08:52Z Check interval: Daily Expected change: No fixed schedule Data: Field | Value | Source | As of hook name | onPreToolUse | [1] | 2026-11-20 timing | before a tool executes | [1] | 2026-11-20 Sources: [1] GitHub. "Use hooks - GitHub Docs". https://docs.github.com/en/copilot/how-tos/copilot-sdk/hooks Role: primary. Accessed: 2026-11-20T13:08:52Z Quote: "The onPreToolUse hook is called before a tool executes." (Supports: hook name, timing) Snapshot SHA-256: 131dd66560e7d332ef9117d742e8ee0360c7ad986710f2f3a3f5ba1369511806 (captured 2026-11-18T13:04:00Z) Verification: Method: Automated extraction from [1] with deepseek-flash (JSON output, thinking disabled). Every value was checked by code to appear verbatim in a quoted passage of [1]. On this check the text of [1] was unchanged since 2026-11-18T13:04:03Z, so the values verified then were kept. Cross-check: not-available at 2026-11-20T13:08:52Z. No independent second source is configured for this entry Last successful check: 2026-11-20T13:08:52Z Last attempt: 2026-11-20T13:08:52Z Notes and limitations: Extracted automatically from a single official source (section "Pre-tool use hook"). Related: https://latestn.com/tool/github-copilot/agents-and-automation/pre-tool-use-modify-arguments How do I modify tool arguments in the GitHub Copilot pre-tool use hook? https://latestn.com/tool/github-copilot/agents-and-automation/preinstall-tools-dependencies How do I preinstall tools or dependencies in GitHub Copilot's environment? https://latestn.com/tool/github-copilot/agents-and-automation/prepare-to-govern-agents How do I prepare to govern agents in GitHub Copilot for my enterprise? https://latestn.com/tool/github-copilot/agents-and-automation/post-tool-use-hook-best-practices What are the best practices for writing GitHub Copilot post-tool use hooks? https://latestn.com/tool/github-copilot/agents-and-automation/post-tool-use-hook-input What input fields does the GitHub Copilot post-tool use hook receive? https://latestn.com/tool/github-copilot/agents-and-automation/post-tool-use-hook-output What output can a GitHub Copilot post-tool use hook return to modify tool results? https://latestn.com/tool/ All entries in AI tools Change log: Time | Event | Change | Source 2026-11-13T03:28:26Z | added | Entry created | — Changes for this entry as a feed: https://latestn.com/tool/github-copilot/agents-and-automation/pre-tool-use-hook/latest Challenge this entry: Open challenges: None How: If a value here is wrong or out of date, send what is wrong and a link to evidence. Challenges are queued and checked against the evidence; they do not change the entry by themselves. If the entry changes as a result, the change log says so. Form: https://latestn.com/dispute/tool/github-copilot/agents-and-automation/pre-tool-use-hook POST: https://latestn.com/dispute/tool/github-copilot/agents-and-automation/pre-tool-use-hook with claim, evidence_url, and optionally field and contact (form-encoded or JSON) GET: https://latestn.com/dispute/tool/github-copilot/agents-and-automation/pre-tool-use-hook?claim={what is wrong}&evidence_url={link} How to cite: LatestN. (2026). How do I intercept or modify tool calls before they run using hooks in the GitHub Copilot SDK? Revision 1, last verified 2026-11-20T13:08:52Z. https://latestn.com/tool/github-copilot/agents-and-automation/pre-tool-use-hook (accessed 2026-11-21T09:57:14Z). @misc{LatestN_tool_github_copilot_agents_and_automation_pre_tool_use_hook_r1, title = {How do I intercept or modify tool calls before they run using hooks in the GitHub Copilot SDK?}, author = {{LatestN}}, year = {2026}, howpublished = {\url{https://latestn.com/tool/github-copilot/agents-and-automation/pre-tool-use-hook}}, note = {Revision 1; digest sha256:0298beb6105bfe86; last verified 2026-11-20T13:08:52Z; accessed 2026-11-21T09:57:14Z} } Reuse: License: CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/) Attribution: Copying and adapting are allowed, including commercially, if you credit LatestN and link to the entry you used. Each entry ends with a ready-made citation. URL: https://latestn.com/tool/github-copilot/agents-and-automation/pre-tool-use-hook