Sanitize noisy MCP text fields by default
Clean control and invisible junk from tool result text fields to reduce token waste while preserving readable Unicode. Add an MCP_TEXT_SANITIZATION toggle and regression tests for enabled and disabled behavior.
This commit is contained in:
@@ -298,6 +298,11 @@ and IDs. Authorization headers, bearer tokens, and Redmine API keys are not
|
||||
logged. MCP tool output also redacts credential fields returned by Redmine, such
|
||||
as `api_key`.
|
||||
|
||||
Tool output text sanitization is enabled by default to reduce token waste from
|
||||
invisible/control junk in fetched issue text. This cleanup preserves readable
|
||||
Unicode and targets fields such as `description`, `notes`, `content`, and
|
||||
message body text. Set `MCP_TEXT_SANITIZATION=false` to disable it.
|
||||
|
||||
Example stdio client configuration:
|
||||
|
||||
```json
|
||||
|
||||
Reference in New Issue
Block a user