-
Notifications
You must be signed in to change notification settings - Fork 584
Excessive context size for list_commits
: response object has 5-6KB per commit
#142
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
I think this is a general issue with all the tools, I've used |
I guess a good start would be to apply field-filtering in the MCP server to a sane default (minimal set of fields). |
Yes, this is indeed an issue. We are considering several options:
|
Option 3 is the most flexible, but I guess it requires passing the full schema to the model which can also burn tokens quickly. Another option is to let the user select the fields during the mcp setup, and default to minimum fields. |
Good first step in my view as many links and detailed fields can be dropped.
If this causes the number of functions to double, then 1 is better.
Would it help if the custom instructions passed to the LLM included a planning step that lists the fields required to perform the query? This set of fields could then extend the default. |
Describe the bug
When
list_commits()
returns 30 results, the follow-up LLM call will use >64k tokens for repos likezalando/skipper
. This is prone to exceed the context size of LLMs. Users will also run into rate limits from LLM providers:I'm a tier-1 API user for OpenAI.
Affected version
server version v0.1.0 (b89336793c5bc9b9abdd5100d876babbc1031f5d) 2025-04-04T15:38:21
Steps to reproduce the behavior
Who is the most frequent committer in github/github-mcp-server? Use list_commits for the output.
list_commits
returns 30 commits despiteperPage
set to 1 #136 the actual result set has 30 items).Expected vs actual behavior
list_commits()
should apply field filtering on the Github API response. Currently all sorts of data forauthor
,committer
,commit.verification
(incl. signature) is returned which could be optional.Logs
N/A
The text was updated successfully, but these errors were encountered: