Skip to main content
Glama

update_retention_query

DestructiveIdempotent

Replace the definition of a saved retention query (and optionally rename it). Read it with get_query first, change only what the user asked for, and pass the complete spec back without its queryType — it replaces the saved definition on every dashboard that shows the query. Run the new spec with run_retention_query first so you know it works. Saved when this runs; explain it in reason. Load the manage-dashboards, retention-queries skills (load_skill("manage-dashboards"), load_skill("retention-queries")) first.

Input Schema

NameRequiredDescriptionDefault
nameNo
specYesThe complete new retention definition. Replaces the saved one entirely — start from get_query's spec (without its queryType) and change only what the user asked for.
reasonYesWhy you are making this change, in one sentence the user will read on the approval card.
queryIdYesThe saved retention query to change.
projectIdYesThe project (application) id to scope this call to. Use list_projects to discover valid ids.
descriptionNoNew description. Pass one when the new spec makes the saved description wrong, or when the query has none. Omit to keep the current one.
environmentYesThe environment name to scope this call to (e.g. 'production'). Use list_projects to discover the names available to this token.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.3/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, but the description explains the blast radius — the replacement rewrites the saved definition on every dashboard showing the query. It also clarifies that the change is saved immediately on execution (no separate commit step) and that reason appears on an approval card.

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

Conciseness4/5

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

Front-loaded with the purpose and then the workflow; every clause carries an operational instruction. The trailing skill-loading sentence is slightly tacked on but is still actionable information.

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?

Given a deeply nested spec object and no output schema, the description supplies the crucial context: where the spec comes from, that it must be complete, that queryType is stripped, and that the write is destructive across dashboards. It does not say what the call returns, a minor gap for a mutation tool.

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?

Schema coverage is 86%, so the schema already documents queryId, projectId, environment, reason, and description. The description adds one meaningful constraint beyond the schema: pass the complete spec without its queryType, sourced from get_query. That is useful but narrow added meaning.

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?

Opens with a specific verb and resource: "Replace the definition of a saved retention query (and optionally rename it)." This cleanly separates it from update_query, update_funnel_query, and update_insight_query among the siblings.

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?

Gives an explicit ordered workflow: read with get_query first, change only what the user asked, run_retention_query to validate, and load the manage-dashboards and retention-queries skills beforehand. Alternatives and their conditions (get_query, run_retention_query) are named directly.

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