Remove jq filter support from MCP server tools#14887
Merged
Conversation
- Remove JqFilter field from status, compile, logs, and audit tools - Remove ApplyJqFilter function and jq.go file - Remove jq-related test files (jq_test.go, jq_integration_test.go, audit_jq_test.go) - Update mcp_logs_guardrail to remove jq query suggestions - Update tool descriptions to remove jq parameter mentions - Update tests to remove jq filter test cases Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Remove all jq arguments and support in mcp-server
Remove jq filter support from MCP server tools
Feb 11, 2026
Contributor
There was a problem hiding this comment.
Pull request overview
This PR removes jq filter support from all MCP server tools (status, compile, logs, audit) as the jq parameter is no longer needed. Users should now use the max_tokens parameter and native filtering options instead of post-processing with jq.
Changes:
- Removed
JqFilterfield from all MCP tool argument structs (statusArgs, compileArgs, logsArgs, auditArgs) - Deleted entire jq infrastructure including jq.go and all jq-related test files
- Updated logs guardrail to suggest
max_tokensparameter and native filters instead of jq queries
Reviewed changes
Copilot reviewed 10 out of 10 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| pkg/cli/mcp_server.go | Removed JqFilter field from all tool arg structs, removed ApplyJqFilter() calls, updated tool descriptions |
| pkg/cli/mcp_logs_guardrail.go | Removed SuggestedJqQuery type and getSuggestedJqQueries() function, updated guardrail messages |
| pkg/cli/mcp_logs_guardrail_test.go | Removed tests for suggested jq queries, updated test expectations |
| pkg/cli/mcp_server_defaults_test.go | Removed JqFilter field from test compileArgs struct |
| pkg/cli/mcp_server_compile_test.go | Removed jq filter test cases (valid and invalid jq filters) |
| pkg/cli/mcp_server_json_integration_test.go | Removed jq filter integration test |
| pkg/cli/jq.go | Deleted - contained ApplyJqFilter() function |
| pkg/cli/jq_test.go | Deleted - unit tests for jq filtering |
| pkg/cli/jq_integration_test.go | Deleted - integration tests for jq filtering with MCP server |
| pkg/cli/audit_jq_test.go | Deleted - audit-specific jq filter tests |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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.
The
jqparameter was available on all MCP server tools (status, compile, logs, audit) to filter JSON output. This parameter is no longer needed.Changes
Removed JqFilter parameter from all tools:
statusArgs,compileArgs,logsArgs,auditArgs- removedJqFilterfieldApplyJqFilter()calls from tool handlersDeleted jq infrastructure:
pkg/cli/jq.go-ApplyJqFilter()function and loggerpkg/cli/jq_test.go,pkg/cli/jq_integration_test.go,pkg/cli/audit_jq_test.goUpdated logs guardrail:
SuggestedJqQuerytype andgetSuggestedJqQueries()functionmax_tokensparameter and native filters (workflow_name, start_date, count) instead of jqExample
Before:
{ "name": "status", "arguments": { "pattern": "*.md", "jq": ".[].workflow" } }After:
{ "name": "status", "arguments": { "pattern": "*.md" } }Users should use native filtering parameters or adjust output size limits rather than post-processing with jq.
Original prompt
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.