Skip to main content
Glama
sassoftware

SAS MCP Server

Official
by sassoftware

Upload Data

upload_data

Upload a data file from a local path or URL into a CAS table, with automatic format detection for CSV, Excel, SAS, and TSV. Specify server, caslib, and table name.

Instructions

Upload a data file into a CAS table — read by the server, not the model.

Provide the data by reference through exactly one of:

  • file_path — the server reads the file off its own disk (in stdio mode that's your machine). Disable with ALLOW_LOCAL_FILE_UPLOAD=false.

  • url — the server fetches it over HTTP.

Either way the bytes are read server-side and never pass through the calling model's context window. Sources larger than MAX_UPLOAD_BYTES (default 100 MiB — SAS Viya's own default file-upload limit) are refused. To create a small table you are building inline (no file or URL), use the upload_inline_data tool instead.

The casManagement uploadTable endpoint only accepts an uploaded file (multipart form-data) and has no URL parameter, so url is fetched and sent on as the multipart file part.

Formats. Per the uploadTable API: csv, xls, xlsx (single sheet), sas7bdat, sashdat; tsv is csv with a tab delimiter. parquet is not accepted and is rejected up front with guidance (load via a path-based caslib + promote_table_to_memory, or convert to csv/sas7bdat). The format is auto-detected from the file_path/url extension; pass data_format to override (needed for URLs with no clean suffix).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
urlNoHTTP(S) URL the server fetches the file from.
file_pathNoPath to a data file the server reads directly from disk.
server_idYesCAS server name or ID.
sheet_nameNoFor Excel sources, the worksheet to import (first sheet by default).
table_nameYesName for the new table.
caslib_nameYesTarget caslib name.
data_formatNoOverride format detection. One of csv, tsv, xls, xlsx, sas7bdat, sashdat (aliases: excel→xlsx, tab→tsv, sas→sas7bdat).
contains_header_rowNoWhether the first row holds column names — applies to csv/tsv/Excel (default True).

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed7 schema fields changedv1.2.1
    • addedInput schema / properties / contains_header_row
      Added value: +{
      +  "default": true,
      +  "description": "Whether the first row holds column names — applies\nto csv/tsv/Excel (default True).",
      +  "type": "boolean"
      +}
    • removedInput schema / properties / csv_data
      Removed value: -{
      -  "description": "CSV-formatted data string (including header row).",
      -  "type": "string"
      -}
    • addedInput schema / properties / data_format
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "string"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "description": "Override format detection. One of csv, tsv, xls, xlsx,\nsas7bdat, sashdat (aliases: excel→xlsx, tab→tsv, sas→sas7bdat)."
      +}
    • addedInput schema / properties / file_path
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "string"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "description": "Path to a data file the server reads directly from disk."
      +}
    • addedInput schema / properties / sheet_name
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "string"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "description": "For Excel sources, the worksheet to import (first sheet by default)."
      +}
    • addedInput schema / properties / url
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "string"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "description": "HTTP(S) URL the server fetches the file from."
      +}
    • changedInput schema / required
      Previous value: -[
      -  "server_id",
      -  "caslib_name",
      -  "table_name",
      -  "csv_data"
      -]New value: +[
      +  "server_id",
      +  "caslib_name",
      +  "table_name"
      +]
  2. First observedv0.1.0

TDQS

A4.9/5.0
Behavior5/5

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

The annotations already indicate a non-read-only, non-idempotent mutation, but the description adds substantial behavior beyond that: server-side reading, sources larger than MAX_UPLOAD_BYTES being refused, the endpoint's lack of a URL parameter requiring a multipart fetch, and parquet being rejected up front. No contradiction with annotations exists.

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

Conciseness5/5

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

The description is detailed but tightly organized: a front-loaded summary, clearly separated source options, a size/security constraint, an explicit sibling alternative, an implementation note, and a bolded formats section. Every sentence adds operational information; nothing is filler.

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

Completeness5/5

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

For a tool with 8 parameters, 3 required, an output schema, and multiple source/format edge cases, this description is exceptionally complete. It covers source selection, format limitations, size limits, rejection behavior, sibling routing, and server-side data handling — everything an agent needs to select and invoke the tool correctly.

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 100%, so the schema already documents every parameter. The description adds real value by explaining the exactly-one constraint between file_path and url, the server-side semantics of each, the data_format override use case, and size-limit behavior. It doesn't enrich every parameter (e.g., contains_header_row, sheet_name), but the schema already covers those adequately.

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 description states a specific verb and resource: 'Upload a data file into a CAS table.' It also clarifies a key distinguishing trait — the bytes are read by the server, not by the model — and explicitly contrasts with upload_inline_data. This makes the tool easy to tell apart from siblings like upload_file, upload_inline_data, and promote_table_to_memory.

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

Usage Guidelines5/5

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

The description gives explicit when-to-use guidance: provide data via exactly one of file_path or url, with conditions for each. It also names the alternative upload_inline_data for small inline tables and gives fallback guidance for parquet via promote_table_to_memory. This is model-actionable routing guidance, not vague context.

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