Skip to main content
Glama

List SEI CERT rules by filter

list_rules
Read-onlyIdempotent

Enumerate SEI CERT C/C++ rules by structured filters such as language, category, risk level, or checker coverage. Returns rule summaries without full text for listing.

Instructions

List SEI CERT C/C++ rules and recommendations from the bundled database (388 entries), filtered by language, category, kind, risk level, CERT detectability or checker coverage. Use to enumerate rules by structured criteria, e.g. all L1 C++ rules no checker detects. Do not use for free-text lookup (use search_rules) or for one rule's text and examples (use get_rule). Reads bundled data only; fast, no analyzers run. Returns summaries without rule text; count is the total before limit, so raise limit or narrow filters when truncated is true.

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": "list_rules"
  }
}

Input Schema

NameRequiredDescriptionDefault
kindNorule = normative rule; recommendation = advisory (C only).any
langNoc = SEI CERT C, cpp = SEI CERT C++.any
levelNoCERT priority level; L1 is the most urgent.any
limitNoMaximum summaries returned (each ~400 bytes).
categoryNoThree-letter category, e.g. EXP expressions, MEM memory, INT integers, STR strings, CON concurrency.any
coverageNoChecker coverage tier: deterministic = a rule-specific checker exists; partial = only general checkers; llm-only = no checker, manual review needed. Matches either the all-mappings or the pinned-toolchain tier.any
detectableNoCERT's own 'Detectable' flag (true = automatable in principle). Omit for both.

Output Schema

NameRequiredDescriptionDefault
countYesNumber of rules matching the filters, before `limit`.
rulesYesRule summaries: id, title, lang (c|cpp), kind (rule|recommendation), category, severity, likelihood, priority (P1-P27), level (L1-L3), detectable, url, coverage (tier over all mappings), coverage_runnable (tier with the pinned toolchain).
truncatedYesTrue when count > limit and `rules` was cut.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed31 schema fields changedv0.1.2
    • removedInput schema / properties / category / anyOf
      Removed value: -[
      -  {
      -    "type": "string"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • changedInput schema / properties / category / default
      Previous value: -nullNew value: +"any"
    • addedInput schema / properties / category / description
      Added value: +"Three-letter category, e.g. EXP expressions, MEM memory, INT integers, STR strings, CON concurrency."
    • addedInput schema / properties / category / enum
      Added value: +[
      +  "any",
      +  "API",
      +  "ARR",
      +  "CON",
      +  "CTR",
      +  "DCL",
      +  "ENV",
      +  "ERR",
      +  "EXP",
      +  "FIO",
      +  "FLP",
      +  "INT",
      +  "MEM",
      +  "MSC",
      +  "OOP",
      +  "POS",
      +  "PRE",
      +  "SIG",
      +  "STR",
      +  "WIN"
      +]
    • addedInput schema / properties / category / type
      Added value: +"string"
    • removedInput schema / properties / coverage / anyOf
      Removed value: -[
      -  {
      -    "type": "string"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • changedInput schema / properties / coverage / default
      Previous value: -nullNew value: +"any"
    • addedInput schema / properties / coverage / description
      Added value: +"Checker coverage tier: deterministic = a rule-specific checker exists; partial = only general checkers; llm-only = no checker, manual review needed. Matches either the all-mappings or the pinned-toolchain tier."
    • addedInput schema / properties / coverage / enum
      Added value: +[
      +  "any",
      +  "deterministic",
      +  "partial",
      +  "llm-only"
      +]
    • addedInput schema / properties / coverage / type
      Added value: +"string"
    • addedInput schema / properties / detectable / description
      Added value: +"CERT's own 'Detectable' flag (true = automatable in principle). Omit for both."
    • removedInput schema / properties / kind / anyOf
      Removed value: -[
      -  {
      -    "type": "string"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • changedInput schema / properties / kind / default
      Previous value: -nullNew value: +"any"
    • addedInput schema / properties / kind / description
      Added value: +"rule = normative rule; recommendation = advisory (C only)."
    • addedInput schema / properties / kind / enum
      Added value: +[
      +  "any",
      +  "rule",
      +  "recommendation"
      +]
    • addedInput schema / properties / kind / type
      Added value: +"string"
    • removedInput schema / properties / lang / anyOf
      Removed value: -[
      -  {
      -    "type": "string"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • changedInput schema / properties / lang / default
      Previous value: -nullNew value: +"any"
    • addedInput schema / properties / lang / description
      Added value: +"c = SEI CERT C, cpp = SEI CERT C++."
    • addedInput schema / properties / lang / enum
      Added value: +[
      +  "any",
      +  "c",
      +  "cpp"
      +]
    • addedInput schema / properties / lang / type
      Added value: +"string"
    • removedInput schema / properties / level / anyOf
      Removed value: -[
      -  {
      -    "type": "string"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • changedInput schema / properties / level / default
      Previous value: -nullNew value: +"any"
    • addedInput schema / properties / level / description
      Added value: +"CERT priority level; L1 is the most urgent."
    • addedInput schema / properties / level / enum
      Added value: +[
      +  "any",
      +  "L1",
      +  "L2",
      +  "L3"
      +]
    • addedInput schema / properties / level / type
      Added value: +"string"
    • changedInput schema / properties / limit / default
      Previous value: -200New value: +50
    • addedInput schema / properties / limit / description
      Added value: +"Maximum summaries returned (each ~400 bytes)."
    • addedInput schema / properties / limit / maximum
      Added value: +400
    • addedInput schema / properties / limit / minimum
      Added value: +1
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "additionalProperties": true,
      +  "properties": {
      +    "count": {
      +      "description": "Number of rules matching the filters, before `limit`.",
      +      "title": "Count",
      +      "type": "integer"
      +    },
      +    "rules": {
      +      "description": "Rule summaries: id, title, lang (c|cpp), kind (rule|recommendation), category, severity, likelihood, priority (P1-P27), level (L1-L3), detectable, url, coverage (tier over all mappings), coverage_runnable (tier with the pinned toolchain).",
      +      "items": {
      +        "additionalProperties": true,
      +        "type": "object"
      +      },
      +      "title": "Rules",
      +      "type": "array"
      +    },
      +    "truncated": {
      +      "description": "True when count > limit and `rules` was cut.",
      +      "title": "Truncated",
      +      "type": "boolean"
      +    }
      +  },
      +  "required": [
      +    "count",
      +    "truncated",
      +    "rules"
      +  ],
      +  "title": "RuleList",
      +  "type": "object"
      +}
  2. First observedv0.1.0

TDQS

A4.9/5.0
Behavior5/5

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

Annotations already declare readOnly/idempotent/non-destructive/local, but the description adds real behavior the annotations cannot: bundled data only, no analyzers run, fast, returns summaries without rule text, and the crucial count-is-total-before-limit plus truncated semantics. These are exactly the operational details an agent needs before deciding to raise limit versus narrow filters.

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?

Front-loads what is listed and from where, then usage, then exclusions, then runtime/return caveats — each clause carries distinct information with no restatement of the title or schema. Dense but every sentence earns its place.

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 7-parameter, fully optional filter tool with an output schema, the description covers source, cost, truncation handling, and sibling routing without duplicating return-value documentation. Nothing an agent needs to call it correctly is missing.

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% and every enum is self-documented, so the baseline is 3. The description adds marginal meaning by mapping filters to a concrete composite query (L1 + cpp + no checker detects) and by explaining how limit interacts with the returned count, which the schema alone does not convey.

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 and resource (list SEI CERT C/C++ rules and recommendations), the data source with cardinality (bundled database, 388 entries), and the six filter dimensions. It explicitly distinguishes itself from search_rules and get_rule, which are the two most confusable siblings.

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 a positive usage pattern ('enumerate rules by structured criteria, e.g. all L1 C++ rules no checker detects') plus explicit exclusions routing to search_rules for free-text and get_rule for a single rule's text and examples. Both the when and the when-not are present with named alternatives.

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