Skip to main content
Glama

Connect analytics and ad tracking

set_tracking_codes
DestructiveIdempotent

Connect the owner's own Google Analytics 4, Google Tag Manager, Meta Pixel or Plausible to their published site. Takes an ID — or the snippet the owner pasted, from which the ID is extracted — never arbitrary script. Omitted providers are kept; null disconnects one. Live on every public page at once, no publish needed (never on preview links). Use only IDs the owner gave you. Sitelas has its own visitor analytics (get_analytics); this is for owners who want their numbers in those tools, or to measure ads. Where the owner's visitors are in the EU/UK, tell them these tools may need a cookie consent banner.

Input Schema

NameRequiredDescriptionDefault
site_idYesThe site to connect.
plausibleNoPlausible site domain (`example.com`). Pass the ID or the whole snippet the owner pasted — the ID is extracted and checked. `null` disconnects it.
meta_pixelNoMeta (Facebook) Pixel ID, 10–20 digits. Pass the ID or the whole snippet the owner pasted — the ID is extracted and checked. `null` disconnects it.
google_analyticsNoGoogle Analytics 4 Measurement ID (`G-XXXXXXXXXX`). Pass the ID or the whole snippet the owner pasted — the ID is extracted and checked. `null` disconnects it.
google_tag_managerNoGoogle Tag Manager container ID (`GTM-XXXXXXX`). Pass the ID or the whole snippet the owner pasted — the ID is extracted and checked. `null` disconnects it.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.7/5.0
Behavior4/5

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

Annotations already declare destructiveHint=true and idempotentHint=true, so the safety profile is partly covered. The description still adds real behavioral detail beyond them: omitted providers are kept, `null` disconnects one (partial update), changes go live on all public pages with no publish step, and preview links are excluded. It does not explicitly connect "null disconnects" to the destructiveHint flag, so not a full 5.

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?

Dense but every sentence carries a distinct constraint (accepted input form, partial-update rule, propagation scope, authorization, sibling alternative, compliance note). The core verb+resource leads, and nothing is redundant.

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 5-parameter mutation with no output schema, the description anticipates the questions an agent would have: what counts as valid input, how omission/null behave, how fast changes take effect, where they do not apply, and the sibling it is not. Nothing material 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%, which sets a baseline of 3. The description nevertheless adds cross-parameter semantics the schema lacks — omitted providers are kept and `null` disconnects — plus the guarantee that only IDs are accepted (snippets are parsed, never arbitrary script). That is meaningful value over the per-parameter schema text.

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 (Connect) and the exact resources (GA4, GTM, Meta Pixel, Plausible to their published site), and explicitly contrasts with the sibling get_analytics. An agent can distinguish this from get_analytics without opening either schema.

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?

Names the alternative (get_analytics) and the condition that routes to this tool: owners who want their numbers in external tools or to measure ads. Adds an explicit authorization constraint (use only IDs the owner gave you) and a compliance caveat for EU/UK visitors.

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