Skip to main content
Glama

Optimize an existing Google tag snippet

is-google-tag
Read-onlyIdempotent

Rewrite existing Google Analytics tag snippet; review output before production. Use when transforming an already supplied Google Analytics tag snippet. It does not configure GA4 accounts, install tracking or verify consent. Transformation tool, not a boolean validator. Returns a rewritten Google Analytics snippet; check consent behavior and analytics tracking before deployment.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
htmlYesExisting HTML snippet containing the Google Analytics tag to optimize.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A3.8/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true, idempotentHint=true, destructiveHint=false and openWorldHint=false, and the description does not contradict them. It adds real behavioral context beyond the annotations: the output should be reviewed before production because the rewrite can affect consent behavior and analytics tracking. It does not discuss rate limits or error modes.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The core statement is front-loaded and clear, but the review-before-production warning is repeated twice ('review output before production' and 'check consent behavior and analytics tracking before deployment') with no added information the second time. Four short sentences where three would suffice.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

With no output schema, the description correctly covers the return value ('Returns a rewritten Google Analytics snippet') and sets deployment expectations. The only meaningful gap is that it says nothing about failure behavior for invalid or non-GA snippet input.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

There is a single parameter with 100% schema description coverage ('Existing HTML snippet containing the Google Analytics tag to optimize'), so the schema already carries the semantics. The description adds no syntax, format, or size-limit detail beyond it, making the baseline 3 appropriate.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description gives a concrete verb and resource: 'Rewrite existing Google Analytics tag snippet.' It also preempts confusion from the 'is-*' sibling naming family by stating 'Transformation tool, not a boolean validator.' It stops short of naming a specific sibling alternative, so it lands at 4 rather than 5.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

'Use when transforming an already supplied Google Analytics tag snippet' states the trigger condition clearly, and the exclusions ('does not configure GA4 accounts, install tracking or verify consent') sharpen the boundary. No named alternative tool is offered, so it is clear context without full routing guidance.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources