Skip to main content
Glama

update_insight_query

DestructiveIdempotent

Replace the definition of a saved insight 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_insight_query first so you know it works. Saved when this runs; explain it in reason. Load the manage-dashboards, insight-queries skills (load_skill("manage-dashboards"), load_skill("insight-queries")) first.

Input Schema

NameRequiredDescriptionDefault
nameNo
specYesThe complete new insight 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 insight 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.6/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 adds crucial beyond-annotation context: the spec replaces the saved definition on every dashboard showing the query, the write is persisted immediately, and reason surfaces on an approval card. It stops short of stating failure/rollback behavior.

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-loads the purpose, then proceeds through prerequisites in execution order with no filler. The trailing skill-loading instruction is useful but makes the block denser than strictly necessary.

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 destructive, deeply nested-spec mutation with no output schema, the description covers prerequisite reads, verification runs, replacement blast radius, and the reason field's audience — everything an agent needs before invoking it.

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?

With 86% schema coverage the schema carries most param docs, but the description adds non-obvious semantics: spec must be the complete definition with queryType stripped, and it is a full replacement rather than a patch. Minor gap on how name and description interact when omitted.

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+resource plus scope: 'Replace the definition of a saved insight query (and optionally rename it).' This cleanly distinguishes it from create_insight_query, update_query, and the sibling update_funnel_query/update_retention_query tools.

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, change only what the user asked for, run run_insight_query first to verify, then call this. It names the alternatives to use for each step rather than leaving routing to inference.

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