Skip to main content
Glama

Delete DataLens saved SQL query

datalens_sqlqueries_delete
Destructive

Deletes a saved SQL query by its ID, with an optional dry run to preview the request before making changes.

Instructions

Delete a saved SQL query.

Experimental in the DataLens API and written from its document: not measured.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "sql_query_id": "<sql_query_id>"
    },
    "name": "datalens_sqlqueries_delete"
  }
}

Input Schema

NameRequiredDescriptionDefault
dry_runNoSend nothing: answer `{dry_run: true, request}`, the first write the tool would make (null: none).
sql_query_idYesSQL query id.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv0.142.2
    • addedInput schema / properties / dry_run
      Added value: +{
      +  "default": false,
      +  "description": "Send nothing: answer `{dry_run: true, request}`, the first write the tool would make (null: none).",
      +  "type": "boolean"
      +}
  2. Addedv0.122.1

TDQS

B3.1/5.0
Behavior3/5

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

The annotations already declare destructiveHint=true, readOnlyHint=false, idempotentHint=false, and openWorldHint=true, so the safety profile is covered. The description adds one genuinely useful trait not in the annotations: the API is experimental and this definition was derived from documentation rather than measured, which warns about reliability. It does not say whether deletion is irreversible or what happens to references to the query, so it adds only partial behavioral context.

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?

The definition is two short sentences with no filler. The action is stated first and the experimental caveat follows, so the structure is properly front-loaded. The second sentence is slightly awkwardly worded but still earns its place as a reliability warning.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

This is a destructive mutation with no output schema, so the description should say what a successful delete means and whether it is reversible. It does not address dependent objects, permissions, or error behavior. The experimental caveat is the only extra context beyond the annotations and schema.

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%, so the schema already documents both sql_query_id and the dry_run flag in detail. The description adds no parameter-level meaning beyond that. A baseline of 3 is appropriate when the schema does the heavy lifting.

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: 'Delete a saved SQL query.' That is unambiguous about what the tool does. It does not distinguish this from the many sibling delete tools (e.g., datalens_charts_ql_delete, datalens_datasets_delete), so sibling differentiation is left to the name.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

There is no guidance on when to use this tool versus datalens_sqlqueries_update or the other delete siblings. The description also omits prerequisites such as permissions or whether the deletion is permanent. The only contextual note is the 'Experimental... not measured' caveat, which does not help an agent choose this tool.

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

Deploy Server

Other Tools