Skip to main content
Glama
jonasliesas

singlestore-mcp-server

by jonasliesas

sql_editor_query

Read-only

Run read-only SQL statements from the SingleStore SQL Editor, streaming the first rows right away while the rest load for paging; data-changing SQL routes to confirmation.

Instructions

Run a read-only statement from the SQL Editor app, streaming its result.

Returns as soon as the first ``max_rows`` rows (the first page) are in, or the result is complete; the
rest keeps loading on the server (up to SINGLESTORE_MCP_EDITOR_MAX_ROWS, default 100,000 rows) and the
app pages through it with sql_editor_rows (``done`` / ``loaded`` give the progress and the total).
``stream_id`` is chosen by the app, so its Stop (sql_editor_stop) works before this call returns;
``replaces``: the tab's previous result, dropped. Statements that change data or schema are answered
with ``needs_confirmation`` instead of running; the app then asks the user and uses
sql_editor_execute. Every run lands in the editor's history (when it has finished), with the tab
(``tab_id``, its label ``tab``) and open ``file`` it ran from.

Input Schema

NameRequiredDescriptionDefault
sqlYes
tabNo
fileNo
tab_idNo
databaseNo
max_rowsNo
replacesNo
stream_idNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changedv0.10.1
    • addedInput schema / properties / replaces
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "string"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "title": "Replaces"
      +}
    • addedInput schema / properties / stream_id
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "string"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "title": "Stream Id"
      +}
  2. Changed3 schema fields changedv0.9.0
    • addedInput schema / properties / file
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "string"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "title": "File"
      +}
    • addedInput schema / properties / tab
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "string"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "title": "Tab"
      +}
    • addedInput schema / properties / tab_id
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "string"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "title": "Tab Id"
      +}
  3. Addedv0.8.1

TDQS

A4.5/5.0
Behavior5/5

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

With readOnlyHint already declared, the description still adds substantial behavior beyond annotations: streaming returns at the first max_rows page, the server keeps loading up to SINGLESTORE_MCP_EDITOR_MAX_ROWS (default 100,000), stream_id is assigned by the app so Stop works mid-call, and replaces drops the tab's prior result. That is exactly the kind of non-obvious runtime context an agent needs.

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 purpose is front-loaded in the first clause, followed by well-organized details on streaming, paging, and routing. It is dense and long, but nearly every clause carries distinct operational information; only the parenthetical about tab label and file is marginally tautological.

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 an 8-param, no-output-schema tool, the description covers the important return semantics (first page arrives, remainder pages via sql_editor_rows, done/loaded progress) and the read-only constraint. It does not explain the 'database' parameter or the shape of returned rows, which leaves minor gaps, but the essentials for correct invocation are present.

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?

Schema description coverage is 0%, so the description must carry the load, and it does for most params: max_rows (first page size), stream_id (app-chosen, enables Stop), replaces (drops prior tab result), tab_id/tab (tab identity), and file (source file). Only 'database' is left entirely undefined, so it compensates well but not completely for the 8-param gap.

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?

States a specific verb and resource ('Run a read-only statement from the SQL Editor app, streaming its result') and immediately distinguishes itself from siblings: it names sql_editor_execute for mutating statements, sql_editor_rows for paging, and sql_editor_stop for cancellation. An agent can tell what this does and what it is not without opening a schema.

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?

Explicitly routes mutating statements elsewhere ('Statements that change data or schema are answered with needs_confirmation ... uses sql_editor_execute') and points to sql_editor_rows/sql_editor_stop for follow-up. It gives clear context for use, but does not state when to prefer this over other query entry points such as run_sql or sas_query, so it falls short of full when/when-not coverage.

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