Skip to main content
Glama
jonasliesas

singlestore-mcp-server

by jonasliesas

sql_editor_save_draft

Autosave a SQL Editor tab's text, database, and cursor state without writing the open .sql file, so unsaved drafts can be restored.

Instructions

Autosave one SQL Editor tab's text, database and cursor (never writes the open .sql file itself).

``file_version``: for a file on SAS Viya, the version (ETag) the editor opened or last saved, so Save after
a restart still notices a newer version on the server.

``saved_hash`` is the editor's hash of the open file's last saved text, so a
restored draft knows whether it has unsaved changes; ``dirty`` says so for
the tab bar. ``origin``: the workload statement the tab was opened from
(``{"workload", "statement_id", "statement_name"}``), for "Update in workload".
``language``: what the tab runs as (singlestore, procsql, fedsql, cas); ``sas``: its SAS library / caslib
and PROC SQL options (outobs, noexec, feedback, pushdown).
``closed`` in the result: the tab was closed (elsewhere) and the text wasn't kept.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
sasNo
sqlYes
headNo
dirtyNo
anchorNo
originNo
tab_idNo
databaseNo
languageNosinglestore
file_nameNo
file_pathNo
saved_hashNo
file_versionNo
file_externalNo
continue_on_errorNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changedv0.10.1
    • addedInput schema / properties / file_version
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "string"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "title": "File Version"
      +}
    • addedInput schema / properties / sas
      Added value: +{
      +  "anyOf": [
      +    {
      +      "additionalProperties": true,
      +      "type": "object"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "title": "Sas"
      +}
  2. Addedv0.9.0

TDQS

A4/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=false and destructiveHint=false, and the description is consistent with that, adding that this is an autosave that deliberately does not touch the open file. It further discloses result behavior ('closed' means the tab was closed elsewhere and text was discarded), which is real context the annotations do not carry.

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 core action is front-loaded in the first sentence and the parameter glosses are organized as discrete backtick-labeled items, avoiding wasted prose. Size is reasonable for a 15-parameter tool, though the parenthetical aside and escaped formatting make the opening slightly clunky.

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

Completeness3/5

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

No output schema exists, and the description partially compensates by explaining the 'closed' result field. But with 15 parameters, no schema descriptions, and only safety annotations, several inputs (head/anchor cursor semantics, continue_on_error, file_external) are never covered, leaving the definition only partially complete.

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 0% across 15 parameters, so the description carries the burden and explains only file_version, saved_hash, dirty, origin, language, and sas. It leaves sql, head, anchor (the cursor fields referenced by the opening sentence), tab_id, database, file_name, file_path, file_external, and continue_on_error undefined, so a meaningful share of parameters remain opaque.

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 ('Autosave one SQL Editor tab's text, database and cursor') and immediately scopes it against the sibling file-save operation with '(never writes the open .sql file itself)'. An agent can distinguish this from sql_editor_save_file without opening either 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?

The parenthetical exclusion effectively says when NOT to reach for this tool (when you intend to persist the .sql file), implying the alternative path. However, it never names that alternative explicitly or states a positive triggering condition ('use this while editing, to checkpoint state'), so it stops short of full when/when-not guidance.

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