Skip to main content
Glama
jonasliesas

singlestore-mcp-server

by jonasliesas

sql_editor_save_file

Save SQL editor content as .sql files locally or to SAS Viya, checking overwrite and version conflicts before replacing existing files.

Instructions

Save the editor's SQL as a .sql file in the SQL Editor's folder, or to a file on SAS Viya.

An existing file is only replaced with ``overwrite``; otherwise the result
says ``exists`` so the app can ask first.

SAS Viya files (``name`` a ``sas-content://`` / ``sas-server://`` ref): ``expected_version`` is the version
(ETag) the editor opened; when the file on Viya is newer the result says ``conflict`` (nothing written) and
the app asks before saving with ``overwrite``. A ref of another SAS Viya connection than the active one
answers ``connection_mismatch``; ``use_active`` saves it to the same path on the active connection.

Input Schema

NameRequiredDescriptionDefault
sqlYes
nameYes
overwriteNo
use_activeNo
expected_versionNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changedv0.10.1
    • addedInput schema / properties / expected_version
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "string"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "title": "Expected Version"
      +}
    • addedInput schema / properties / use_active
      Added value: +{
      +  "default": false,
      +  "title": "Use Active",
      +  "type": "boolean"
      +}
  2. Addedv0.8.1

TDQS

B3.2/5.0
Behavior1/5

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

Annotations declare destructiveHint=false, but the description states that an existing file is replaced when overwrite is used, which is a destructive update. This directly contradicts the annotation, forcing a score of 1 under the rubric.

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 description is organized into three short paragraphs, front-loading the core save action and then detailing overwrite and Viya-specific behavior. It is dense but every sentence conveys actionable behavior, with no obvious filler.

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 save operation spanning local folders and SAS Viya with version checks and connection mismatch, the description supplies status outcomes (exists, conflict, connection_mismatch) and parameter roles. No output schema is present, and no critical invocation detail appears to be missing.

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 coverage is 0%, so the description carries the full burden. It defines expected_version as the ETag the editor opened, overwrite as the condition for replacing an existing file, use_active as saving to the same path on the active connection, and name as a sas-content:// or sas-server:// reference for Viya files, adding substantial meaning 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 (save) and resource (the editor's SQL as a .sql file), and distinguishes between saving in the SQL Editor's folder and saving to a SAS Viya file. It does not explicitly name or contrast with sibling tools like sql_editor_save_draft or sas_viya_save, but the core purpose is unambiguous.

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

Usage Guidelines3/5

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

The description explains behavioral scenarios such as overwrite, conflict, and connection mismatch, which imply usage context. However, it never states when to choose this tool over alternatives such as sql_editor_save_draft or sas_viya_save, so guidance remains implied rather than explicit.

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