Skip to main content
Glama
sassoftware

SAS MCP Server

Official
by sassoftware

Upload File

upload_file

Upload a file to SAS Viya Files Service, either from local disk, URL, or inline text, and optionally place it in a Content folder so SAS programs can access it.

Instructions

Upload a file to the Viya Files Service, optionally into a Content folder.

Provide the file content through exactly one of:

  • content — inline text (the original behaviour; text files only).

  • file_path — a path the server reads directly from its own disk (in stdio mode that's your machine). Handles binary files (xlsx, zip, images) untouched. Disable with ALLOW_LOCAL_FILE_UPLOAD=false.

  • url — an HTTP(S) URL the server fetches the file from. Also binary-safe.

file_path and url sources larger than MAX_UPLOAD_BYTES (default 100 MiB — SAS Viya's own default file-upload limit) are refused.

parent_folder_uri files the upload into a Content folder (e.g. /folders/folders/{folderId}) — the location %include/filesrvc ingestion and other folder-scoped consumers need. Without it the file lands unfiled under the caller's user context.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
urlNoHTTP(S) URL the server fetches the file from.
contentNoFile content as an inline string (small text files).
file_nameYesName for the file.
file_pathNoPath to a file the server reads directly from disk.
content_typeNoMIME type. Defaults to ``text/plain`` for ``content``, else guessed from ``file_name`` (``application/octet-stream`` when unguessable).
parent_folder_uriNoTarget folder URI (``/folders/folders/{id}``); get one from list_files or the Folders service.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed12 schema fields changedv1.7.0
    • addedInput schema / properties / content / anyOf
      Added value: +[
      +  {
      +    "type": "string"
      +  },
      +  {
      +    "type": "null"
      +  }
      +]
    • addedInput schema / properties / content / default
      Added value: +null
    • changedInput schema / properties / content / description
      Previous value: -"File content as a string."New value: +"File content as an inline string (small text files)."
    • removedInput schema / properties / content / type
      Removed value: -"string"
    • addedInput schema / properties / content_type / anyOf
      Added value: +[
      +  {
      +    "type": "string"
      +  },
      +  {
      +    "type": "null"
      +  }
      +]
    • changedInput schema / properties / content_type / default
      Previous value: -"text/plain"New value: +null
    • changedInput schema / properties / content_type / description
      Previous value: -"MIME type (default 'text/plain')."New value: +"MIME type. Defaults to ``text/plain`` for ``content``,\nelse guessed from ``file_name`` (``application/octet-stream``\nwhen unguessable)."
    • removedInput schema / properties / content_type / type
      Removed value: -"string"
    • addedInput schema / properties / file_path
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "string"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "description": "Path to a file the server reads directly from disk."
      +}
    • addedInput schema / properties / parent_folder_uri
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "string"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "description": "Target folder URI (``/folders/folders/{id}``);\nget one from list_files or the Folders service."
      +}
    • 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: -[
      -  "file_name",
      -  "content"
      -]New value: +[
      +  "file_name"
      +]
  2. First observedv0.1.0

TDQS

A4.5/5.0
Behavior4/5

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

Annotations already indicate this is not read-only, and the description adds meaningful behavioral detail: exactly one source must be provided, file_path and url have a size limit, file_path reads from the server's own disk, and unfiled uploads land under the caller's user context. No contradiction with annotations; it enriches them with operational constraints.

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 longer than average, but every paragraph earns its place given three mutually exclusive input modes and a folder-scoping option. The key target statement is front-loaded, and bullet-like formatting makes the modes and their constraints easy to scan. No filler or redundant restatement of the tool title.

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?

The tool has six parameters, three input modes, a configuration-dependent limit, and folder-scoping behavior, and the description covers all of these adequately. The presence of an output schema means return-value details do not need to be explained. Nothing essential for correct invocation is 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 descriptions already cover all six parameters at 100%, giving a solid baseline. The description adds value beyond the schema by stating the exactly-one-of constraint, the MAX_UPLOAD_BYTES limitation for file_path and url, and the folder-scoping role of parent_folder_uri. This is meaningful semantic enrichment rather than mere repetition.

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?

States a specific verb and resource: 'Upload a file to the Viya Files Service'. It also clarifies optional Content-folder scoping, which helps distinguish it from broader data-upload tools like upload_data or upload_inline_data. The title alone would be vague, but the description adds a precise target and storage context.

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?

Provides clear guidance on when to use each input mode: content for text, file_path for binary files read from server disk, and url for binary-safe HTTP fetching. It also explains when parent_folder_uri is needed for folder-scoped consumers. It does not explicitly name sibling alternatives or say when not to use this tool, so it stops short of a 5.

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