Skip to main content
TagManifest /Docs Dashboard

list_rules

MCP tool that returns the TagManifest rule catalog. Filter by category, tier, or status.

On this page 6

Summary

  • tool — list_rules
  • purpose — browse the rule catalog; find rule IDs before calling evaluate_rule or get_rule
  • rest equivalent — GET /v1/rules
  • rate limit — 1000/day per user
  • synchronous — yes (a catalog read; no scan)

Returns the TagManifest rule catalog as an array of rules. No URL, no GTM container, no fetch. The tool reads the rules database and returns.

TOOLlist_rules

When to use it

Use list_rules to see what TagManifest checks, or when a user asks which rules exist in a category. For a full audit, call scan_url or scan_container. To run one rule against a container, call evaluate_rule. To read one rule you already know the ID of, call get_rule.

Arguments

All arguments are optional. Called with no arguments, the tool returns every shipped rule.

ArgumentTypeRequiredDescription
categorystringoptionalOnly rules in one category: consent, ga4, ads, ecommerce, security, pii, performance, quality, organization, dead-code.
tierstringoptionalOnly rules in one tier: error, warning, optimization, info.
statusstringoptionalshipped (default), deferred, or all. Two rules are listed in the catalog with status deferred. They produce no findings today.
limitnumberoptionalMaximum rules to return. Default 200. The most it can be is 500; a larger value is treated as 500. 0 means the default of 200, not zero rules.

Results are ordered by category, then rule_id, both ascending.

No scan runs. list_rules reads the rules database. It does not fetch or scan a container, and the container cache does not apply.

Returns

The tool result is one text block. Its text is a JSON object with total and rules.

total is the number of rules in this response. It is the length of the rules array, so a limit lower than the number of matching rules lowers total too. With no arguments, total is the number of shipped rules: 92 at the time of writing.

Each rule carries these 14 fields. get_rule returns the same 14 fields for one rule.

FieldTypeMeaning
rule_idstringStable ID, for example consent-no-cmp.
titlestringShort name of the rule.
descriptionstringWhat the rule detects.
recommendationstringHow to fix it.
categorystringOne of the ten categories.
tierstringerror, warning, optimization, or info.
severitystringcritical, high, medium, or low.
layer_requirementsstringWhat the rule needs to run. container for every shipped rule.
statusstringshipped or deferred.
versionintegerRule version. Currently 1 for every rule.
effort_estimatestring15min, 2hr, 2wk, or strategic.
reversibilitystringCurrently non-destructive for every rule.
regulatory_citesarray of stringsRegulations the rule relates to. Empty for most rules.
learn_more_urlstring or nullCurrently null for every rule.

The example below is the full result for category: "consent", tier: "warning".

{
  "total": 2,
  "rules": [
    {
      "rule_id": "consent-cmp-not-wired",
      "title": "CMP detected but consent mode not wired",
      "description": "A CMP is installed but 80%+ of tags have no consent configuration, making the CMP effectively decorative.",
      "recommendation": "Configure consent types on all tags that collect or process user data.",
      "category": "consent",
      "tier": "warning",
      "severity": "critical",
      "layer_requirements": "container",
      "status": "shipped",
      "version": 1,
      "effort_estimate": "2wk",
      "reversibility": "non-destructive",
      "regulatory_cites": ["GDPR Art. 6 (lawful basis)", "GDPR Art. 7 (consent)"],
      "learn_more_url": null
    },
    {
      "rule_id": "consent-no-cmp",
      "title": "No CMP detected",
      "description": "Tags require consent but no Consent Management Platform is detected in the container.",
      "recommendation": "Install a CMP (CookieBot, OneTrust, etc.) and configure it to fire on Consent Initialization.",
      "category": "consent",
      "tier": "warning",
      "severity": "high",
      "layer_requirements": "container",
      "status": "shipped",
      "version": 1,
      "effort_estimate": "strategic",
      "reversibility": "non-destructive",
      "regulatory_cites": ["GDPR Art. 6 (lawful basis)", "GDPR Art. 7 (consent)"],
      "learn_more_url": null
    }
  ]
}

Errors

  • Bad arguments come back as a JSON-RPC error with code -32602. This covers an argument the tool does not accept (for example categories for category; the message suggests the nearest name), a category, tier or status value that does not exist, a limit that is negative or not a number, and an argument of the wrong type. These are checked before the rate limit, so they do not count against it.
  • A read that fails comes back as a normal tool result with isError: true and a message such as Registry read failed: 500. This is a server-side fault; try again.
  • Rate limit comes back as a JSON-RPC error with code -32603 and the message Rate limit exceeded for list_rules: 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 rules does TagManifest check for in the consent category?"
  • "Show me all error-tier rules you have."
  • "List every rule available so I can pick one to evaluate."

For agents wired to your own application:

You have access to TagManifest's MCP server. Use the list_rules
tool to browse the rule catalog before running targeted evaluations.
The tool accepts optional filters (category, tier, status, limit)
and returns a total count plus an array of rules, each with rule_id,
title, description, recommendation, category, tier, severity, and
regulatory_cites.

See also

Examples

MCP tool call
{
  "tool": "list_rules",
  "arguments": {
    "category": "consent",
    "tier": "warning"
  }
}
Tool result
{
  "total": 2,
  "rules": [
    {
      "rule_id": "consent-cmp-not-wired",
      "title": "CMP detected but consent mode not wired",
      "description": "A CMP is installed but 80%+ of tags have no consent configuration, making the CMP effectively decorative.",
      "recommendation": "Configure consent types on all tags that collect or process user data.",
      "category": "consent",
      "tier": "warning",
      "severity": "critical",
      "layer_requirements": "container",
      "status": "shipped",
      "version": 1,
      "effort_estimate": "2wk",
      "reversibility": "non-destructive",
      "regulatory_cites": ["GDPR Art. 6 (lawful basis)", "GDPR Art. 7 (consent)"],
      "learn_more_url": null
    },
    { /* consent-no-cmp, with the same 14 fields */ }
  ]
}