Skip to main content
TagManifest /Docs Dashboard

get_rule

MCP tool that returns the catalog record for a single rule by ID.

On this page 6

Summary

  • tool — get_rule
  • purpose — returns the catalog record for one rule: description, recommendation, regulatory cites, tier, severity, effort estimate
  • rest equivalent — GET /v1/rules-detail?rule_id=<rule_id>
  • rate limit — 1000/day per user
  • synchronous — yes (a catalog read; no scan)

Returns the public fields stored for a single rule. No container is needed and no scan runs. Use it when an agent needs to explain a finding, name the regulations involved, or recommend a fix.

TOOLget_rule

When to use it

Use get_rule when you already have a rule_id and want that one rule.

vs list_rules — both tools return the same 14 fields per rule. list_rules returns many rules at once and can filter by category, tier and status; use it to browse or to find IDs. get_rule returns one rule by ID. It also returns a deferred rule, which list_rules leaves out unless you ask for status: "deferred" or "all".

vs evaluate_rule — evaluate_rule runs a rule against a container and says whether it fired. get_rule reads the catalog and never touches a container. If a user asks "what does this rule check?" call get_rule. If they ask "does my container pass this rule?" call evaluate_rule.

vs a finding from a scan — a finding in a scan_url result carries the title, severity and tier that apply to that container. get_rule returns the rule's catalog entry, so the title wording can differ.

Arguments

ArgumentTypeRequiredDescription
rule_idstringrequiredThe rule's ID (for example ga4-pii-parameter-names). Use list_rules to find valid IDs.

No scan runs. get_rule reads one row from the rules database. No container is fetched and no rule runs.

Returns

The tool result is one text block. Its text is a JSON object with the rule's 14 public fields: rule_id, title, description, recommendation, category, tier, severity, layer_requirements, status, version, effort_estimate, reversibility, regulatory_cites, learn_more_url.

title, description and recommendation explain the issue and the fix. tier and severity say how urgent it is. regulatory_cites lists the regulations the rule relates to, and is empty for most rules. effort_estimate is one of 15min, 2hr, 2wk, strategic. learn_more_url is currently null for every rule. Internal notes are not returned. See list_rules for every field's type.

{
  "rule_id": "ga4-pii-parameter-names",
  "title": "Parameters with PII-suggesting names",
  "description": "Parameters with names like \"email\", \"phone\", or \"user_name\" — GA4 prohibits sending PII.",
  "recommendation": "Remove PII parameters or hash values with SHA-256 before sending.",
  "category": "ga4",
  "tier": "error",
  "severity": "critical",
  "layer_requirements": "container",
  "status": "shipped",
  "version": 1,
  "effort_estimate": "15min",
  "reversibility": "non-destructive",
  "regulatory_cites": [
    "GDPR Art. 5",
    "GDPR Art. 6"
  ],
  "learn_more_url": null
}

Errors

  • Bad arguments come back as a JSON-RPC error with code -32602. This covers a missing rule_id, any argument other than rule_id, and a rule_id that is not a string. These are checked before the rate limit, so they do not count against it.
  • A rule that does not exist comes back as a normal tool result with isError: true and the message Rule not found: <rule_id>. This call does count against the rate limit.
  • Rate limit comes back as a JSON-RPC error with code -32603 and the message Rate limit exceeded for get_rule: 1001/1000. Resets at <time>. The HTTP status is 200. MCP responses carry no X-RateLimit-* headers. The limit resets at midnight UTC.

Try saying

Natural-language prompts that route to this tool through an agent:

  • "What does the ga4-pii-parameter-names rule actually check?"
  • "Explain the consent-no-cmp finding and what I should do about it."
  • "What regulations apply to the btoa-pii rule?"

For agents wired to your own application:

You have access to TagManifest's MCP server. Use the get_rule tool
to retrieve the catalog record for a rule by its rule_id. The tool
requires a rule_id string and returns the rule's public fields,
including description, recommendation, regulatory_cites, tier,
severity, and effort_estimate. Use this before explaining a finding
to a user or recommending a fix.

See also

Examples

MCP tool call
{
  "tool": "get_rule",
  "arguments": {
    "rule_id": "ga4-pii-parameter-names"
  }
}
Tool result
{
  "rule_id": "ga4-pii-parameter-names",
  "title": "Parameters with PII-suggesting names",
  "description": "Parameters with names like \"email\", \"phone\", or \"user_name\" — GA4 prohibits sending PII.",
  "recommendation": "Remove PII parameters or hash values with SHA-256 before sending.",
  "category": "ga4",
  "tier": "error",
  "severity": "critical",
  "layer_requirements": "container",
  "status": "shipped",
  "version": 1,
  "effort_estimate": "15min",
  "reversibility": "non-destructive",
  "regulatory_cites": ["GDPR Art. 5", "GDPR Art. 6"],
  "learn_more_url": null
}