get_findings_json
Execute GauntletCI on a .NET repository and retrieve behavioral change risk findings in raw JSON format for programmatic analysis and integration.
Instructions
Run GauntletCI and return the raw JSON result for programmatic processing.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"workingDirectory": "<workingDirectory>"
},
"name": "get_findings_json"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| workingDirectory | Yes | Absolute path to the .NET repository root. | |
| sensitivity | No | balanced |
Implementation Reference
- src/index.ts:106-125 (registration)The 'get_findings_json' tool is registered in the ListToolsRequestSchema handler with its name, description, and inputSchema (workingDirectory and sensitivity).
{ name: "get_findings_json", description: "Run GauntletCI and return the raw JSON result for programmatic processing.", inputSchema: { type: "object", properties: { workingDirectory: { type: "string", description: "Absolute path to the .NET repository root.", }, sensitivity: { type: "string", enum: ["strict", "balanced", "permissive"], default: "balanced", }, }, required: ["workingDirectory"], }, }, - src/index.ts:110-125 (schema)Input schema for get_findings_json: object with workingDirectory (string, required) and sensitivity (enum: strict/balanced/permissive, default: balanced).
inputSchema: { type: "object", properties: { workingDirectory: { type: "string", description: "Absolute path to the .NET repository root.", }, sensitivity: { type: "string", enum: ["strict", "balanced", "permissive"], default: "balanced", }, }, required: ["workingDirectory"], }, }, - src/index.ts:177-186 (handler)Handler logic for 'get_findings_json': calls runGauntletCI with 'json' format, checks exit code (0 or 1 allowed), returns raw JSON output as text.
if (name === "get_findings_json") { const { output, exitCode } = runGauntletCI(workingDirectory, sensitivity, "json"); if (exitCode !== 0 && exitCode !== 1) { return { content: [{ type: "text", text: `GauntletCI error (exit ${exitCode}): ${output}` }], isError: true, }; } return { content: [{ type: "text", text: output }] }; } - src/index.ts:33-52 (helper)The runGauntletCI helper function that spawns the 'gauntletci analyze' CLI process with the given working directory, sensitivity, and output format. Used by get_findings_json handler with format='json'.
export function runGauntletCI( workingDir: string, sensitivity: string, outputFormat: "json" | "sarif" | "text" ): { output: string; exitCode: number } { const result = spawnSync( "gauntletci", ["analyze", "--output", outputFormat, "--no-banner", "--sensitivity", sensitivity, "--no-llm"], { cwd: workingDir, encoding: "utf8", shell: process.platform === "win32", } ); return { output: result.stdout ?? "", exitCode: result.status ?? -1, }; }