[UPDATE PRIMITIVE] codeql_bqrs_decode tool support for singular file OR list of files#303
Open
Copilot wants to merge 4 commits into
Open
[UPDATE PRIMITIVE] codeql_bqrs_decode tool support for singular file OR list of files#303Copilot wants to merge 4 commits into
codeql_bqrs_decode tool support for singular file OR list of files#303Copilot wants to merge 4 commits into
Conversation
Copilot
AI
changed the title
[WIP] Fix codeql_bqrs_decode to accept files array argument
[UPDATE PRIMITIVE] Accept singular Jun 20, 2026
file argument in codeql_bqrs_decode
Contributor
Dependency Review✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.Scanned FilesNone |
Contributor
There was a problem hiding this comment.
Pull request overview
This PR updates the codeql_bqrs_decode MCP server tool contract to accept a singular file argument (in addition to files), aligning the advertised schema with the existing registry normalization, and adds tests/docs plus a rebuilt server bundle.
Changes:
- Extend
codeql_bqrs_decodeinput schema to support optionalfileand optionalfiles. - Add a runtime guard for
codeql_bqrs_*tools to produce a clearer “file/files required” error when no BQRS path is provided. - Add unit + integration test coverage and update
CHANGELOG.md(plus rebuiltserver/distbundle).
Show a summary per file
| File | Description |
|---|---|
| server/src/tools/codeql/bqrs-decode.ts | Advertises file (singular) alongside files (plural) in the tool input schema. |
| server/src/lib/cli-tool-registry.ts | Adds a BQRS-tool guard error when no positional BQRS path is provided. |
| server/test/src/tools/codeql/bqrs-decode.test.ts | Adds schema-level tests to ensure both file and files parse. |
| server/test/src/lib/cli-tool-registry.test.ts | Adds handler-level tests for file/files normalization and missing-path error behavior. |
| client/integration-tests/primitives/tools/codeql_bqrs_decode/decode_singular_file/test-config.json | New integration test config exercising the singular file argument path. |
| client/integration-tests/primitives/tools/codeql_bqrs_decode/decode_singular_file/README.md | Documents the new integration test’s purpose/inputs/outputs. |
| client/integration-tests/primitives/tools/codeql_bqrs_decode/decode_singular_file/before/monitoring-state.json | New fixture (legacy) for integration test directory structure. |
| client/integration-tests/primitives/tools/codeql_bqrs_decode/decode_singular_file/after/monitoring-state.json | New fixture (legacy) for integration test directory structure. |
| server/dist/codeql-development-mcp-server.js | Rebuilt bundled server output reflecting the TypeScript changes. |
| CHANGELOG.md | Adds an Unreleased “Fixed” entry for the file vs files schema mismatch. |
Copilot's findings
- Files reviewed: 9/12 changed files
- Comments generated: 3
Co-authored-by: data-douser <70299490+data-douser@users.noreply.github.com>
Co-authored-by: data-douser <70299490+data-douser@users.noreply.github.com>
9d62125 to
1bbb282
Compare
file argument in codeql_bqrs_decodecodeql_bqrs_decode tool support for singular file OR a list of files
codeql_bqrs_decode tool support for singular file OR a list of filescodeql_bqrs_decode tool support for singular file OR list of files
data-douser
approved these changes
Jun 23, 2026
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.
This pull request improves the usability and robustness of the
codeql_bqrs_decodetool by allowing it to accept both a singularfileargument and a pluralfilesarray, addressing issues encountered by automated and LLM-based clients. It also adds clear error handling when neither argument is provided, updates the tool schema and documentation, and introduces regression and unit tests to ensure correct behavior.Key changes:
Tool Input Handling & Validation
codeql_bqrs_decodetool definition to accept either a singularfile(string) or pluralfiles(array) argument, with both being optional but at least one required. This improves compatibility with clients that naturally provide a single file path.fileandfilesarguments and to throw a clear, actionable error naming both parameters if neither is supplied, instead of a generic schema error. Whitespace-only paths are treated as missing.Testing & Regression Coverage
fileandfilesarguments are accepted, that missing or whitespace-only arguments produce clear errors, and that the correct positional arguments are passed to the CLI. [1] [2]decode_singular_file) to ensure the tool correctly decodes a BQRS file when provided with a singularfileargument. [1] [2] [3] [4]Documentation & Changelog
fileargument and the improved error message, referencing the relevant issues and pull requests.Miscellaneous
fileandfilesproperties and their correct validation in the input schema. [1] [2]