Repository navigation
Conversation
A profile can replace the global tool_response_limit for calls served under it: profiles[].tool_response_limit, where unset inherits, 0 means no limit and a positive number is that many characters. A script that parses whole results gets its own profile and receives text blocks and structuredContent whole, while other callers keep the global bound. The truncator is resolved per call from the effective profile and used by call_tool_*, the legacy call_tool, the direct tools, retrieve_tools, read_cache and the TOON encoder. While output sanitisation is set to block, redact or strip, the global limit still decides when an oversize structured result becomes a text block, so a wider profile limit never carries it past sanitisation. Wired through the REST profile view, the profile change diff, the MCP profiles tool, the CLI (--tool-response-limit, --clear-tool-response-limit) and the Web UI and macOS profile editors, which would otherwise drop a stored limit on save.
… limit; scope the docs
Deploying mcpproxy-docs with
|
| Latest commit: |
73c2f3c
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://417f3b1e.mcpproxy-docs.pages.dev |
| Branch Preview URL: | https://claude-issue-2027-investigat.mcpproxy-docs.pages.dev |
…estigation-1b7baa # Conflicts: # frontend/package-lock.json
Dumbris
enabled auto-merge (squash)
November 24, 2026 13:49
|
Codecov Report❌ Patch coverage is 📢 Thoughts on this report? Let us know! |
Contributor
📦 Build ArtifactsWorkflow Run: View Run Available Artifacts
How to DownloadOption 1: GitHub Web UI (easiest)
Option 2: GitHub CLI gh run download 45391280601 --repo smart-mcp-proxy/mcpproxy-go
|
…aude/issue-2027-investigation-1b7baa # Conflicts: # oas/docs.go
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Since 0.75.0 (#1937)
tool_response_limitalso boundsstructuredContent. That is right for agents, but a local script that parses the JSON itself now gets cut answers, andread_cachecannot rebuild them (it pages one record array and leaves out sibling fields such as@odata.nextLink).This adds the override the issue asks for:
profiles[].tool_response_limit.0: no limit, text blocks andstructuredContentarrive wholeA script gets its own read-only profile with whole answers; chats keep the default bound.
{ "name": "script", "servers": ["workiq", "tickets"], "max_tier": "read", "tool_response_limit": 0 }closes #2027
What changed
internal/config/profiles.go): newToolResponseLimit *int(a pointer, so an explicit0survivesomitempty),EffectiveToolResponseLimit, and a negative value is refused by the one profile validator (fieldtool_response_limit). It is a delivery setting, not policy: it does not make a profile non-legacy.internal/server/profile_response_limit.go): the truncator is resolved per call from the effective profile (truncatorForProfile), and used bycall_tool_read|write|destructive, the legacycall_tool, the direct tools,retrieve_tools,read_cacheand the TOON encoder. A profile that sets no limit, or a name that no longer exists, keeps the live global truncator.structuredWithholdLimit). With sanitisation in its default mode the result stays instructuredContent.ProfileView.tool_response_limit, the profile change diff, the MCPprofilestool schema, CLIprofile create|update --tool-response-limit <n|inherit>/--clear-tool-response-limit/profile try --set tool_response_limit=,profile show.docs/features/profiles.md"Response limit per profile", config reference, CLI and REST references, swagger, changelog.Decisions made without asking
mcpproxy call tool-readhas no profile argument and is unchanged; a script uses/mcp/p/<profile>or a credential bound to the profile.Testing
handleCallToolVariantunder URL, session and pinned profiles against a real in-process upstream (fails without the change), the sanitisation case, direct-mode limit resolution, REST view and diff, CLI flags.structuredContent(300 records plus@odata.nextLink):/mcp(no profile, limit 20000)/mcp/p/chat(inherits)/mcp/p/script(tool_response_limit: 0)@odata.nextLinkpresentA live
profile update chat --tool-response-limit 60000took effect on the next call without a restart.Known, not changed here
Direct mode reads the global limit from the construction-time config, so a hot-reloaded global
tool_response_limitdoes not reach it. That predates this change.