Skip to main content
Glama
singlestore-mcp-server

singlestore-mcp-server

by jonasliesas

notebook_sas_python

Destructive

Runs Python code as PROC PYTHON in a SAS Viya compute session, enabling notebook cells to share Python variables and WORK tables without a local kernel.

Instructions

Run a "Python in SAS" cell: the code as PROC PYTHON in the Workspace's SAS Compute session of the SAS Viya connection (default: the active one) - the SQL Editor's session, queue, pre-warm and Stop (sas_stop), so Python variables persist between cells and WORK tables are the session's; Restart SAS session (sas_session_reset) clears both. Doesn't need a local kernel. Code containing "endsubmit" is refused.

``run_id`` (chosen by the app, so Stop works at once) names the run; ``wait_ms``: how long to wait for the
result (default: until done); a run still going answers ``running`` (``python_started`` false: Python
still has to start in the session, ~8 s) and the app asks again with notebook_sas_python_status. Done:
``outputs`` (nbformat: stdout, the SAS log / ODS output, a Python exception) and ``status`` ok / error /
aborted.

Input Schema

NameRequiredDescriptionDefault
run_idNo
sourceYes
wait_msNo
connectionNo
notebook_idNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.11.0

TDQS

A3.9/5.0
Behavior5/5

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

Beyond the annotations (readOnlyHint=false, destructiveHint=true, openWorldHint=false), the description discloses real behavioral traits: Python variables persist between cells, WORK tables belong to the session, sas_session_reset clears both, runs can be stopped via sas_stop, code containing "endsubmit" is refused, and a run may return "running" with python_started false during the ~8 s Python startup. That is exactly the kind of state-persistence and refusal detail the annotations cannot convey.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The key action is front-loaded and every sentence conveys real information, but the second sentence is a run-on with a dangling clause ('- the SQL Editor's session, queue, pre-warm and Stop') that reads as a fragment and forces re-parsing. Dense is fine; garbled is not.

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?

With no output schema, the description usefully explains the return shape (nbformat outputs for stdout/SAS log/ODS/Python exception, status ok/error/aborted) and the async polling loop, which is the main complexity of this tool. Only the notebook_id parameter and the interaction with notebook_sas_python_status's own arguments are left unexplained.

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 explain the two non-obvious parameters: run_id is chosen by the app so Stop works immediately, and wait_ms controls how long to wait (default until done), plus the default connection is the active one. The notebook_id parameter and the exact type/format of connection are never mentioned, so coverage is strong but not complete.

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 opening clause gives a specific verb and resource: run a "Python in SAS" cell as PROC PYTHON inside the SAS Viya Workspace's SAS Compute session. "Doesn't need a local kernel" implicitly separates it from notebook_run/notebook_kernel_start, but the distinction from the sibling notebook_sas_cell (SAS code vs Python) is never stated, and the dense clause '- the SQL Editor's session, queue, pre-warm and Stop (sas_stop)' obscures the core statement.

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?

It tells the agent that no local kernel is required, which implies 'use this instead of notebook_run when you are working in the SAS Compute session', and it names notebook_sas_python_status as the follow-up poll. However there is no explicit when-to-use/when-not statement and no direct comparison with notebook_sas_cell or notebook_run, leaving the routing inference to the reader.

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