Skip to content

Comments

Remove jq filter support from MCP server tools#14887

Merged
pelikhan merged 4 commits intomainfrom
copilot/remove-jq-arguments-support
Feb 11, 2026
Merged

Remove jq filter support from MCP server tools#14887
pelikhan merged 4 commits intomainfrom
copilot/remove-jq-arguments-support

Conversation

Copy link
Contributor

Copilot AI commented Feb 11, 2026

The jq parameter 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 - removed JqFilter field
  • Removed ApplyJqFilter() calls from tool handlers
  • Updated tool descriptions to remove jq parameter documentation

Deleted jq infrastructure:

  • pkg/cli/jq.go - ApplyJqFilter() function and logger
  • pkg/cli/jq_test.go, pkg/cli/jq_integration_test.go, pkg/cli/audit_jq_test.go
  • Removed jq-specific test cases from MCP server tests

Updated logs guardrail:

  • Removed SuggestedJqQuery type and getSuggestedJqQueries() function
  • Guardrail now suggests using max_tokens parameter and native filters (workflow_name, start_date, count) instead of jq

Example

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

Remove all jq arguments in mcp-server and all jq support in the mcp-server command. The jq variable is not needed anymore.


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

- 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
Copilot AI requested a review from pelikhan February 11, 2026 05:12
@pelikhan pelikhan marked this pull request as ready for review February 11, 2026 05:14
Copilot AI review requested due to automatic review settings February 11, 2026 05:14
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 JqFilter field 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_tokens parameter 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.

@pelikhan pelikhan merged commit 10591ad into main Feb 11, 2026
51 checks passed
@pelikhan pelikhan deleted the copilot/remove-jq-arguments-support branch February 11, 2026 06:03
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.

2 participants