Skip to main content
Glama
nataliemona

Mode Analytics MCP Server

by nataliemona

update_query

Modify an existing SQL query in a Mode Analytics report by specifying report and query tokens; optionally change SQL text, name, or data source.

Instructions

Update a SQL query in a report.

This is a write operation — it modifies an existing query.

Args: report_token: The report containing the query. query_token: The query to update (use get_report to find query tokens). raw_query: New SQL text. Omit to leave unchanged. name: New query name. Omit to leave unchanged. data_source_id: New data source ID. Omit to leave unchanged.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameNo
raw_queryNo
query_tokenYes
report_tokenYes
data_source_idNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.1

TDQS

A4/5.0
Behavior3/5

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

With no annotations, the description carries the full burden and does disclose the essential mutation semantics: 'This is a write operation — it modifies an existing query,' plus partial-update behavior via 'Omit to leave unchanged.' It says nothing about required permissions, error behavior for a bad token, or whether changes are reversible/versioned.

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 purpose plus the write warning, followed by a scannable Args list. The opening two sentences overlap slightly (both restate that it modifies an existing query), but there is no real waste.

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?

An output schema exists, so return values need no explanation. The description covers mutation semantics, all parameters, and a discovery path for the tokens; only permission/error context is absent, which is minor for this operation.

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

Parameters5/5

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

Schema description coverage is 0%, so the description must compensate and it does: all five parameters are explained, including the non-obvious 'omit to leave unchanged' semantics for the three optional fields, and the token-discovery pointer for query_token. This adds meaning well beyond the bare schema.

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?

States a specific verb+resource (update a SQL query inside a report) and clarifies it operates on an existing query, which implicitly distinguishes it from the sibling add_query. It does not explicitly name or contrast any sibling, so it stops short of a 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?

Gives a concrete workflow hint for the required token parameter ('use get_report to find query tokens'), routing the agent to the right sibling. It offers no when-not guidance (e.g., when to use add_query vs update_query, or what happens if the query does not exist).

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