Skip to main content
TagManifest /Docs Dashboard

get_health_score

MCP tool that returns only the health score breakdown for a container, with no findings list.

On this page 6

Summary

  • tool — get_health_score
  • purpose — returns the score, grade, tier deductions, and per-category counts; no findings list
  • rest equivalent — none of its own; the same object is the health_score field of POST /v1/scan-url and POST /v1/scan
  • rate limit — 100/day per user
  • synchronous — yes

Returns the health score for a container without the findings list. Use it when an agent only needs the number, for example for a status check.

TOOLget_health_score

When to use it

Use get_health_score to answer "is this container healthy?" without listing findings. For the findings, use scan_url; its result includes the same score. To run one named rule, use evaluate_rule.

Arguments

ArgumentTypeRequiredDescription
urlstringone ofAddress of the page. A full URL (https://example.com), a bare domain (example.com, scanned over https), or a GTM ID (GTM-XXXXX) are all accepted. The tool fetches the page, finds the GTM container ID in its HTML, and scores that container.
gtm_idstringone ofGTM container ID (GTM-XXXXX, upper case). The page is not fetched.
dataobjectone ofA GTM JSON export as downloaded from GTM, or container data already parsed by TagManifest. Nothing is fetched.

One of url, gtm_id, or data is needed. If data is present it is used and the other two are ignored.

Synchronous. The tool returns when the scan completes. No polling, no webhooks. A fetched container is reused for up to five minutes. The result is shorter than scan_url because findings are left out, but every rule still runs.

Returns

The tool result is one text block. Its text is a JSON object:

FieldMeaning
containergtm_id, name, and from_cache. gtm_id is read from the container. When a parsed container in data carries no ID, a gtm_id passed in the same call is used; with neither, it is null.
score0 to 100. 100 minus the three tier deductions.
grade, labelA Well-Configured (90+), B Healthy (75+), C Needs Attention (60+), D Patterns Found (45+), F Areas to Review.
deductionsPoints taken off by tier (error, warning, optimization, info), plus byCategory.
deductions.byCategoryThe number of findings that fed the score, per category. A count, not points.
capsThe most each tier can take off: 35 for errors, 20 for warnings, 25 for optimizations, 0 for info.
functionalIssueCountThe number of findings that fed the score.

Not every finding feeds the score. Each rule is marked as either functional or hygiene, and only findings from functional rules count. Info-tier findings take no points off. See Health score for the full method.

Caching. On MCP the cache field is container.from_cache. It is true when a stored copy of the container was used, false when the container was fetched from Google, and null when the container came from data.

{
  "container": {
    "gtm_id": "GTM-EXAMPLE",
    "name": "Example container",
    "from_cache": false
  },
  "score": 49,
  "grade": "D",
  "label": "Patterns Found",
  "deductions": {
    "error": 32,
    "warning": 8,
    "optimization": 11,
    "info": 0,
    "byCategory": {
      "consent": 2,
      "security": 2,
      "ga4": 3,
      "ads": 2
    }
  },
  "caps": {
    "error": 35,
    "warning": 20,
    "optimization": 25,
    "info": 0
  },
  "functionalIssueCount": 9
}

In this example four error findings take off 32 points, two warnings take off 8, and three optimizations take off 11. 100 − 51 = 49.

Errors

  • Bad arguments come back as a JSON-RPC error with code -32602. This covers an argument the tool does not accept (the message suggests the nearest name) and an argument of the wrong type. category, tier and top_n are not arguments of this tool. These are checked before the rate limit, so they do not count against it.
  • A scan that fails comes back as a normal tool result with isError: true and a plain message in the text block. Examples: none of url, gtm_id or data given, a page with no GTM snippet, or a GTM ID that Google has no public container for. These calls do 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_health_score: 101/100. 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's the health score for example.com?"
  • "Is GTM-XXXXX in good shape? Just give me the grade."
  • "Score this GTM export."

For agents wired to your own application:

You have access to TagManifest's MCP server. Use the get_health_score
tool to check the health of a GTM container. The tool accepts a url,
gtm_id, or data argument and returns a score (0–100), letter grade,
tier deductions, and per-category counts, with no findings list.
Use scan_url when you need the findings.

See also

  • Health score — how findings translate to tier deductions and grades
  • scan_url — full audit: findings list, counts, and the score in one call
  • compare_containers — diff two containers and get the score difference

Examples

MCP tool call
{
  "tool": "get_health_score",
  "arguments": {
    "url": "https://example.com"
  }
}
Tool result
{
  "container": {
    "gtm_id": "GTM-EXAMPLE",
    "name": "Example container",
    "from_cache": false
  },
  "score": 49,
  "grade": "D",
  "label": "Patterns Found",
  "deductions": {
    "error": 32,
    "warning": 8,
    "optimization": 11,
    "info": 0,
    "byCategory": {
      "consent": 2,
      "security": 2,
      "ga4": 3,
      "ads": 2
    }
  },
  "caps": {
    "error": 35,
    "warning": 20,
    "optimization": 25,
    "info": 0
  },
  "functionalIssueCount": 9
}