SAS Viya
Execute SAS code and query Compute, CAS, and model APIs on SAS Viya via OAuth 2.0.
Connector by sassoftware · GitHub account verified by the MCP Registry
Install
Works with Claude Code, Codex, VS Code, Cursor, Windsurf, Claude Desktop. Read the repository before you give any tool access to your data.
npx agentmarket install connector/sassoftware-sas-mcp-server
Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.
Get the weekly diff
The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.
About
Use cases: data-analysis, data-visualization
Reviews
Write a reviewNo reviews yet. Installed it? Reviews come from verified installers only. How reviews work
Permissions
What this server can do and what it asks for, from its tool list, install config and code. Checked Oct 25, 2026.
- Tools
- 57 read · 44 write · 11 delete · 3 not yet classified
- Secrets
- None asked for
- Install scripts
- None found
- Runs as
- Docker image
Tools by what they do 115
Read from the source code; the running server may list different tools.
Read 57 · Look things up without changing anything.
catalog_find_instancecatalog_get_adhoc_analysiscatalog_get_agent_historycatalog_list_agentscatalog_searchcatalog_search_helperdescribe_report_objectsfind_folderget_business_ruleget_business_rulesetget_castable_columnsget_castable_data
Show 45 more tools
get_castable_infoget_compute_table_dataget_decision_flowget_decision_flow_codeget_decision_flow_revisionget_decisioning_assetget_decisioning_asset_codeget_glossary_termget_glossary_term_typeget_job_logget_job_statusget_lookup_tableget_mas_module_step_signatureget_reportget_report_outlinelist_business_ruleslist_business_ruleset_revisionslist_business_rulesetslist_cas_serverslist_caslibslist_castableslist_compute_columnslist_compute_contextslist_compute_librarieslist_compute_tableslist_decision_flow_revisionslist_decision_flowslist_decisioning_asset_revisionslist_decisioning_assetslist_fileslist_glossary_term_typeslist_glossary_termslist_jobslist_mas_moduleslist_ml_projectslist_publishing_destinationslist_registered_modelslist_reportslist_source_tableslist_table_termslist_term_assetsscore_datasearch_glossary_termsvalidate_custom_functionvalidate_decision_expression
Write 44 · Create, change, send or run things.
activate_lookup_tableapply_report_operationsassign_glossary_termcancel_jobcatalog_download_table_profilecatalog_run_agentcopy_decisioning_assetcopy_reportcreate_business_rulecreate_business_rulesetcreate_code_filecreate_custom_function
Show 32 more tools
create_decision_flowcreate_glossary_termcreate_glossary_term_typecreate_lookup_tablecreate_ml_projectcreate_reportcreate_segmentation_treecreate_segmentation_tree_from_tablecreate_value_listdownload_fileimport_glossary_termslock_business_ruleset_revisionlock_decision_flow_revisionlock_decisioning_asset_revisionpromote_table_to_memorypublish_decision_flowpublish_ml_champion_modelregister_ml_champion_modelrun_ml_projectsubmit_batch_jobupdate_business_ruleupdate_business_rulesetupdate_code_fileupdate_custom_functionupdate_decision_flowupdate_glossary_termupdate_lookup_tableupdate_segmentation_treeupdate_value_list_entriesupload_dataupload_fileupload_inline_data
Delete 11 · Delete, drop, revoke or wipe things.
delete_business_ruledelete_business_rulesetdelete_decision_flowdelete_decisioning_assetdelete_glossary_termdelete_glossary_term_typedelete_reportexecute_sas_codereset_compute_sessionunassign_glossary_termupdate_glossary_term_type
Not yet classified 3 · We could not tell from the name and description.
catalog_run_adhoc_analysisexport_reportquery_data
Secrets and settings it asks for
Other settings (environment variables or headers).
CLIENT_IDCOMPUTE_CONTEXT_NAMEMCP_APPSMCP_READ_ONLYMCP_STATELESS_HTTPMCP_TIERSSSL_VERIFYVIYA_CLIENT_TIMEOUTVIYA_ENDPOINT
Network hosts it talks to 2
github.com· found in codeyour-viya-server.com· found in code
Files it touches
- Your home directory (~)
~/.sas-mcp-server/credentials.json~/.sas-mcp-server/http-debug.log~/.sas-mcp-server/login-state.json~/.sas-mcp-server/tool-usage.log~/.sas/credentials.json- Any path the agent passes to its tools
Tools (115)
Read from the source code; the running server may differ. Descriptions are the server’s own words; hidden characters are shown as [U+…].
activate_lookup_tableMake a lookup table version the one rules use: publish its entries to MAS and CAS. Decisions already published to MAS use the newly active entries on their next call; nothing needs to be published again. The previously active version stays in use until this one is active. ``outcome`` is active, running (still publishing after ``wait_seconds``) or failed (``activationError`` says why). ``republish`` copies the already active version to MAS and CAS again — for a destination that lost it, such as CAS after a restart. Args: lookup_table: The lookup table's ID or exact name. version: "ne…
apply_report_operationsApply an ordered batch of operations to a report — the authoring workhorse. This is how you add pages, add objects (any of the ~60 VA visual, control, and content types), set parameters, and swap data sources. ``operations`` is the native SAS Visual Analytics operations array; the whole batch is applied atomically (all succeed or nothing changes). Operation keys (one per array element): ``addData``, ``addPage``, ``addObject``, ``updateObject``, ``setParameterValue``, ``updateData``, ``changeData``, ``applyDataView``. Call ``describe_report_objects`` for each operation's shape (``operation="a…
assign_glossary_termAssign a business term to a table column — the step that makes a term govern data. Creating a term only defines a word. This attaches it to the column that carries it, and it is what ``list_table_terms``, ``list_term_assets`` and the catalog's ``Column.term`` facet all read. Assigning the same term to the same column twice is reported, not duplicated. Args: column_name: The column to assign the term to (case-insensitive). term_id: The glossary term UUID. term_name: Exact term name, if the id is not known. One of the two is required. resource_uri: The table's source UR…
cancel_jobCancel a running job. Args: job_id: ID of the job to cancel.
catalog_download_table_profileDownload a catalog table's data dictionary and profile as CSV. Returns the table's column metadata plus, by default, its profile (column statistics and data-quality metrics). If the table has not been profiled yet, this returns a recommendation to run ``catalog_run_adhoc_analysis`` (pre-filled with the table's URI and type) instead of an empty profile. Identify the table by either ``instance_id`` or ``resource_uri`` (give one). Passing ``resource_uri`` lets you run search → profile → download without ever handling an instance id: the asset is resolved by ``resourceId`` the same way ``catalog…
catalog_find_instanceResolve the catalog instance for a source-asset URI. ``catalog_search`` finds assets by free text and facets, but the profiling and download tools key off a catalog *instance id*. When you already hold a resource URI — the ``resource_uri`` from a search hit, or a CAS table path — this looks the instance up directly by ``resourceId`` (the same filter the profiling workflow uses) and returns its id plus the key profile attributes. Use it to tell at a glance whether the asset has been profiled (``analysisTimeStamp``) and what semantic metadata it carries (``informationPrivacy``, ``nlpTerms``, ``…
catalog_get_adhoc_analysisGet the status of an ad-hoc analysis job, and whether its profile is ready. The job reaching a terminal ``status`` is *not* sufficient: the profile attributes are written onto the asset a little later, so a download fired the instant the job completes can come back empty. To close that gap, when the job carries a resource this also resolves the target catalog instance and reports ``profile_ready`` (the asset's ``analysisTimeStamp`` is populated — the same gate ``catalog_download_table_profile`` uses) and ``information_privacy`` (non-empty once the NLP semantic enrichment has landed). Poll unt…
catalog_get_agent_historyGet the execution history of a catalog agent's runs. Each record reports a run's status and how much metadata it populated (tables enumerated/added/updated/removed), so you can confirm a run started by ``catalog_run_agent`` finished and what it changed. Args: agent_id: ID of the agent (see catalog_list_agents). limit: Maximum run records to return (default 20). start: Offset of the first record (default 0).
catalog_list_agentsList SAS Data Governance discovery agents. Agents crawl a data source (server/library) to discover assets and collect their metadata into the catalog. Use ``catalog_run_agent`` to start one and ``catalog_get_agent_history`` to see what a run produced. Args: limit: Maximum agents to return (default 50). start: Offset of the first agent (default 0). filter_name: Optional name filter (substring match).
catalog_run_adhoc_analysisSubmit an ad-hoc analysis (profiling) job for a table in the catalog. Profiles the table — computing the data dictionary, column statistics, and data-quality metrics that ``catalog_download_table_profile`` returns. The job runs asynchronously and may take a while; poll ``catalog_get_adhoc_analysis`` with the returned job id until the profile is ready. The three NLP job parameters are enabled by default — they drive the semantic enrichment that populates an asset's ``informationPrivacy``, ``nlpTerms``, ``nlpTags``, and ``mostImportantFields`` (the privacy and keyword signals the catalog is mo…
catalog_run_agentStart a catalog discovery agent run (asynchronous). Triggers the agent to crawl its data source and populate/refresh catalog metadata. The run is asynchronous — results are applied to the catalog in the background; poll ``catalog_get_agent_history`` to track completion. Note: the Catalog API can only *start* an agent, not stop one already running. Args: agent_id: ID of the agent to run (see catalog_list_agents).
catalog_searchSearch the SAS Data Governance catalog for assets (tables, columns, reports, ...). The catalog is a metadata index across the whole Viya environment, so this finds assets without needing to know their server/library first. Each hit includes the asset's ``resource_uri`` — the URI you can hand to the matching tool (e.g. get_report, get_castable_data) to act on the live asset — and an ``attributes`` map with whatever metadata the catalog holds for it (commonly ``library``, ``rowCount``, ``columnCount``, ``completenessPercent``, ``reviewStatus``, ``informationPrivacy``, and ``analysisTimeStamp``)…
catalog_search_helperDiscover how to search the catalog: list facets, or values for one facet. Call with no ``facet`` to list the available facets — the fields you can constrain in a ``catalog_search`` query. Call with a ``facet`` name to get the suggested/valid values for that facet (e.g. the asset types or review statuses that actually exist). Use the results to build precise ``catalog_search`` queries. Args: facet: Facet name to get suggested values for (e.g. 'AssetType'). If omitted, returns the list of available facets instead. query: Optional filter — when listing facets, matches facet name…
copy_decisioning_assetCopy a rule set (with its rules), decision, segmentation tree, code file, value list or lookup table. Custom functions and function categories cannot be copied. A lookup table's copy holds the entries of its active version (or of ``revision_id``, a version ID or label) and is not active itself. Args: asset_type: rule_set, decision, segmentation_tree, code_file, value_list or lookup_table. asset_id: The ID of the source. name: The name of the copy. folder: Where to store the copy: a folder path such as ``/Public/Content/Decisions``, ``My Folder``, a folder ID, …
copy_reportCopy a Visual Analytics report to a new report, returning the copy's id. Useful for tailoring a report to a new audience or for the copy-and-replace pattern — copy, then ``apply_report_operations`` with a ``changeData`` op to point the copy at a different table. Returns ``{"status": "copied", "id": ..., "name": ..., "source_report_id": ...}``. Args: report_id: The source report id to copy. name: Optional name for the copy (``resultReportName``); omit to let Viya name it. folder: Optional target folder URI (``resultFolder``); omit for the caller's My Folder. on…
Show 100 more tools
create_business_ruleCreate a new rule inside an existing SAS Business Rules rule set. A rule set can hold multiple rules, each evaluated per its conditional type. Condition/action expressions must include the variable name directly (e.g. ``"credit_score < 650"``, not just ``"< 650"``) — the API accepts the latter as valid but generates DS2 code with a missing left-hand operand. Boolean signature variables must be compared with ``= 0``/``= 1`` in expressions, not ``= false``/``= true``. Args: ruleset_id: The rule set UUID to add the rule to (not its name — list_business_rulesets returns both). name: Rule…
create_business_rulesetCreate a new SAS Business Rules rule set in a SAS Content folder. A rule set with no rules cannot be used in a decision flow — follow up with ``create_business_rule`` to populate it. The rule set is always stored in a folder. Without ``folder`` it goes to the deployment's default folder; when there is none, the call is refused and you should ask the user which folder to use. The result's ``folder`` says where it was stored. Args: name: Rule set name (max 30 chars). signature: Input/output/inOut variables the rules operate on, each ``{"name", "dataType", "direction"}`` — data…
create_code_fileCreate a SAS Intelligent Decisioning code file: DS2, Python or SQL. Viya reads the signature from the code. DS2: a package with ``method execute(...)`` — ``in_out`` parameters are outputs: ``package "${PACKAGE_NAME}" /inline; method execute(double score, in_out varchar band); ... end; endpackage;``. Python: ``def execute(score):`` with ``'Output: band'`` as the first statement and the outputs returned. SQL: ``{?:name:type}`` marks an input and ``{:name:type}`` an output column; the result rows also come back as a data grid. Python cannot state types in its code, so give ``signature`` with th…
create_custom_functionCreate a DS2 custom function that rule expressions can call, after checking that it compiles. The code is one DS2 method: ``method risk_band(double score) returns varchar(10); ... return 'LOW'; end;``. Its name is the function's name. A rule then uses it in an expression, e.g. an assignment ``risk_band(credit_score)``. A new function takes a few seconds to be visible to validate_decision_expression. Args: code: The DS2 method. category: The function category, by name or ID; a name that does not exist yet is created. description: Optional description.
create_decision_flowCreate a SAS Intelligent Decisioning flow: rule sets, segmentation trees, code files, models, sub-decisions, assignments, conditions and branches. Give the flow as ``steps`` (every step kind, wired by name) or, as before, ``rule_set_steps`` (rule sets only, wired by hand). A flow that sets defaults, scores a model, branches on its score and checks the result:: steps = [ {"type": "assignment", "name": "Defaults", "assignments": {"offer": "NONE", "credit_limit": 0}}, {"type": "model", "id": "<model repository id>"}, {"type": "branch", "branch_type": "range"…
create_glossary_termCreate a business term in the SAS Business Glossary. ``attributes`` is keyed by the attribute **labels** from ``get_glossary_term_type`` — call that first, because a term type can make attributes mandatory and a term missing one is rejected. Pass each value in its natural Python form and it is converted to the one spelling the glossary accepts: * **boolean** — ``True`` / ``False`` (the *strings* ``"true"``/``"false"`` are rejected by Viya; that conversion happens here) * **multi-select** — a list, e.g. ``["Retail", "Wholesale"]`` * **date** — ``"2026-09-04"`` * **date-time** — ``"2026-09-0…
create_glossary_term_typeCreate a term type — the template that fixes what a term must carry. A term type declares the custom attributes every term of that type holds, and which are mandatory. Without this tool a deployment's types can only be created in the SAS UI, so a glossary could be read and populated through MCP but never *designed* through it. Each attribute is ``{"label": ..., "type": ...}`` plus, optionally, ``required``, ``allowed_values``, ``default`` and ``description``: * ``single-line``, ``multi-line`` — free text * ``single-select``, ``multi-select`` — need ``allowed_values`` * ``boolean``, ``date``…
create_lookup_tableCreate a SAS Intelligent Decisioning lookup table: keys and the value stored for each. A rule uses it with a condition ``{"type": "lookup", "term": {...}, "lookup": "<name or ID>"}`` (is the variable's value a key?) or an action ``{"type": "lookupValue", "term": {...}, "expression": "<key expression>", "lookup": "<name or ID>"}`` (assign the key's value). Rules only see an active version. With ``activate`` the table is published to MAS and CAS right away (usually seconds); otherwise call activate_lookup_table once the entries are final. Keys are text up to 256 characters, values up to 512; …
create_ml_projectCreate a new AutoML pipeline automation project from a CAS table. The training table must already be loaded into CAS memory at **global** scope. This tool verifies that first and returns an actionable error otherwise (use ``promote_table_to_memory`` to load + promote a source table, and ``list_source_tables`` to find one). The data-table URI is built from ``server_id``/``caslib_name``/``table_name``. Args: project_name: Name for the project. caslib_name: Caslib containing the training table. table_name: Name of the (loaded, global) training table. target_variable: Name of the…
create_reportCreate a Visual Analytics report and return its id for further edits. Creates an empty report shell, or — if you pass ``operations`` — builds the whole report in one atomic call (bind data, add pages, add objects). Building at creation avoids leaving an empty report behind if a later edit fails. Returns ``{"status": "created", "id": ..., "name": ...}`` plus a ``created`` summary whose object names/labels are what follow-up placement and exports target; feed the id to ``apply_report_operations`` to keep editing. Note: VA prepends an empty default "Page 1" before any pages your operations add, …
create_segmentation_treeCreate a SAS Intelligent Decisioning segmentation tree. A node tests one variable; its ``valueNodes`` are checked in order and the first match wins, then goes to ``next`` (another node) or to an ``outcomeName``. A value is a value, several separated by ``;`` (``"A;B"``), a comparison (``">=630"``), a range with ``v`` (``"600<=v<630"``), or ``"Other"`` for everything else, missing values included. Example:: node = {"variable": "score", "valueNodes": [ {"value": ">=630", "outcome": "low_risk"}, {"value": "Other", "outcome": "high_risk"}]} outcomes = [{"name": "low_risk"…
create_segmentation_tree_from_tableBuild one segmentation tree from a strategy table: one row per branch, a column per decision key. This is how a FICO-style strategy export (TRIAD, Blaze) becomes a SAS Intelligent Decisioning tree. Decision keys are tested in the order of ``key_columns``; a key whose values do not differ within a subtree is not tested there. Each leaf leads to an outcome that assigns the row's ``outcome_columns``. With ``split="lower_bound"`` a key's value is the lower bound of a range, as such exports write it: sibling values ``0, 600, 630`` become ``>= 630``, ``600 to < 630`` and, for the lowest, Other (mi…
create_value_listCreate a value list: the values (or ranges) a variable is compared with. Segmentation tree variables and rule conditions offer a value list's entries. A numeric entry may be a range written with ``v``: ``"v>=630"``, ``"600<=v<630"``, ``"v<600"``. Args: name: Value list name. entries: Entries as strings, or ``{"key", "label"}`` objects. data_type: "character" or "numeric". description: Optional description. folder: Where to store it: a folder path, ``My Folder``, a folder ID or URI. Omit to use the default folder; if there is none, ask the user.
delete_business_rulePermanently delete a rule from a SAS Business Rules rule set. Args: ruleset_id: The parent rule set UUID (not its name — list_business_rulesets returns both). rule_id: The rule UUID to delete.
delete_business_rulesetPermanently delete a SAS Business Rules rule set. Only call this once the rule set is confirmed unused by any decision flow — deleting a rule set still referenced by a decision fails. Args: ruleset_id: The rule set UUID to delete (not its name — list_business_rulesets returns both).
delete_decision_flowPermanently delete a SAS Intelligent Decisioning flow. Args: decision_id: The decision flow UUID to delete (not its name — list_decision_flows returns both).
delete_decisioning_assetPermanently delete a piece of decisioning content and all its revisions. Something still in use — a rule set or code file a decision references, a category that still holds functions — is refused by Viya. A lookup table that rule sets use is refused here, naming them: Viya would delete it and leave those rules invalid. Args: asset_type: rule_set, decision, segmentation_tree, code_file, value_list, lookup_table, custom_function or function_category. asset_id: The ID to delete.
delete_glossary_termPermanently delete a business term. The term goes, and with it every assignment to a column that referenced it — the data keeps its columns but loses the documented meaning. Check ``list_term_assets`` first: a term with assigned assets is in use. **There is no cascade.** A term that has children cannot be deleted at all: the glossary refuses with ``Cannot delete a term/draft with existing children``. Delete the subtree leaf-first — list a term's children with ``list_glossary_terms(parent_id=...)`` — or re-parent them with ``update_glossary_term`` before deleting this one. Args: term_id:…
delete_glossary_term_typeDelete a term type. Refuses while terms still use the type, because deleting it takes their attribute definitions with it. Check with ``list_glossary_terms`` (``term_type=``) and move or delete those terms first — or pass ``force`` if you have already decided. Args: term_type_id: The term type UUID, or its name. force: Delete even though terms use this type (default false).
delete_reportDelete a Visual Analytics report and its content. There is no per-object undo in the report API, so deleting and rebuilding (or copying first) is how you discard an unwanted report. Returns ``{"status": "deleted", "report_id": ...}`` (or ``not_found`` / ``delete_failed``). Args: report_id: The report id to delete.
describe_report_objectsDiscover what a Visual Analytics report can contain — operations and objects. Call this to learn how to build a report before calling ``apply_report_operations``. It reads a bundled catalog (no network), so it is the cheap way to look up an object's data roles instead of guessing. Modes: * No arguments — an index: the eight report operations, every addable object (schema key, one-line purpose, category, addable/updatable), an intent→object map (e.g. "single KPI number" → ``keyValue``), the placement guide, layout recipes, and the API's hard limits. * ``category`` — the index …
download_fileDownload file content from the Viya Files Service. Args: file_id: ID of the file to download.
execute_sas_codeExecutes the provided SAS code in the Viya environment and returns information about the completed Job. This will create a job definition for the SAS code, execute it, and then retrieve the results. IMPORTANT — state persists between calls: the code runs in a reusable compute session that is kept warm and shared across calls (per user), so SAS state — WORK tables, macro variables, and assigned librefs — survives between successive ``execute_sas_code`` calls. A re-run can therefore see leftovers from earlier calls (e.g. a check that counts results twice). Pass ``fresh_session=True`` (or call `…
export_reportExport a Visual Analytics report (or specific report objects) in any format the VA service exposes, via its synchronous export endpoints. Formats (``export_format``): * ``package`` — full report bundle as a ``.zip`` (source files, query results, and rendered content); whole report or selected objects. * ``pdf`` — rendered PDF; whole report or selected objects. Pass rendering overrides (e.g. ``orientation``, ``paperSize``, ``margin``, ``includeCoverPage``) via ``options``. * ``png`` / ``svg`` — image of the report or a single object; ``image_size`` is required, e.g. ``"12…
find_folderLook up a SAS Content folder and return its ID, URI, name and full path. Use it to confirm a folder the user named before storing something there, or to turn a path into the folder URI that ``upload_file`` and the deployment's ``MCP_DEFAULT_FOLDER`` setting take. The tools that create rule sets and decisions accept a path directly, so they do not need this first. Args: folder: A folder path such as ``/Public/Content/Decisions``, ``My Folder`` (or a folder below it, ``My Folder/Risk``), a folder ID, or a folder URI (``/folders/folders/<id>``).
get_business_ruleFetch a single rule's definition from a SAS Business Rules rule set. Args: ruleset_id: The parent rule set UUID (not its name — list_business_rulesets returns both). rule_id: The rule UUID.
get_business_rulesetFetch a single SAS Business Rules rule set by ID. Args: ruleset_id: The rule set UUID (not its name — list_business_rulesets returns both).
get_castable_columnsGet column metadata for a CAS table (names, types, labels, formats). A missing table returns a structured ``not_found`` with the two usual causes (unloaded source table vs session-scoped table) instead of a raw HTTP error. Args: server_id: CAS server name or ID. caslib_name: Name of the caslib. table_name: Name of the table. limit: Maximum columns to return (default 200).
get_castable_dataFetch rows from a CAS table with column names. Args: server_id: CAS server name or ID. caslib_name: Name of the caslib. table_name: Name of the table. limit: Maximum rows to return (default 100). start: Row offset (default 0).
get_castable_infoGet metadata for a CAS table (row count, column count, size, etc.). Args: server_id: CAS server name or ID. caslib_name: Name of the caslib. table_name: Name of the table.
get_compute_table_dataFetch rows from a table in a SAS library, with column names. The compute-tier counterpart of ``get_castable_data``: a plain page of rows from ``libref.table`` as the session sees it, read through the compute session's data API rather than by running SQL. Values arrive formatted the way SAS displays them (dates as text, numbers with their format applied), which is what a person browsing a table expects; use ``query_data`` with ``target='compute'`` when you need raw numerics, a WHERE clause, or a join. Runs in the reusable per-user compute session for the context, so WORK tables from earlier `…
get_decision_flowFetch the current state of a SAS Intelligent Decisioning flow. Args: decision_id: The decision flow UUID (not its name — list_decision_flows returns both).
get_decision_flow_codeRetrieve the generated DS2 execution code for a decision flow. Args: decision_id: The decision flow UUID (not its name — list_decision_flows returns both).
get_decision_flow_revisionFetch the content of a specific locked decision revision. Args: decision_id: The decision flow UUID (not its name — list_decision_flows returns both). revision_id: The revision UUID.
get_decisioning_assetFetch one piece of decisioning content, or one of its revisions, with the folder it is in. A rule set comes with its rules, a code file with its code, a value list with the entries of its newest version, a lookup table with its versions, the entries of its active one (get_lookup_table pages and filters them) and the rule sets that use it. Content larger than 150,000 characters — a big segmentation tree — is summarised (counts, root variable) instead of returned whole; ``summary_only`` asks for the summary of anything. Args: asset_type: rule_set, decision, segmentation_tree, code_file, …
get_decisioning_asset_codeThe DS2 code Viya generates for a rule set, decision or segmentation tree, or a code file's source. Args: asset_type: rule_set, decision, segmentation_tree or code_file. asset_id: The ID. revision_id: A revision instead of the current state.
get_glossary_termGet one business term in full, with its custom attributes named rather than hashed. The raw API returns ``attributes`` keyed by attribute-definition UUID, which is unreadable on its own. This resolves each key to the label the glossary UI shows and drops the ones left empty, so what comes back is the term as a person would read it. ``attribute_ids`` is the raw map, unfiltered — so an attribute the term leaves unset is absent from ``attributes`` but present as ``""`` there. The two disagree by design: one says what the term holds, the other what was stored. Also returns ``catalog_entity_id`` …
get_glossary_term_typeGet a term type and the attribute contract its terms must satisfy. Call this **before** creating or updating a term: it names every custom attribute, its data type, whether it is required, the exact values a single- or multi-select accepts, and ``value_format`` — the one spelling Viya takes for that type, which the API itself documents nowhere. ``create_glossary_term`` takes attributes keyed by the ``label`` shown here, so this is also the vocabulary to write in. Args: term_type_id: The term type UUID, or its name — list_glossary_term_types returns both.
get_job_logRetrieve the log of a completed job. Args: job_id: ID of the job.
get_job_statusCheck the status of a submitted job. Args: job_id: ID of the job.
get_lookup_tableRead a lookup table: its versions, one version's entries and the rule sets that use it. ``active_version`` is the version rules use now. A version's ``status`` is developing, production (active, or formerly active) or activating; ``activationStatus`` failed with ``activationError`` means its publish failed. ``used_by`` lists the rule sets that reference the table. Args: lookup_table: The lookup table's ID or exact name. version: "current" (the active version, else the newest), "newest", or a version's ID or label. key_filter: Only entries whose key contains this text. …
get_mas_module_step_signatureFetch a MAS module step's input/output variable signature. Call before ``score_data`` to know the exact variable names, types, and order to pass as inputs, and what outputs to expect. Args: module_id: The MAS module ID (see ``list_mas_modules``). step_id: The step within the module to inspect (default "execute").
get_reportGet a Visual Analytics report's metadata and definition. Args: report_id: ID of the report.
get_report_outlineRead a report's structure: pages → objects with the handles other tools need. Reduces the stored report definition to a compact outline — per page its internal name and label, per object its name (``ve*``), label, type, and any text content. Use it to edit an existing report, to recover object names after an apply, or to check what a batch actually produced: * object ``name`` → the target for ``relativeToObject``/``container`` placement and ``updateObject``; * object ``label`` → what ``export_report`` ``report_objects`` takes; * page ``label`` → the ``page`` placement target. Retu…
import_glossary_termsCreate many business terms, and their hierarchy, in one call. Building a hierarchy one term at a time means a call per term *and* a wait between levels, because a child needs the parent's id from the previous response. This uses the glossary's own bulk import instead: one request for the whole tree, with parents resolved by **name** rather than by id, so nothing has to be threaded through. Give each row a ``name`` and, for a child, a ``parent`` — the name of another row in the same batch, or the path of a term that already exists (levels separated by a backslash). Rows may be given in any or…
list_business_rulesList all rules inside a SAS Business Rules rule set. Args: ruleset_id: The rule set UUID (not its name — list_business_rulesets returns both). limit: Maximum number of results to return (default 100).
list_business_ruleset_revisionsList all locked revisions of a rule set. Args: ruleset_id: The rule set UUID (not its name — list_business_rulesets returns both). limit: Maximum number of results to return (default 20).
list_business_rulesetsList SAS Business Rules rule sets, optionally filtered by name substring. Args: limit: Maximum number of results to return (default 20). filter_name: Optional substring to match against rule set names.
list_cas_serversList available CAS servers on the Viya environment.
list_caslibsList CAS libraries (caslibs) available on a CAS server. Args: server_id: CAS server name or ID (e.g. 'cas-shared-default'). limit: Maximum number of caslibs to return (default 50).
list_castablesList tables in a CAS library. Args: server_id: CAS server name or ID. caslib_name: Name of the caslib. limit: Maximum number of tables to return (default 50).
list_compute_columnsList the columns of a table in a SAS library within a compute context. Runs in the reusable per-user compute session for the context. Args: compute_context_name: Name of the compute context (see list_compute_contexts). library_name: Name of the SAS library/libref (e.g. 'WORK', 'SASHELP'). table_name: Name of the table within the library. limit: Maximum number of columns to return (default 50). start: Offset of the first column to return (default 0). filter_name: Optional name filter (substring match).
list_compute_contextsList available compute contexts on the Viya environment.
list_compute_librariesList the SAS libraries (librefs) assigned in a compute context. Runs in the reusable per-user compute session for the context, so it also sees libraries created by prior ``execute_sas_code`` calls. Args: compute_context_name: Name of the compute context (see list_compute_contexts). limit: Maximum number of libraries to return (default 50). start: Offset of the first library to return (default 0). filter_name: Optional name filter (substring match).
list_compute_tablesList the tables in a SAS library within a compute context. These are SAS/Compute tables (e.g. WORK or an assigned libref), distinct from in-memory CAS tables (see list_castables). Runs in the reusable per-user compute session for the context. Args: compute_context_name: Name of the compute context (see list_compute_contexts). library_name: Name of the SAS library/libref (e.g. 'WORK', 'SASHELP'). limit: Maximum number of tables to return (default 50). start: Offset of the first table to return (default 0). filter_name: Optional name filter (substring match).
list_decision_flow_revisionsList all locked revisions of a decision flow. Args: decision_id: The decision flow UUID (not its name — list_decision_flows returns both). limit: Maximum number of results to return (default 20).
list_decision_flowsList SAS Intelligent Decisioning flows, optionally filtered by name substring. Args: limit: Maximum number of results to return (default 20). filter_name: Optional substring to match against decision names.
list_decisioning_asset_revisionsList the revisions of a rule set, decision, segmentation tree or code file, newest first. The newest revision is the working one; every other one is locked. Args: asset_type: rule_set, decision, segmentation_tree or code_file. asset_id: The ID. limit: Maximum number of revisions (default 20).
list_decisioning_assetsList SAS Intelligent Decisioning content of one kind, optionally filtered by name. Args: asset_type: rule_set, decision, segmentation_tree, code_file, value_list, lookup_table, custom_function or function_category. limit: Maximum number of results (default 20). filter_name: Optional substring of the name.
list_filesList files in the Viya Files Service. Args: limit: Maximum files to return (default 50). filter_name: Optional name filter (substring match).
list_glossary_term_typesList the term types defined in the SAS Business Glossary. A term type is the *template* a term is created from: it fixes which custom attributes the term carries and which of them are mandatory. Every term belongs to exactly one, and the choice is immutable after creation — so pick the type before calling ``create_glossary_term``, then read its attribute contract with ``get_glossary_term_type``. ``usage_count`` is how many terms already use the type, which is the quickest way to tell a deployment's working vocabulary from types that were created once and abandoned. Args: limit: Maximum …
list_glossary_termsList glossary terms by structure — term type, parent, or name fragment. The counterpart to ``search_glossary_terms``: exact filters instead of ranked text. Use it to walk the hierarchy (``parent_id`` returns a term's direct children, which is the authoritative parent/child relationship), to inventory one term type, or to page the whole dictionary with no arguments at all. Args: term_type: Restrict to one term type — its UUID or its name. parent_id: Return only the direct children of this term id. name_contains: Substring match on the term name. include_drafts: Include unpubli…
list_jobsList recent jobs from the Job Execution service. Args: limit: Maximum jobs to return (default 20).
list_mas_modulesList published scoring models and decisions (MAS modules). Args: limit: Maximum modules to return (default 50).
list_ml_projectsList AutoML pipeline automation projects. Args: limit: Maximum projects to return (default 50).
list_publishing_destinationsList available publishing destinations. Args: ctx: FastMCP context. limit: Maximum destinations to return (default 50). start: Row offset (default 0). filter_name: Optional filter for destination names.
list_registered_modelsList models in the Model Repository. Args: limit: Maximum models to return (default 50).
list_reportsList Visual Analytics reports. Args: limit: Maximum reports to return (default 50). filter_name: Optional name filter (substring match).
list_source_tablesList source tables that are NOT yet loaded into memory in a CAS library. These are the candidates for ``promote_table_to_memory`` — tables that exist on the caslib's data source but are not in CAS memory yet. Args: server_id: CAS server name or ID. caslib_name: Name of the caslib. limit: Maximum number of tables to return (default 50).
list_table_termsList the business terms assigned to a table's columns. The reverse of ``list_term_assets``, and the fastest way to judge whether a table is governed: it reports each column's term together with the term's own definition, so a caller can read what a cryptically named column actually holds. Terms come from ``glossaryTermAsset`` relationships, so a column with no term here has genuinely never been assigned one — the catalog does not guess from column names. Args: resource_uri: The table's source URI (preferred) — catalog_search returns it on every hit. table_name: Table name, i…
list_term_assetsList the data assets a business term is attached to — the columns that mean it. The authoritative answer to "where is this term actually used?", read from the ``glossaryTermAsset`` relationships rather than inferred from names. Each entry names the column and the table it belongs to. An empty result means the term is **assigned** to nothing, which is not the same as no matching column existing — ``assign_glossary_term`` is what creates the link. For a looser, name-based sweep, ``catalog_search`` accepts the ``Column.term:"<term name>"`` facet on the ``datasets`` index, which returns matching…
lock_business_ruleset_revisionLock the current state of a rule set as an immutable revision. Decision steps reference a specific rule set revision (versionId), not the live working copy, so a revision must exist before wiring a rule set into a decision flow — call again after editing rules if a decision needs to pick up the changes. Viya locks the revision that was current and opens the next one: the result describes that new working revision, as before, and ``locked_revision`` the frozen one — use its ``id`` as the versionId for a reference that later edits cannot change. The revision-creation request replaces the rule…
lock_decision_flow_revisionLock the current state of a decision flow as an immutable revision. Call after a successful create/update to freeze the approved state as a point-in-time snapshot referenceable by ``publish_decision_flow``. Viya locks the revision that was current and opens the next one: the result describes that new working revision, as before, and ``locked_revision`` the frozen one. Args: decision_id: The decision flow UUID (not its name — list_decision_flows returns both).
lock_decisioning_asset_revisionFreeze the current state of a rule set, decision, segmentation tree or code file as a locked revision. Viya locks the revision that was current and opens the next one for editing (1.0 is locked, 1.1 is open). ``locked_revision`` is the frozen state: reference it from a decision step or publish it. Later edits go to ``working_revision`` and do not change what was locked. Args: asset_type: rule_set, decision, segmentation_tree or code_file. asset_id: The ID. revision_type: "minor" for iterative changes, "major" for an approved milestone.
promote_table_to_memoryLoad a source table into CAS memory at global scope (visible to all sessions). Loads the table from its caslib data source and promotes it to global scope via the casManagement ``updateTableState`` API. Idempotent: if the table is already loaded in global scope it is left untouched. Use ``list_source_tables`` to discover unloaded tables that can be promoted. Args: server_id: CAS server name or ID. caslib_name: Caslib containing the table. table_name: Table to load and promote.
publish_decision_flowPublish a locked decision revision to a Micro Analytic Score (MAS) destination. Required before ``score_data`` can execute the decision — MAS runs published modules, not decision flows directly. Requires the DS2 code generation service to be healthy for this decision's rule sets; an error mentioning rule set code generation is an environment-level issue, not a bad payload. Publishing is asynchronous and the resulting MAS module ID is server-generated — it is NOT ``publish_name``. This polls the publish job (``properties.masModules[0].jobUri``) until it reaches a terminal state and returns th…
publish_ml_champion_modelPublish the champion model from an AutoML pipeline automation project to the Model Repository. Args: project_id: ID of the ML pipeline automation project. destination_name: Name of the destination to publish to.
query_dataRun a FedSQL SELECT against CAS or compute data and return the rows. One SQL surface over both storage tiers, so exploring a caslib table and a SAS library table use the same tool and the same dialect. The query runs in the reusable compute session; nothing is persisted — the result is materialised into session scratch, read back, and dropped. **Pick the tier with ``target``** — it selects the namespace, and the two cannot be mixed in one statement (a caslib table and a libref table cannot be joined; stage one side first with execute_sas_code): * ``target='cas'`` (default) — qualify as ``ca…
register_ml_champion_modelRegister the champion model from an AutoML pipeline automation project to the Model Repository. Args: project_id: ID of the ML pipeline automation project.
reset_compute_sessionReset (delete) the cached compute session for a compute context. The server keeps one reusable SAS compute session per user and compute context so repeat calls skip the slow session spin-up; SAS state (WORK tables, macro variables, assigned librefs) therefore persists across ``execute_sas_code`` and ``list_compute_*`` calls. Call this to discard that state — the next compute tool call transparently creates a fresh session. Args: compute_context_name: Compute context whose session to reset. Defaults to the server's configured execution context (the one ``execute_sas_code``…
run_ml_projectRun an AutoML pipeline automation project. Args: project_id: ID of the project to run.
score_dataScore data against a published model or decision (MAS module). A decision published from the SAS Intelligent Decisioning UI names its inputs with a trailing underscore (``credit_score_``); the plain names are accepted and mapped, and the result's ``inputs_renamed`` says so. (``publish_decision_flow`` keeps the plain names.) Args: module_id: MAS module ID. step_id: Step ID within the module (usually 'score' or 'execute'). input_data: Dictionary of input variable name-value pairs.
search_glossary_termsFree-text search of the business glossary — the way in when you know a word, not an id. Runs against the SAS Data Governance catalog's ``terms`` index, so it is ranked and matches definitions as well as names, unlike ``list_glossary_terms``' exact structural filters. Supports the catalog grammar: wildcards (``rev*``), field constraints (``Name:revenue``, ``Status:Published``) and ``+`` to require a word. Each hit carries **both** identifiers — ``term_id`` for every other glossary tool, ``catalog_entity_id`` for catalog relationships — plus ``assigned_asset_count``, so you can tell whether a …
submit_batch_jobSubmit a SAS job for asynchronous execution via the Job Execution service. Args: sas_code: SAS code to execute. job_name: Optional descriptive name for the job.
unassign_glossary_termRemove a business term's assignment from a table column. Deletes only the link: the term and the column both survive. Use ``delete_glossary_term`` to remove the term from the dictionary itself. Args: column_name: The column to detach the term from (case-insensitive). term_id: The glossary term UUID. term_name: Exact term name, if the id is not known. One of the two is required. resource_uri: The table's source URI (preferred). table_name: Table name, if the URI is not known.
update_business_ruleUpdate an existing rule inside a SAS Business Rules rule set. Args: ruleset_id: The parent rule set UUID (not its name — list_business_rulesets returns both). rule_id: The specific rule UUID to update. name: Rule name (max 30 chars). conditional: "if" starts a new independent rule chain, "elseif" continues the previous rule's chain, "or" ORs into it. rule_fired_tracking_enabled: Whether to record when this rule fires. conditions: List of conditions (multiple conditions AND together), including ``lookup`` conditions (see create_business_rule). action…
update_business_rulesetUpdate an existing SAS Business Rules rule set's name/description/signature. Changing the signature can invalidate existing rules that reference removed variables — check with ``get_business_ruleset`` first if unsure. The rule set stays in its folder. One that is in no folder (created before folders were required) is filed into ``folder``, or the default folder. The result's ``folder`` says where the rule set is. Args: ruleset_id: The existing rule set UUID (not its name — list_business_rulesets returns both). name: Rule set name (max 30 chars). signature: Input/output/inOut var…
update_code_fileChange 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. Args: code_file_id: The code file ID. code: New code. name: New name. description: New description. signature: Types and descriptions (needed for Python, see create_code_file). folder: Only used for a code file that is in no folder yet.
update_custom_functionChange a custom function's code, description or category; new code is checked to compile first. Every rule set that calls the function uses the new code from its next code generation. Args: function_id: The function ID. code: New DS2 method. description: New description. category: Move it to this category (name or ID).
update_decision_flowUpdate an existing SAS Intelligent Decisioning flow. Pass ALL steps (existing + new), as ``steps`` or ``rule_set_steps`` — the full flow is replaced on update, it is not a partial patch. The decision stays in its folder. One that is in no folder (created before folders were required) is filed into ``folder``, or the default folder. The result's ``folder`` says where the decision is. Args: decision_id: The existing decision flow UUID (not its name — list_decision_flows returns both). name: Decision name (max 60 chars). signature: Flow-level input/output variables. steps: The …
update_glossary_termUpdate a business term's text, parent or custom attributes — and publish a draft. The glossary API replaces the whole term on update, so this reads the current one first and merges your changes into it: omitting an argument leaves that field alone rather than blanking it. ``attributes`` merges the same way, per attribute — pass only the ones you are changing, and set one to ``""`` to clear it. A **boolean** is the exception: the glossary has no empty boolean and rejects ``""``, so set it to ``True``/``False`` rather than trying to clear it. Because the whole term is rewritten, every attribut…
update_glossary_term_typeChange a term type: rename it, or add, edit and remove its attributes. Attributes are matched to the existing ones **by label**, and an edit keeps that attribute's identifier — which matters more than it looks, because every term's stored values are filed under it. An attribute the caller does not mention is left alone; a label that does not exist yet is added. **To rename one, give its ``attribute_id``** alongside the new ``label``. Matching by label alone cannot express a rename: the new label matches nothing, so the attribute is added afresh under a new identifier and every term's value s…
update_lookup_tableChange a lookup table's entries, column labels, name or description. Entry changes go to the newest version while it is still being developed. An active version is never changed: a new version is started from it, with its entries, and the changes go there. Rules keep using the active version until the new one is activated — pass ``activate`` to do that in the same call. ``set_entries`` adds keys and overwrites the values of existing ones; ``remove_keys`` deletes keys (keys that are not there are reported in ``not_found``); ``replace_entries`` replaces every entry instead. Args: lookup_t…
update_segmentation_treeChange a segmentation tree's working revision: only the parts given are replaced. ``node`` replaces the whole node structure and ``outcomes`` the whole outcome list. The tree stays in its folder; one in no folder is filed into ``folder`` or the default folder. Args: tree_id: The tree ID. name: New name. description: New description. signature: New signature (all variables). node: New root node (see create_segmentation_tree). outcomes: New outcomes. boolean_expressions: New boolean expressions. matrices: New matrices. code_files: New internal code files. …
update_value_list_entriesReplace the entries of a value list's newest version. A version already in production is left alone: a new version holds the entries instead. Args: value_list_id: The value list ID. entries: The complete new entries, as strings or ``{"key", "label"}`` objects.
upload_dataUpload 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…
upload_fileUpload 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 defa…
upload_inline_dataCreate a small CAS table from inline delimited text passed as a string. Use this only for **tiny, hand-built tables** — a lookup/mapping table the model constructs on the fly, or a quick test table — because the whole payload travels through the model's context as a tool argument. For anything larger, or any file you already have, use ``upload_data`` (file_path/url), which reads the bytes server-side instead. Text formats only: ``csv`` (default) or ``tsv`` (tab-separated). For binary formats (Excel, sas7bdat, sashdat) use ``upload_data``. Args: server_id: CAS server name or ID. casl…
validate_custom_functionCompile a DS2 custom function without saving it, and return its errors. Args: code: The DS2 method. category: Optional category (name or ID) to validate against.
validate_decision_expressionCheck that a DS2 expression compiles: a rule condition or action, a branch or a condition step. The expression may use the variables in ``signature``, DS2 functions and custom functions. Returns ``valid`` and the compiler's error and warning lines. A variable the signature does not declare is a warning (DS2 creates it), not an error. Args: expression: The expression, e.g. ``risk_band(credit_score) = 'LOW'``. signature: The variables it uses, ``[{"name", "dataType", "direction"}]``.
Signals
- Stars
- 66
- Forks
- 25
- Open issues
- 1
- Contributors
- 12
- Last commit
- Oct 23, 2026 (6 days ago)
- Last release
- Oct 23, 2026 (6 days ago)
From GitHub (fetched Oct 24, 2026).
Details
- Registry name
io.github.sassoftware/sas-mcp-server- Version
- 1.19.0
- Auth
- No auth
- Packages
- oci
ghcr.io/sassoftware/sas-mcp-server:1.19.0 - License
- Apache-2.0
- Repository
- github.com/sassoftware/sas-mcp-server
- First seen
- Oct 24, 2026
- Last checked
- Oct 24, 2026
Cite this page
SAS Viya MCP server. Agent Mart. https://agentmart.dev/connectors/sassoftware-sas-mcp-server (last updated 2026-10-24)