Skip to main content
Glama

Validate manual SEI CERT findings

validate_findings
Read-onlyIdempotent

Validates manual code-review findings before formatting, accepting or rejecting each by rule ID, quote, file, line, message, profile, and packet hunk bounds.

Instructions

Accept or reject findings written from a build_review_packet review, with reasons. A finding passes only if its rule_id exists (C++ rules are rejected on .c files, MISRA C rules on C++ files), its quote is a passage of 20+ characters found in that rule's text or examples (case, whitespace, curly quotes and markdown are normalised; MISRA/AUTOSAR need a quote only when a licensed rule-texts file is loaded, otherwise accepted findings carry grounding='rule-id-only'), it has a file, a line >= 1 and a message, and the profile does not disable the rule. With packet, the line must also fall inside a hunk whose candidate_rules include the rule. Use on every manual finding before format_findings; check_files and check_diff output needs no validation. Pure computation on the arguments; reads no files.

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": {
      "findings": "<findings>"
    },
    "name": "validate_findings"
  }
}

Input Schema

NameRequiredDescriptionDefault
packetNoThe build_review_packet result (or just {hunks}) to enforce hunk and candidate-rule bounds. Strongly recommended.
profileNoReview profile: 'default' (plain SEI CERT), 'ceph' (Ceph severities, suppressions and idioms), 'misra' (MISRA C:2012 + MISRA C++:2023), 'autosar' (AUTOSAR C++14) or an absolute path to a profile .yaml file.default
findingsYesFindings to check; an empty list is valid.

Output Schema

NameRequiredDescriptionDefault
summaryYes{accepted, rejected} counts.
acceptedYesGrounded findings in the check_files finding shape plus quote and fix; pass to format_findings.
rejectedYes{finding, reasons[]} for each rejected finding.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.4.1

TDQS

A4.6/5.0
Behavior4/5

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

Annotations already declare readOnlyHint/idempotentHint true and openWorldHint/destructiveHint false; the description reinforces this with 'Pure computation on the arguments; reads no files.' It goes further by disclosing acceptance logic that is not in any structured field: rule/file-type mismatches rejected, quote normalisation, the MISRA/AUTOSAR licensed-text condition, and the resulting grounding='rule-id-only' output value. It stops short of describing the accept/reject result shape, but an output schema exists to carry that.

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

Conciseness4/5

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

Front-loaded with the action, then the acceptance criteria in one dense paragraph. Nearly every clause carries information (the rule-id/file-type cross-check, normalisation, licensed-text exception), though the nested parentheticals make it harder to scan than a short bulleted criteria list would be.

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

Completeness5/5

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

For a complex validator with three parameters, an output schema, and non-obvious conditional logic, the description supplies the full acceptance checklist, the workflow position, and the purity guarantee. An agent has everything needed to decide whether to call it and how to construct valid findings.

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

Parameters4/5

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

Schema coverage is 100%, so the baseline is 3, but the description adds real meaning beyond the schema: `packet` is what enforces hunk bounds and candidate_rules membership ('the line must also fall inside a hunk whose candidate_rules include the rule'), and `profile` is tied to a concrete effect ('the profile does not disable the rule'). The quote/file/line/message requirements are largely restated from the schema, which caps it below 5.

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?

States a specific verb pair ('Accept or reject') and resource ('findings written from a build_review_packet review'), plus the consequence ('with reasons'). It also distinguishes itself from siblings by naming format_findings, check_files and check_diff, so an agent can place it in the workflow without opening another schema.

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

Usage Guidelines5/5

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

Explicit sequencing guidance: 'Use on every manual finding before format_findings' and an explicit exclusion: 'check_files and check_diff output needs no validation.' That is both a when-to-use and a when-not-to-use statement, leaving little to infer.

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