vscode-copilot-release icon indicating copy to clipboard operation
vscode-copilot-release copied to clipboard

Reason: You may not include more than 128 tools in your request.

Open isma381 opened this issue 6 months ago • 24 comments

Type: Bug

Reason: You may not include more than 128 tools in your request.

Extension version: 0.28.1 VS Code version: Code 1.101.1 (18e3a1ec544e6907be1e944a94c496e302073435, 2025-06-18T13:35:12.605Z) OS version: Windows_NT x64 10.0.22631 Modes:

System Info
Item Value
CPUs Intel(R) Celeron(R) N4020 CPU @ 1.10GHz (2 x 1094)
GPU Status 2d_canvas: enabled
canvas_oop_rasterization: enabled_on
direct_rendering_display_compositor: disabled_off_ok
gpu_compositing: enabled
multiple_raster_threads: disabled_off
opengl: enabled_on
rasterization: enabled
raw_draw: disabled_off_ok
skia_graphite: disabled_off
video_decode: enabled
video_encode: enabled
vulkan: disabled_off
webgl: enabled
webgl2: enabled
webgpu: enabled
webnn: disabled_off
Load (avg) undefined
Memory (System) 3.83GB (0.38GB free)
Process Argv --crash-reporter-id e4e19830-106e-4220-996d-441c24b01d17
Screen Reader no
VM 0%
A/B Experiments
vspor879:30202332
vspor708:30202333
vspor363:30204092
binariesv615:30325510
c4g48928:30535728
962ge761:30959799
pythontbext0:30879054
cppperfnew:31000557
pythonrstrctxt:31112756
5fd0e150:31155592
dwcopilot:31170013
6074i472:31201624
dwoutputs:31242946
customenabled:31248079
pythoneinst12:31285622
bgtreat:31268568
4gafe986:31271826
c7cif404:31314491
996jf627:31283433
usemplatestapi:31297334
7bj51361:31289155
aj953862:31281341
generatesymbolt:31295002
convertfstringf:31295003

isma381 avatar Jun 21 '25 15:06 isma381

same.

Sorry, your request failed. Please try again. Request id: 604bb80d-3777-4cba-bca5-f742f4a7e734

Reason: You may not include more than 128 tools in your request.

joseehilton147 avatar Jun 22 '25 20:06 joseehilton147

I experienced the same frustration and confusion. While in Agent mode, I selected the tools icon in the lower right corner of the GH Copilot Chat window and then deselected many of the listed MCPs. VSCode automatically scooped up MCP definitions from Claude's MCP.json file and added other defaults for Azure MCP tools. After removing many of the listed MCPs I did not need for this project, it now works.

leifulstrup avatar Jun 25 '25 15:06 leifulstrup

Working on a project to learn how to build MCP services and just ran into this. The error says You may not include more than 128 tools in your request but the number is lower than that. The highest number that I could get to work w/o getting this error is 116 (Using Claude Sonnet 4).

Image

Image

wrenchpilot avatar Jun 25 '25 18:06 wrenchpilot

I got the same error:

Image

Solution:

I fixed it by selecting less than 128 tools:

Image
Image
Image

JuanPabloDiaz avatar Jul 14 '25 22:07 JuanPabloDiaz

could someone share the root cause code lines if you have? I want to learn why it is 128. I tried to search code in GitHub with full text match "You may not include more than 128 tools in your request." but I cannot find any related code. Is it model/llm engine specifical issue?

caigen avatar Jul 15 '25 02:07 caigen

I can confirm that IntelliJ users are experiencing the same issue. I've recreated the issue in both VS Code and IntelliJ (with the same prompt). IntelliJ shows the following error:

"Oops, maximum tool attempts reached. You can type 'continue' to proceed or rephrase your request."

Also, when I recreated the error in VS Code, I confirmed that I have only 125 tools installed. The 'too many tool's error also displayed after I deselected all but the default tools (22 total).

IntelliJ GHC plugin version: 1.5.50-243 VS Code GHC extension version: 1.344.0 VS Code GHC Chat extension version: 0.29.1

sdbroscious avatar Jul 17 '25 23:07 sdbroscious

Why the limit, can't the agent select only the relevant tools itself based on the task context?

robertdewilde-dev avatar Jul 19 '25 12:07 robertdewilde-dev

I also had to reduce it to 116

evebrennan avatar Jul 23 '25 16:07 evebrennan

I got the same error:

Image ## Solution: I fixed it by selecting less than 128 tools: Image Image Image

Esto es todo no le busquen mas pelos al gato.

juanfer1a avatar Jul 24 '25 20:07 juanfer1a

Having such a low limit on tools restricts the capabilities of the MCP.

jsolisu avatar Jul 27 '25 00:07 jsolisu

This is a real issue, e.g., Microsoft's own #azure-devops and #playwright add more than 128 tools.

noseratio avatar Jul 28 '25 21:07 noseratio

Ran into this this morning after updating to 117. Followed JuanPabloDiaz instructions above to fix. The vs code azure tool plugin alone brings you near 128. The cap or azure toolkit vs code extension one need reworked.

recipesort-dev avatar Jul 29 '25 17:07 recipesort-dev

This is a real issue, e.g., Microsoft's own #azure-devops and #playwright add more than 128 tools.

Agree, adding the GitHub MCP added so many tools at once, that the limit was reached for me. Why is there a 128 limit at all?

mathiaswillburger avatar Jul 29 '25 23:07 mathiaswillburger

There is a way to configure a limited list of tools which would persist and won't get reset each time we click "Refresh tools" icon in Copilot chat. That can be done with Custom Modes, works for me with @burkeholland's excellent Beast Mode.

noseratio avatar Jul 29 '25 23:07 noseratio

VS Code Insiders now has an option for this, but it's still capped at 128.

GitHub › Copilot › Chat › Virtual Tools: Threshold This setting defines the tool count over which virtual tools should be used. Virtual tools group similar sets of tools together and they allow the model to activate them on-demand. Certain tool groups will optimistically be pre-activated. We are actively developing this feature and you experience degraded tool calling once the threshold is hit. May be set to 0 to disable virtual tools.

Image

wrenchpilot avatar Jul 30 '25 23:07 wrenchpilot

The number of enabled tools must be displayed in the chat dialog and tools provided by extensions must be opt-in if you won't mitigate the limit.

tats-u avatar Aug 07 '25 06:08 tats-u

this is the response from Copilot: Currently, there is no built-in way for users to create a persistent "profile" of selected tools or to change the default so that all tools are not auto-selected for every request.

Key points:

The auto-selection of all tools is a default behavior of the Copilot interface. There is no user-accessible setting to change this default or save a custom tool selection profile. You must manually deselect tools each time, as there is no "remember my selection" feature at this time. If this workflow is causing issues, the best action is to submit feedback directly through the Copilot extension or GitHub feedback channels. This helps the product team prioritize improvements.

Let me know if you need instructions on how to submit feedback or if you have any other questions!

sponsorrockit1 avatar Aug 07 '25 14:08 sponsorrockit1

you can select your mentioned tools in your project and use it , just cancel the selection of other tools that you don't wanna use

linux-best avatar Aug 22 '25 12:08 linux-best

you can select your mentioned tools in your project and use it , just cancel the selection of other tools that you don't wanna use

Pain in the neck to turn off unnecessary ones every time.

tats-u avatar Aug 22 '25 12:08 tats-u

What if we increase the count for the virtual tools, will it impact in the performance of the copilot chat ? or Take more usage of tokens ?

gauravb2503 avatar Sep 18 '25 03:09 gauravb2503

https://demiliani.com/2025/09/04/model-context-protocol-and-the-too-many-tools-problem/

Since the MCPs required for each Copilot chat session can vary, they need to be managed for context in every session. However, currently, having to click the settings button and check the MCP groups for each session feels cumbersome. It would be nice to have a more visible and convenient way to handle this.

CatsMiaow avatar Oct 16 '25 03:10 CatsMiaow

I unchecked and removed the number of tools to 42, but still I get the same message that I can't have more than 128 tools. Do I need to do something after I uncheck the boxes? I'm talking about JuanPabloDiaz solution

jonbra avatar Oct 29 '25 13:10 jonbra

And now we're getting warning noise in the UI to tell us that you can't cope with more than 128 tools locally with no way to suppress this message. Am I meant to check that warning icon every few hours to make sure that it's not warning me of something that is actually a problem? Why do you assume I have time or mental space for that?

Please provide a way to suppress this message or a better explanation of the impact of setting the threshold to zero because it reads like setting to zero will turn off GitHub Copilot's use of virtual tools altogether and, I assume, we wouldn't want to do that...

I've been using the same toolset, more or less, for years now, without it degrading my workflow & don't have any MCP servers installed: this is all coming from pre-existing extensions. Why does the introduction of "AI" solutions bring with it these negatives?

The VS Code setting that's causing this:

GitHub › Copilot › Chat › Virtual Tools: Threshold
This setting defines the tool count over which virtual tools should be used. Virtual tools group similar sets of tools together and they allow the model to activate them on-demand. Certain tool groups will optimistically be pre-activated. We are actively developing this feature and you experience degraded tool calling once the threshold is hit.

May be set to 0 to disable virtual tools.

I've just taken a closer look at this and the tools that are selected appear to have all been selected by your artificial "intelligence". How am I supposed to know which ones to turn off? And why do you assume I have the time to research this? All of those tools have been added by GitHub CoPilot, or you've allowed extensions to add themselves. I haven't touched this.

We are in a position of having to use these tools to keep up with the advances but you are letting us down with these sorts of changes. Many of us take warning message very seriously and strive to ensure that there aren't any so that critical warnings can be dealt with professionally.

Please sort this out as a matter of urgency.

lukkea avatar Nov 11 '25 06:11 lukkea

Let me know if you need instructions on how to submit feedback or if you have any other questions!

@sponsorrockit1 yes, please let me know how to submit more direct feedback about this.

lukkea avatar Nov 11 '25 06:11 lukkea

I have 158 tools that I need to use. Why is the limit set to 128 and hard-coded in the vscode?

pchmielewski1 avatar Dec 06 '25 00:12 pchmielewski1

Thank you for filing the issue! This should be fixed now. Otherwise, please file a new issue with repro steps at https://github.com/microsoft/vscode/issues

ulugbekna avatar Dec 11 '25 13:12 ulugbekna