Skip to content

Large MCP response (~13.3k tokens), this can fill up context quickly #302

Closed

Description

@xucian

constantly getting really large logs from console I suppose. this is a simple project, just a few logs here and there for debugging. I can see this easily getting to 500k-1m tokens on larger projects
is there any plan to more efficiently extract logs? I assume you're getting hte full stack trace which is rarely needed, but then again 13k tokens is quite large for my 20-30 log lines

Activity

  1. msanatan commented on Oct 3, 2025

    @msanatan
    Member

    It may be addressed in #287, but I'll leave this issue to track it

  2. dsarno commented on Oct 4, 2025

    @dsarno
    Collaborator

    This PR #304 fixes read_console so you can set stacktrace parameter to false correctly, should result in shorter console logs on read_console. Not sure if that's what you're referring to with the log jamming?

  3. msanatan commented on Oct 10, 2025

    @msanatan
    Member

    This PR #304 fixes read_console so you can set stacktrace parameter to false correctly, should result in shorter console logs on read_console. Not sure if that's what you're referring to with the log jamming?

    @xucian can you try again, as this fix came in?

  4. added
    enhancement
    on Oct 10, 2025
  5. wilg commented on Nov 1, 2025

    @wilg

    I have similar problems with get_hierarchy on a large scene. Should the tools encourage pagination or filtering?

  6. AndreMessier commented on Dec 23, 2025

    @AndreMessier

    I get a similar issue when running unit tests. It looks like the MCP returns the full dump of results. Would it be possible for the unit testing actions to include a "run all returning only pass/fail" and then another that can run a specific test and return the dump from just that one?

  7. msanatan commented on Dec 30, 2025

    @msanatan
    Member

    @xucian @wilg @AndreMessier can you update to the latest version and let us know? There has been some improvements when it comes to handling large scenes and console output

  8. AndreMessier commented on Dec 31, 2025

    @AndreMessier

    @xucian @wilg @AndreMessier can you update to the latest version and let us know? There has been some improvements when it comes to handling large scenes and console output

    For my Unit Test scenario it still reports the error about exceeding the maximum allowed tokens but it then does a search for "summary" and then a powershell GET-CONTENT, which appears to get the results I'm interested. I don't know if that is the fix you implemented or Claude trying something different after the first try failed but I'm now getting the desired results.

  9. dsarno commented on Dec 31, 2025

    @dsarno
    Collaborator

    @xucian @wilg @AndreMessier can you update to the latest version and let us know? There has been some improvements when it comes to handling large scenes and console output

    For my Unit Test scenario it still reports the error about exceeding the maximum allowed tokens but it then does a search for "summary" and then a powershell GET-CONTENT, which appears to get the results I'm interested. I don't know if that is the fix you implemented or Claude trying something different after the first try failed but I'm now getting the desired results.

    Hiya. Thanks for testing. I didn't do any optimizing to the run_test tool, so it still dumps a ton of unfiltered results to the server. We could still clean that up as a separate improvement.

  10. dsarno commented on Jan 2, 2026

    @dsarno
    Collaborator

    This should now be fixed for all of the tools that return large amounts of data – – including test running, which now returns a short summary by default.

    Read_console may still return large payloads, if there are a lot of console messages, but you can also ask the tool to only return a fixed number, like 10 or 20.
    So I will close this one now. Thanks again.

  11. xucian commented on Jan 4, 2026

    @xucian
    Author

    can't you see the obvious issue? the full stack trace is occupying a huge amount of the context. i could never have more than 10-15 logs at once, which is silly. debug flows for most serious projects are at least 100 lines, that should be easy to extract if you don't include the stack trace (maybe just the last 2-3 lines), this should be configurable or the mcp should know when to use stacktraces and when not (most of the time, it shouldn't, imo)

  12. dsarno commented on Jan 4, 2026

    @dsarno
    Collaborator

    There is a parameter to exclude stack trace. Please try it. But yes it's true it should default to off.

  13. dsarno commented on Jan 4, 2026

    @dsarno
    Collaborator

    @xucian this would be a pretty straightforward PR if you want to optimize read_console. Just sayin -- you could be the one to finally close out this long running issue.

  14. dsarno commented on Jan 4, 2026

    @dsarno
    Collaborator

    @xucian nevermind did it for u bro #511

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancement

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions