Skip to main content
Glama

Summarize checker coverage per standard

get_rule_coverage
Read-onlyIdempotent

Counts rules by detection tier—deterministic, partial, or LLM-only—across standards and toolchains to show how much static analysis can cover a C/C++ review.

Instructions

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.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "get_rule_coverage"
  }
}

Input Schema

NameRequiredDescriptionDefault
kindNoCount only rules, CERT recommendations or MISRA directives.any
langNoCount only C (c) or C++ (cpp) rules.any
standardNoRule set: cert = SEI CERT C and C++ (default; the only standard with full rule text); misra = MISRA C:2012 (with Amendments 1-4, i.e. the MISRA C:2023 set) and MISRA C++:2023; autosar = AUTOSAR C++14; or one standard by name; all = every standard.cert
include_idsNoAdd rules_all_mappings, rules_runnable and rules_extended: rule ID lists per tier (~15 KB).

Output Schema

NameRequiredDescriptionDefault
totalYesRules counted after the standard/lang/kind filters.
sourcesYesUpstream mapping sources and commits.
toolchainYesPinned analyzer versions the tiers were computed for.
definitionsYesMeaning of deterministic, partial and llm-only.
all_mappingsYesCounts per tier using every upstream checker mapping.
extended_toolchainYesCounts per tier when the optional Infer and CodeQL (CERT query packs) analyzers are installed as well.
runnable_toolchainYesCounts per tier using only the reference toolchain shipped in the Docker image: clang-tidy, Clang Static Analyzer, cppcheck and the bundled Semgrep rules.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.4.1

TDQS

A4.8/5.0
Behavior5/5

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

Annotations already cover the read-only/idempotent profile, and the description adds genuinely new behavioral facts: results are computed from bundled data rather than live probing, the pinned toolchain versions are enumerated, and include_ids is flagged as adding ~15 KB of IDs. It also discloses that setting `standard` beyond cert adds by_standard and licensed_texts fields.

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 core operation and tight throughout, with the caveats pushed to the end. It is a single dense block with heavy parenthetical nesting (toolchain versions, tier definitions), which slightly hurts scannability but every clause carries information.

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 read-only, fully-described aggregation tool with an output schema, the description covers provenance, defaults, tier definitions, cost of optional output, and the boundary with two sibling tools. An agent has everything needed to call it correctly and to know when not to.

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 goes further by naming the non-obvious side effects: `standard` defaults to SEI CERT and non-CERT values add by_standard and licensed_texts, and include_ids returns three named ID lists at a stated size. `kind` and `lang` are left to the schema, which is acceptable given full coverage.

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?

The opening clause gives a specific verb and resource ("Count rules per detection tier") and then defines each tier inline (deterministic / partial / llm-only). It also scopes the output to two named toolchains, so an agent knows exactly what population is being summarized.

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?

It states the purpose ("judge how much of a review static analysis can carry") and routes explicitly to alternatives: get_rule for a single rule, list_rules with `coverage` for a tier's rule list, and check_files for analyzers actually installed here. The negative guidance — that this does not probe installed analyzers — is exactly the disambiguation most agents would get wrong.

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