Skip to main content
Glama
yulanventures

@prompteden/mcp-server

Official

Rotate analytics site key

analytics_rotate_key

Rotate an analytics property's ingest site key and return the new key once; old key stays valid until overlapExpiresAt.

Instructions

Rotate a property's ingest site key via POST /api/v1/analytics/property/key/rotate. Target with propertyId ALONE (primary), or a project reference plus expectedPropertyId (409 analytics_property_changed on mismatch). The new siteKey is shown EXACTLY ONCE; the old key keeps working through overlapExpiresAt. NOT idempotent and never auto-retried: a manual retry performs a fresh rotation (safe — install the latest returned key). Does not use credits.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
projectIdNoNumeric project id (convenience shape; do not combine with propertyId).
propertyIdNoExplicit analytics property id (primary target). Pass ALONE — combining with a project reference is rejected. When omitted, pass a project reference instead; that resolves only when the project has exactly one property (409 property_scope_ambiguous otherwise).
projectUuidNoProject UUID (alternative to projectId).
expectedPropertyIdNoRequired with a project reference: the property id you believe is current. Omit when targeting by propertyId.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.3.0

TDQS

A4.7/5.0
Behavior5/5

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

Goes well beyond the annotations (readOnlyHint=false, idempotentHint=false, destructiveHint=false) by disclosing that the new siteKey is shown exactly once, that the old key keeps working through overlapExpiresAt, and that the operation is never auto-retried but a manual retry performs a safe fresh rotation. It also notes no credits are consumed — all behaviorally load-bearing facts absent from structured fields.

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?

Front-loads the core action and endpoint, then layers targeting modes, error codes, and retry semantics in tight clauses. Dense but every sentence carries operative information — no filler or restatement of the title.

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?

With no output schema, the description supplies the return-value essentials (new siteKey shown once, overlapExpiresAt) plus the non-idempotency and retry behavior. Nothing an agent needs to call this mutation correctly and interpret its result 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 description coverage is 100%, so the schema already documents all four parameters and baseline is 3. The description adds real value on top: it emphasizes propertyId must be passed alone and surfaces the 409 property_scope_ambiguous condition for the project-reference path, clarifying mutual exclusivity semantics.

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 and resource — "Rotate a property's ingest site key" — and pins it to an explicit endpoint (POST /api/v1/analytics/property/key/rotate). No sibling in the list rotates keys, so an agent can identify this tool unambiguously from the name and first clause.

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?

Gives clear conditional targeting rules: propertyId ALONE as primary, or a project reference plus expectedPropertyId, with the 409 analytics_property_changed failure mode named. It covers invocation conditions well but does not state prerequisites such as permission/auth requirements or when rotation is appropriate versus unnecessary.

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