Skip to main content
Glama
SAS MCP Server

SAS MCP Server

Official
by sassoftware

Save Castable

save_castable
DestructiveIdempotent

Saves an in-memory CAS table to a caslib file or database table so it persists across drops or server restarts; optionally overwrites an existing target.

Instructions

Save an in-memory CAS table to a file (or database table) in a caslib.

A table loaded into CAS memory is lost when it is dropped or the CAS server restarts unless it is saved. This writes it to the caslib's data source, so promote_table_to_memory can load it again later. An existing file is not overwritten unless replace is true.

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": {
      "caslib_name": "<caslib_name>",
      "table_name": "<table_name>"
    },
    "name": "save_castable"
  }
}

Input Schema

NameRequiredDescriptionDefault
replaceNoOverwrite an existing file of that name (default false).
server_idNoCAS server (default ``cas-shared-default``).cas-shared-default
table_nameYesThe loaded table to save.
caslib_nameYesCaslib of the loaded table.
file_formatNo``sashdat`` (default, fastest to load back), ``csv``, ``parquet`` or ``sas7bdat``.sashdat
target_nameNoName of the saved file, without extension (default: the table's name).
target_caslibNoCaslib to write to (default: the table's own).

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv1.19.2

TDQS

A4.1/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=false, destructiveHint=true and idempotentHint=true; the description adds the crucial qualification that matches that profile — an existing file is only overwritten when replace is true, so the agent knows the mutation is conditional and can avoid unintended data loss. It does not mention permission requirements, errors when the target caslib is unwritable, or what happens on partial failures, which keeps it below a 5.

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?

Three short paragraphs: purpose first, then the reason persistence matters, then the overwrite caveat. Each sentence carries information and nothing is redundant with the name. A slight tightening is possible, but structure and front-loading are strong.

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 an output schema present, return values need not be explained, and annotations plus full schema coverage handle safety and parameters. The description supplies the remaining essentials — why to save, where it writes, and the overwrite condition — leaving only edge-case failure behavior unaddressed.

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 every one of the seven parameters (including file_format options and target_name/target_caslib defaults) is already documented in the schema. The description's only added parameter meaning is the replace-flag consequence, which largely restates the schema's own description of that field; a baseline 3 is appropriate.

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?

The first sentence gives a specific verb ('Save') and a precise resource ('an in-memory CAS table to a file or database table in a caslib'), including the memory-to-persistent-store direction. That framing distinguishes it immediately from siblings like drop_castable (removes) and promote_table_to_memory (loads back).

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?

It explains the motivating condition — in-memory tables are lost on drop or server restart — and explicitly points to promote_table_to_memory as the counterpart that reloads a saved table, which helps the agent place it in a workflow. It does not state an explicit when-not-to-use case (e.g., saving a table already persisted, or choosing copy/export tools instead), so it stops short of full routing 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