Skip to main content
Glama
sassoftware

SAS MCP Server

Official
by sassoftware

Update Code File

update_code_file
DestructiveIdempotent

Change a code file's working revision, including its code, name, description, or signature types, in SAS Viya. Lock the revision first to preserve the current state before making changes.

Instructions

Change a code file's working revision: its code, name, description or signature types.

New code makes Viya read the signature again. Lock a revision first (lock_decisioning_asset_revision) to keep the current state.

Input Schema

NameRequiredDescriptionDefault
codeNoNew code.
nameNoNew name.
folderNoOnly used for a code file that is in no folder yet.
signatureNoTypes and descriptions (needed for Python, see create_code_file).
descriptionNoNew description.
code_file_idYesThe code file ID.

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv1.19.0

TDQS

A4.3/5.0
Behavior4/5

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

Annotations already declare this as a destructive, idempotent mutation. The description adds meaningful behavior beyond annotations: new code causes Viya to re-read the signature, and locking a revision preserves the current state. It does not detail permissions or rollback behavior, but the added operational context is useful.

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 two short, front-loaded sentences with no wasted text. The core action comes first, followed by the key behavioral note and prerequisite.

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?

With full schema coverage, an output schema, and annotations covering safety and idempotency, the description supplies the remaining critical context: the working-revision scope, signature re-read behavior, and locking prerequisite. An agent has enough information to invoke it correctly.

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 the schema already documents all six parameters. The description lists most mutable fields and notes that new code affects signature reading, but it does not add syntax or format detail beyond the schema. Baseline 3 is appropriate when the schema carries parameter semantics.

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: changing a code file's working revision. It also names the exact mutable fields (code, name, description, signature types), so an agent can distinguish this from create_code_file and unrelated update tools.

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 gives a clear prerequisite for preserving current state: lock a revision first via lock_decisioning_asset_revision. It implies this is the tool for updating an existing code file, but does not explicitly contrast when to use create_code_file or update_custom_function instead.

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