You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: extensions/vscode/package.json
+5Lines changed: 5 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -90,6 +90,11 @@
90
90
"default": true,
91
91
"markdownDescription": "Copy CodeQL databases from the `GitHub.vscode-codeql` extension storage into a managed directory, removing query-server lock files so the MCP server CLI can operate without contention. Disable to use databases in-place (may fail when the CodeQL query server is running)."
92
92
},
93
+
"codeql-mcp.enableAnnotationTools": {
94
+
"type": "boolean",
95
+
"default": true,
96
+
"markdownDescription": "Enable annotation, audit, and query results caching tools. When enabled, the MCP server registers `annotation_*`, `audit_*`, and `query_results_cache_*` tools. Disable to reduce the tool surface if these capabilities are not needed."
@@ -187501,7 +187533,16 @@ function registerCLITool(server, definition) {
187501
187533
if (name === "codeql_test_run") {
187502
187534
options["keep-databases"] = true;
187503
187535
}
187504
-
result = await executeCodeQLCommand(subcommand, options, [...positionalArgs, ...userAdditionalArgs], cwd);
187536
+
let dbLock;
187537
+
if (name === "codeql_database_analyze" && positionalArgs.length > 0) {
187538
+
dbLock = acquireDatabaseLock(positionalArgs[0]);
187539
+
await dbLock.ready;
187540
+
}
187541
+
try {
187542
+
result = await executeCodeQLCommand(subcommand, options, [...positionalArgs, ...userAdditionalArgs], cwd);
187543
+
} finally {
187544
+
dbLock?.release();
187545
+
}
187505
187546
} else if (command === "qlt") {
187506
187547
result = await executeQLTCommand(subcommand, options, [...positionalArgs, ...userAdditionalArgs]);
187507
187548
} else {
@@ -187654,7 +187695,7 @@ var codeqlBqrsInfoTool = {
187654
187695
command: "codeql",
187655
187696
subcommand: "bqrs info",
187656
187697
inputSchema: {
187657
-
files: external_exports.array(external_exports.string()).describe("BQRS file(s) to examine"),
187698
+
file: external_exports.string().describe("BQRS file to examine"),
187658
187699
format: external_exports.enum(["text", "json"]).optional().describe("Output format: text (default) or json. Use json for machine-readable output and pagination offset computation."),
187659
187700
"paginate-rows": external_exports.number().optional().describe("Compute byte offsets for pagination at intervals of this many rows. Use with --format=json. Offsets can be passed to codeql_bqrs_decode --start-at."),
187660
187701
"paginate-result-set": external_exports.string().optional().describe("Compute pagination offsets only for this result set name"),
@@ -187679,7 +187720,8 @@ var codeqlBqrsInterpretTool = {
187679
187720
file: external_exports.string().describe("The BQRS file to interpret"),
187680
187721
format: external_exports.enum(["csv", "sarif-latest", "sarifv2.1.0", "graphtext", "dgml", "dot"]).describe("Output format: csv (comma-separated), sarif-latest/sarifv2.1.0 (SARIF), graphtext/dgml/dot (graph formats, only for @kind graph queries)"),
187681
187722
output: createCodeQLSchemas.output(),
187682
-
t: external_exports.array(external_exports.string()).describe('Query metadata key=value pairs. At least "kind" and "id" must be specified (e.g., ["kind=graph", "id=js/print-ast"])'),
187723
+
database: external_exports.string().optional().describe("Path to the CodeQL database, used to resolve source archive context for SARIF interpretation (provides file contents and snippets)"),
187724
+
t: external_exports.array(external_exports.string()).describe('Query metadata key=value pairs in KEY=VALUE format. At least "kind" and "id" must be specified. Example: ["kind=problem", "id=js/sql-injection"]. Common keys: kind (problem|path-problem|graph|metric|diagnostic), id (query identifier like js/xss)'),
187683
187725
"max-paths": external_exports.number().optional().describe("Maximum number of paths to produce for each alert with paths (default: 4)"),
187684
187726
"sarif-add-file-contents": external_exports.boolean().optional().describe("[SARIF only] Include full file contents for all files referenced in results"),
187685
187727
"sarif-add-snippets": external_exports.boolean().optional().describe("[SARIF only] Include code snippets for each location with context"),
@@ -193667,16 +193709,35 @@ function registerAuditListFindingsTool(server) {
193667
193709
function registerAuditAddNotesTool(server) {
193668
193710
server.tool(
193669
193711
"audit_add_notes",
193670
-
"Append notes to an existing audit finding. The notes are appended to the annotation content.",
193712
+
"Append notes to an existing audit finding. Identify the finding by findingId (preferred) or by owner+repo+sourceLocation+line.",
sourceLocation: external_exports.string().describe("File path of the finding."),
193675
-
line: external_exports.number().int().min(1).describe("Line number of the finding (integer >= 1)."),
193714
+
findingId: external_exports.number().int().positive().optional().describe("Annotation ID of the finding (returned by audit_store_findings and audit_list_findings). Preferred lookup method."),
193715
+
owner: external_exports.string().optional().describe("Repository owner (required when findingId is not provided)."),
193716
+
repo: external_exports.string().optional().describe("Repository name (required when findingId is not provided)."),
193717
+
sourceLocation: external_exports.string().optional().describe("File path of the finding (required when findingId is not provided)."),
193718
+
line: external_exports.number().int().min(1).optional().describe("Line number of the finding (required when findingId is not provided)."),
193676
193719
notes: external_exports.string().describe("Notes to append.")
0 commit comments