Skip to main content
Glama

Get one SEI CERT rule

get_rule
Read-onlyIdempotent

Retrieve a full SEI CERT rule record—text, code examples, exceptions, risk assessment, CWE IDs, and detected checkers—to judge a finding or obtain the verbatim quote that validate_findings requires.

Instructions

Return the full record of one SEI CERT rule: text, noncompliant and compliant code examples, exceptions, CERT risk assessment, CWE IDs, the checkers that detect it, and how the chosen profile adjusts or disables it. Use before judging or explaining a finding, or to copy the verbatim quote that validate_findings requires. Do not use to discover rules (use search_rules or list_rules). Reads bundled data only. 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.

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": {
      "rule_id": "<rule_id>"
    },
    "name": "get_rule"
  }
}

Input Schema

NameRequiredDescriptionDefault
profileNoReview profile: 'default' (plain SEI CERT), 'ceph' (Ceph severities, suppressions and idioms) or an absolute path to a profile .yaml file.default
rule_idYesSEI CERT rule ID: three-letter category, two digits, then -C or -CPP; case-insensitive.
include_examplesNoInclude code examples in `text` and `examples`.

Output Schema

NameRequiredDescriptionDefault
idYesCanonical rule ID, e.g. EXP34-C.
cweYesRelated CWE IDs.
urlYesRule page on the SEI CERT site.
kindYesrule or recommendation.
langYesc or cpp.
riskYesCERT risk assessment: severity, likelihood, remediation, priority, level, detectable, repairable.
textYesRule text as markdown; examples included unless include_examples=false. Copy `quote` values for validate_findings from here.
titleYes
profileYesname, override (severity/priority/note), disabled reason or null, idioms[].
categoryYesThree-letter category code.
coverageYestier, tier_runnable and checkers[] {tool, checker, specific, available}.
examplesYesNoncompliant/compliant example pairs; [] when include_examples=false.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.1.2

TDQS

A4.9/5.0
Behavior5/5

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

Annotations already cover read-only/idempotent/local, yet the description adds real operational context: bundled data only, large record sizes (median ~10 KB, up to ~80 KB) with a mitigation, and a specific error behavior for unknown IDs (error listing close matches). This is exactly the kind of cost and failure-mode disclosure annotations cannot carry.

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?

Four sentences, each load-bearing: purpose first, then usage, then when-not with alternatives, then payload size and error behavior. No repetition of the name or title and no filler.

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 single-record read with 3 fully documented params and an output schema, nothing an agent needs is missing: it knows the payload contents, size risk, the include_examples lever, profile behavior, and the unknown-ID outcome.

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; the description earns above baseline by explaining the effect of include_examples ('for text and risk only') and noting that the profile alters or disables the rule, which clarifies intent beyond the schema's field descriptions.

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?

Names a specific verb and resource ('Return the full record of one SEI CERT rule') and enumerates the record's contents (text, code examples, exceptions, risk assessment, CWE IDs, checkers, profile adjustments), which sharply distinguishes it from list_rules and search_rules.

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?

Gives explicit when-to-use ('before judging or explaining a finding, or to copy the verbatim quote that validate_findings requires') and an explicit when-not with the correct alternatives ('Do not use to discover rules (use search_rules or list_rules)').

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