Skip to main content
Glama

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault
CERT_REVIEW_HOMENoPath to the cert-review-mcp checkout containing the data/ and profiles/ directories. Defaults to the package checkout.
CERT_REVIEW_AUTOSAR_TEXTSNoPath to your licensed copy of AUTOSAR C++14 guideline texts, used for official headlines and quote validation.
CERT_REVIEW_MISRA_C_TEXTSNoPath to your licensed copy of MISRA C:2012 guideline texts, used for official headlines and quote validation.
CERT_REVIEW_MISRA_CPP_TEXTSNoPath to your licensed copy of MISRA C++:2023 guideline texts, used for official headlines and quote validation.

Instructions

Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.

SEI CERT C/C++ secure-coding review for local source trees. Every tool only reads local files and bundled data and runs local analyzers (clang-tidy, clang, cppcheck, and Semgrep, Infer or CodeQL when installed); nothing is written to the project, uploaded or posted. Rule lookup: list_rules (structured filters), search_rules (keywords), get_rule (one rule's full text), get_rule_coverage (what checkers can detect). Review flow:

  1. review_pr for a git change (preferred), or check_diff for a change, or check_files for whole files or directories; pass baseline_path to hide findings already recorded in a .cert-review-baseline.json. explain_finding turns one finding into a rule summary, the closest CERT example and a fix.

  2. build_review_packet for rules no checker decides; judge each hunk and write findings that cite a candidate rule_id and quote that rule's text verbatim.

  3. validate_findings to drop ungrounded findings.

  4. format_findings to draft markdown, GitHub or GitLab review payloads, SARIF or GitLab reports. format_pr_review merges check_diff + build_review_packet into one PR comment with hints and style nits. Use absolute paths and profile "ceph" for Ceph trees. A tool status "partial" or non-empty warnings means some files did not compile or timed out, so a clean result is not proof. MISRA C:2012, MISRA C++:2023 and AUTOSAR C++14: pass standard to the lookup tools or standards (or profile "misra" / "autosar") to check_files and check_diff. Their official texts are copyrighted and not bundled (IDs, classification, mappings and short summaries only), so validate_findings needs no quote for them unless the user loaded a licensed rule-texts file. Never post review comments without the user approving the exact text.

Capabilities

Features and capabilities supported by this server

Protocol revision2025-11-25

CapabilityDetails
tools
{
  "listChanged": false
}
prompts
{
  "listChanged": false
}
resources
{
  "subscribe": false,
  "listChanged": false
}

Tools

Functions exposed to the LLM to take actions

NameDescription
list_rulesA

List rules from the bundled databases, filtered by standard, language, category, kind, risk level, CERT detectability, MISRA/AUTOSAR classification or checker coverage. Default standard is SEI CERT C/C++ (388 rules and recommendations); standard='misra' or 'autosar' lists MISRA C:2012 (221), MISRA C++:2023 (178) or AUTOSAR C++14 (397) guidelines. Use to enumerate rules by structured criteria, e.g. all L1 C++ rules no checker detects or all mandatory MISRA C rules. Do not use for free-text lookup (use search_rules) or one rule's details (use get_rule). Reads bundled data only; fast. Returns summaries; count is the total before limit, so raise limit or narrow filters when truncated is true.

search_rulesA

Rank rules by keyword relevance to a free-text query: API names (strcpy, malloc, pthread_mutex_lock), concepts (integer overflow) or a rule ID in any accepted form (EXP34-C, misra-c2012-10.4, A5-2-2). Searches SEI CERT C/C++ by default; set standard for MISRA or AUTOSAR, where only our one-line summaries, section names and facts are searchable (plus licensed texts when loaded). Use when you know what the code does but not which rule applies. Do not use for structured filters (use list_rules) or to read a rule (use get_rule). Case-insensitive term counting, not semantic search; 1-character tokens are ignored and a query with no usable token returns an empty list. Reads bundled data only; fast.

get_ruleA

Return the full record of one rule. SEI CERT: text, noncompliant and compliant code examples, exceptions, risk assessment, CWE IDs, related MISRA/AUTOSAR guidelines (cross_references), the checkers that detect it, and how the profile adjusts or disables it. MISRA/AUTOSAR: classification, section, enforcement, related CERT rules, checkers and our one-line summary; the official text appears only when the user loaded a licensed rule-texts file (text_source, quote_required). Use before judging or explaining a finding, or to copy the verbatim quote validate_findings requires. Do not use to discover rules (use search_rules or list_rules). Reads bundled data only. CERT records are large (median ~10 KB, up to ~80 KB); set include_examples=false for text and risk only. An unknown ID returns an error listing close matches.

get_rule_coverageA

Count rules per detection tier: deterministic (a rule-specific checker exists, e.g. a clang-tidy cert-* alias or the cppcheck MISRA addon), partial (only general checkers map) and llm-only (no checker; manual review needed), for all checker mappings, for the pinned reference toolchain (clang-tidy and Clang Static Analyzer 19.1.7, cppcheck 2.17.1, Semgrep with the bundled rules) and for the extended toolchain (plus Infer and the CodeQL CERT packs). SEI CERT by default; set standard for MISRA or AUTOSAR (adds by_standard and licensed_texts). Use to judge how much of a review static analysis can carry. Computed from bundled data; it does not probe the analyzers installed here (check_files reports those in tools[]). For one rule use get_rule; to list a tier's rules use list_rules with coverage.

check_filesA

Run clang-tidy, the Clang Static Analyzer and cppcheck (plus Semgrep and Infer when installed, CodeQL on request; see tools) on a C/C++ file or a directory (recursive) and return every finding mapped to SEI CERT rule IDs, or to MISRA C:2012 / MISRA C++:2023 / AUTOSAR C++14 IDs when standards (or the profile) selects them; MISRA C adds the cppcheck MISRA addon on .c files. Use for whole-file or whole-tree audits; for a change set use check_diff, which keeps only changed lines. Runs the analyzers as local subprocesses (4 in parallel, 300 s timeout per file and tool) and writes no files. Takes under a second per small file but minutes for large trees. Pass compdb when the project has a compilation database; without it flags are guessed and project headers are often missing. A tools[].status of 'partial' or non-empty warnings means some files did not compile or timed out, so an empty result is not proof. With baseline_path, findings already in the baseline are hidden and baseline reports new, baselined and fixed counts.

check_diffA

Run the check_files analyzers on the C/C++ files of a change and keep only findings on added or modified lines, mapped to the same standards (standards or the profile; SEI CERT by default). The change is base..head in the git repo at repo, base against the working tree when head is omitted, or a pasted unified diff (diff_text, paths relative to repo). Use for pull-request or pre-commit review; for whole files use check_files. Runs git diff and the analyzers locally; writes nothing. For git refs, files must exist at head or line numbers will not match. With diff_text, files are reconstructed in a private temporary tree (the repo on disk is never modified). Check tools[].status and warnings before trusting an empty result. baseline_path hides findings recorded in a baseline file (fixed is not computed in diff scope).

explain_findingA

Explain one finding: a short rule summary, why the finding matches the rule (checker mapping, APIs, shared identifiers), the rule's noncompliant/compliant example pair most similar to the flagged code (token overlap), a unified diff between them, and concrete fix steps derived from that compliant example plus per-API and per-category advice. Use after check_files or check_diff when you need to explain or fix a finding; pass the finding object unchanged, or rule_id with file and line, or with a code snippet. Use get_rule instead for the full rule text and all examples, and validate_findings (not this tool) to check that a manually written finding is grounded. Deterministic and offline: reads only the bundled rules and the named file. An unknown rule_id returns an error listing close matches.

build_review_packetA

Build a packet for reviewing code against SEI CERT rules that analyzers cannot decide: code hunks, each with up to max_rules_per_hunk candidate rules (picked by token/API heuristics and profile idioms, rules fully covered by a specific checker left out) and their text excerpts. Diff mode (repo plus base or diff_text): changed lines with 3 lines of context. Path mode (path): whole files. Hunks are cut into 60-line windows. Use after check_diff or check_files; judge each hunk, then send your findings to validate_findings. Read-only; run_static=true also runs the analyzers (same cost as check_diff/check_files) to mark lines already reported. Output is large, roughly 5-25 KB per hunk.

validate_findingsA

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.

format_pr_reviewA

Build a single markdown PR comment from check_diff output and build_review_packet: static tool summary, heuristic candidate-rule table, Ceph idiom hints, CodingStyle nits, and optional functional bullets. Does not post anywhere.

review_prA

Run check_diff on base..head, build_review_packet for heuristic hints, and format_pr_review into one markdown comment (static table, candidate rules, idioms, style nits, functional bullets). Does not post. Prefer this over three separate calls. profile ceph auto-builds synthetic compdb when needed.

format_findingsA

Render findings as a report or review payload without sending it. style: markdown (string); github (object for POST /repos/{owner}/{repo}/pulls/{n}/reviews, event COMMENT, one comment per finding); gitlab (array of merge-request discussion bodies; position SHAs are placeholders to fill from diff_refs); sarif (SARIF 2.1.0 object); codequality (GitLab Code Quality array); gitlab-sast (GitLab SAST report object). Use as the last step, then show drafted comments to the user before anyone posts them. Pass findings unchanged from check_files/check_diff findings or validate_findings accepted. Pure formatting: no files, network or posting.

Prompts

Interactive templates invoked by user choice

NameDescription
cert_reviewReview code against SEI CERT C/C++.
ceph_reviewReview Ceph code against SEI CERT with Ceph idioms taken into account.

Resources

Contextual data attached and managed by the client

NameDescription

No resources

TDQS

A4.4/5.0

Scored across 12 tools

Disambiguation5/5

Every tool has a distinct role in a clear pipeline, and the descriptions explicitly fence off neighbours ('Do not use to discover rules (use search_rules or list_rules)', 'for whole files use check_files', 'Use get_rule instead for the full rule text'). The only overlaps are the intentional composites (review_pr = check_diff + build_review_packet + format_pr_review) and format_pr_review vs format_findings, both of which are disambiguated by explicit 'prefer this over three separate calls' / output-format guidance.

Naming Consistency5/5

All twelve names are snake_case verb_noun (get_rule, check_diff, explain_finding, build_review_packet, validate_findings, format_pr_review, list_rules, search_rules, review_pr). The verb choices are also semantically consistent: get_/list_/search_ for reads, check_ for analyzer runs, build_/validate_/format_ for the review pipeline stages.

Tool Count5/5

Twelve tools is well within the sweet spot and each earns its place: three rule-lookup tools, two analyzer runners, three review-pipeline stages, two formatters, one coverage statistic, and one composite convenience wrapper. Nothing looks padded or redundant.

Completeness4/5

The end-to-end flow is covered: discover rules (search/list) → inspect (get_rule) → detect (check_files/check_diff) → explain → build packet → validate → format, plus a composite review_pr and coverage reporting. Minor gaps: the server never posts results (format_pr_review and format_findings only draft, with placeholder SHAs), and a baseline can be consumed via baseline_path but no tool creates or updates one, leaving a small dead end at the delivery step.

Maintenance

ActivityMaintained
ResponsivenessNo recent community issues