Skip to content

Note: Per-tool jq response filters already implemented via PR #5273#5333

Closed
Copilot wants to merge 1 commit into
mainfrom
copilot/gateway-per-tool-jq-filters
Closed

Note: Per-tool jq response filters already implemented via PR #5273#5333
Copilot wants to merge 1 commit into
mainfrom
copilot/gateway-per-tool-jq-filters

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented May 8, 2026

Issue #5270 requested per-tool jq response filters to reduce token bloat from large MCP tool responses (e.g., list_code_scanning_alerts where rule.help repeats full CWE docs per alert).

This feature was fully implemented and merged in PR #5273. No additional changes needed — the implementation is already live:

  • Config: ToolResponseFilters map[string]string on ServerConfig (TOML + stdin JSON)
  • Validation: jq expressions compiled at startup; invalid filters fail fast
  • Pipeline: filters applied in jqschema middleware before payload preview/schema generation
  • Tests: coverage in jqschema_test.go and config/validation_test.go
[servers.github.tool_response_filters]
list_code_scanning_alerts = "map(del(.rule.help))"
list_secret_scanning_alerts = "map(del(.push_protection_bypassed_by))"

Copilot AI linked an issue May 8, 2026 that may be closed by this pull request
Copilot AI changed the title [WIP] Update per-tool jq response filters to reduce token bloat Note: Per-tool jq response filters already implemented via PR #5273 May 8, 2026
Copilot finished work on behalf of lpcox May 8, 2026 16:06
Copilot AI requested a review from lpcox May 8, 2026 16:06
@lpcox lpcox closed this May 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[gateway] Per-tool jq response filters to reduce token bloat

2 participants