Skip to main content
Glama
sassoftware

SAS MCP Server

Official
by sassoftware

upload_data

Upload a data file or URL into a SAS CAS table server-side, preventing files from passing through the model context. Supports CSV, Excel, and SAS formats. Specify the CAS server, caslib, and target 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. Dates show when Glama detected each change.

  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

A5/5.0
Behavior5/5

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

The description discloses that data is read server-side and never passes through the model context, and it explains the file size limitation. It also details how the URL parameter is handled by the underlying casManagement uploadTable endpoint (fetched and sent as multipart), which goes beyond the annotations and provides comprehensive behavioral transparency.

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 structured with clear paragraphs and bullet points, and every sentence provides necessary information. Although somewhat long, it avoids fluff, and the small amount of repetition (e.g., 'read by the server') is used for emphasis rather than redundancy. It is well-organized and efficiently communicates all key aspects.

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?

Given the presence of an output schema, the description appropriately focuses on input and behavior rather than return values. It covers all operational aspects—data sources, file size limits, format handling, and guidance for alternative tools—making it complete for the tool's intended use.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The description adds significant meaning to each parameter beyond the schema descriptions. It explains the file_path semantics in stdio mode, the need for data_format override for URLs without clean suffixes, and clarifies that contains_header_row applies to csv/tsv/Excel. This enrichment makes parameter usage much clearer than the schema alone.

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 clearly states that the tool uploads a data file into a CAS table and explicitly contrasts it with upload_inline_data for small inline tables. It specifies the two data sources (file_path and URL) and clarifies that data is read server-side, making the tool's purpose unambiguous and distinct from sibling tools.

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 provides explicit when-to-use guidance by recommending upload_inline_data for small inline tables and offering handling advice for unsupported parquet formats. It also mentions file size limits (MAX_UPLOAD_BYTES) and the need for data_format override in specific cases, giving clear conditions for appropriate usage.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/sassoftware/sas-mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server