Skip to main content
Glama

get_sarif

Run GauntletCI on a .NET repository to generate a SARIF 2.1.0 report for integration with GitHub Advanced Security or VS Code SARIF viewer.

Instructions

Run GauntletCI and return a SARIF 2.1.0 report. Useful for feeding into tools that consume SARIF (GitHub Advanced Security, VS Code SARIF viewer, etc.).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
workingDirectoryYesAbsolute path to the .NET repository root.

Implementation Reference

  • Handler for the 'get_sarif' tool. Calls runGauntletCI with outputFormat='sarif' and returns the raw SARIF output.
    if (name === "get_sarif") {
      const { output, exitCode } = runGauntletCI(workingDirectory, sensitivity, "sarif");
      if (exitCode !== 0 && exitCode !== 1) {
        return {
          content: [{ type: "text", text: `GauntletCI error (exit ${exitCode}): ${output}` }],
          isError: true,
        };
      }
      return { content: [{ type: "text", text: output }] };
    }
  • Tool registration with input schema for 'get_sarif'. Requires 'workingDirectory' (string). No 'sensitivity' param.
    {
      name: "get_sarif",
      description:
        "Run GauntletCI and return a SARIF 2.1.0 report. Useful for feeding into tools that consume SARIF (GitHub Advanced Security, VS Code SARIF viewer, etc.).",
      inputSchema: {
        type: "object",
        properties: {
          workingDirectory: {
            type: "string",
            description: "Absolute path to the .NET repository root.",
          },
        },
        required: ["workingDirectory"],
      },
    },
  • src/index.ts:83-142 (registration)
    The tool is registered via ListToolsRequestSchema handler in the tools array at index 2 (position 3).
    server.setRequestHandler(ListToolsRequestSchema, async () => ({
      tools: [
        {
          name: "analyze_commit",
          description:
            "Run GauntletCI behavioral change risk analysis on the current HEAD commit in a .NET repository. Returns findings as structured text.",
          inputSchema: {
            type: "object",
            properties: {
              workingDirectory: {
                type: "string",
                description: "Absolute path to the .NET repository root.",
              },
              sensitivity: {
                type: "string",
                enum: ["strict", "balanced", "permissive"],
                description: "Risk sensitivity filter. Default: balanced.",
                default: "balanced",
              },
            },
            required: ["workingDirectory"],
          },
        },
        {
          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"],
          },
        },
        {
          name: "get_sarif",
          description:
            "Run GauntletCI and return a SARIF 2.1.0 report. Useful for feeding into tools that consume SARIF (GitHub Advanced Security, VS Code SARIF viewer, etc.).",
          inputSchema: {
            type: "object",
            properties: {
              workingDirectory: {
                type: "string",
                description: "Absolute path to the .NET repository root.",
              },
            },
            required: ["workingDirectory"],
          },
        },
      ],
    }));
  • Helper function runGauntletCI that spawns the 'gauntletci analyze' CLI with the given output format (including 'sarif').
    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,
      };
    }
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries full burden for behavioral traits. It discloses the action (running GauntletCI) and output format, but omits important details such as destructive potential, authorization needs, rate limits, or side effects. The agent is left uninformed about operational risks.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Two sentences, highly concise, with the primary action and a practical use case front-loaded. No extraneous text or repetition.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's simplicity (single required parameter, no output schema), the description adequately explains what it does and a common use case. However, missing behavioral context prevents a perfect score, as some agents may need hints about whether the tool is safe or requires permissions.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100% and the description does not add meaning beyond the input schema's definition of 'workingDirectory'. While the schema already describes the parameter, the description repeats no additional context, so it meets the baseline but does not exceed.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

Clearly states the specific action: running GauntletCI and returning a SARIF 2.1.0 report. The verb 'run' and output format 'SARIF 2.1.0 report' provide a precise purpose. It distinguishes from sibling tools like 'analyze_commit' and 'get_findings_json' by focusing on SARIF output.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Mentions usefulness for tools consuming SARIF (e.g., GitHub Advanced Security), which gives context but does not explicitly specify when to use this tool versus alternatives. No exclusions or when-not-to-use guidance are provided.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/EricCogen/GauntletCI-MCP'

If you have feedback or need assistance with the MCP directory API, please join our Discord server