Skip to main content
Glama

Update saved query

draxlr_update_saved_query
DestructiveIdempotent

Update an existing saved query: rename it, change its description, and/or replace its SQL (raw SQL queries only). Provide the saved queryId (from draxlr_list_saved_queries) and any of name, description or sql.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
sqlNoNew SQL to replace the query's definition (raw SQL queries only). If you add variables, write them as {{variableName}} using letters only (e.g. {{startDate}}); numbers, underscores and other special characters are not allowed. Pass their values in `variables`, or wrap each condition that uses a variable in [[ ]] (e.g. WHERE 1=1 [[AND created_at >= {{startDate}}]]) so it is skipped when no value is given.
nameNoNew name for the saved query
queryIdYesThe saved query id to update (from draxlr_list_saved_queries)
variablesNoValues for the {{variables}} used in the SQL, keyed by variable name, e.g. { "startDate": "2026-01-01" }. Use an array for IN lists.
descriptionNoNew description for the saved query

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changed
    • changedInput schema / properties / sql / description
      Previous value: -"New SQL to replace the query's definition (raw SQL queries only)"New value: +"New SQL to replace the query's definition (raw SQL queries only). If you add variables, write them as {{variableName}} using letters only (e.g. {{startDate}}); numbers, underscores and other special characters are not allowed. Pass their values in `variables`, or wrap each condition that uses a variable in [[ ]] (e.g. WHERE 1=1 [[AND created_at >= {{startDate}}]]) so it is skipped when no value is given."
    • addedInput schema / properties / variables
      Added value: +{
      +  "additionalProperties": {
      +    "anyOf": [
      +      {
      +        "type": "string"
      +      },
      +      {
      +        "type": "number"
      +      },
      +      {
      +        "type": "boolean"
      +      },
      +      {
      +        "items": {
      +          "type": [
      +            "string",
      +            "number"
      +          ]
      +        },
      +        "type": "array"
      +      }
      +    ]
      +  },
      +  "description": "Values for the {{variables}} used in the SQL, keyed by variable name, e.g. { \"startDate\": \"2026-01-01\" }. Use an array for IN lists.",
      +  "type": "object"
      +}
  2. First observed

TDQS

A3.8/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=false, destructiveHint=true, and idempotentHint=true, so the mutation/replacement risk profile is largely covered. The description adds the useful constraint that only raw SQL queries can be updated, but it does not expand on the destructiveness of replacing SQL or on failure behavior.

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?

Two sentences, zero filler: the update action and its scope come first, with the prerequisite inputs and their source immediately after. Nothing can be removed without losing 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?

For a 5-parameter mutating tool with a nested variables object, no output schema, and annotations covering the safety profile, the description supplies the essential inputs, their source, and the raw-SQL restriction. Minor gaps remain around whether variables can be updated without replacing sql and what the response confirms.

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 description coverage is 100% and the schema already explains each parameter, including the detailed {{variable}} syntax and the roles of name/description/queryId. The description restates the field list and the queryId source but adds no syntax or format meaning beyond the schema, so the baseline of 3 applies.

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?

The description states a specific verb and resource ('Update an existing saved query') and enumerates exactly which fields change (rename, description, SQL), plus a scope constraint ('raw SQL queries only'). It is clearly distinct from the read/list siblings, though it never explicitly contrasts with draxlr_save_query, so it falls short of full sibling differentiation.

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?

It tells the agent how to invoke it correctly: supply queryId sourced from draxlr_list_saved_queries and at least one of name/description/sql, which conveys the partial-update model. There is no explicit when-not-to-use guidance or named alternative (e.g., save_query for creating new ones).

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