MCP ScannerCustom audit
All servers

sassoftware/sas-mcp-server

A self-hosted Model Context Protocol (MCP) server that connects to your SAS Viya environment and provides tools across the analytics lifecycle.

Packagesas-mcp-server
Version1.20.1 in pyproject.toml
Publishersassoftware community
MCP Registryio.github.sassoftware/sas-mcp-server
Scanned2026-11-25
Scannerv1.3.0
Methodologyv1.2
Stars 68Forks 28Last push 2026-11-13
Python 98.9%JavaScript 1.1%by source files the scanner reads
Code safetypartly tracedExposure6.9Prompts10.0Supply chain2.0Secrets10.0Transparency10.0
Analysis confidence79%
How much of the server the scanner could read: tools analyzed, files parsed, limits hit.
Code Safetypartly traced—

Paths from tool input into commands, SQL, files and URLs

Capability Exposure6.9/10Fair

How much power the tools give an agent over the machine

Prompt Integritynothing published yet10.0/10

Hidden instructions and poisoning in text for the model

Supply Chain2.0/10Poor

Known vulnerabilities in the packages the server uses

Secrets & Credentialsnothing published yet10.0/10

How the server reads credentials and where they can go

Behavior Transparencynothing published yet10.0/10

Whether the tools do only what their descriptions say

How far the analysis went

The scanner traces each tool from its input to the operations its code performs, and here it could not follow every path. Code Safety is shown as partly traced instead of a score: no finding there is not a clean result. The score of Capability Exposure counts only what it could follow.

  • Some paths pass through more than 8 functions one inside another; the scanner stops there
  • In 916 places a tool's input is handed to a function whose name matches several definitions in the code; the scanner could not tell which one runs, so it stopped there
  • 43 of 210 tools, prompts and resources could not be followed through the code
  • 4 places in the code register tools whose names are computed at run time; how many tools that makes cannot be read from the code
  • 56 tools, prompts and resources registered only in the repository's tests are not counted on this page

Top risks in plain words

  • CRITICAL11 production dependencies have known vulnerabilities (worst: critical).
  • HIGHTools create_segmentation_tree_from_table, upload_data read or write any file path by design: an agent steered by prompt injection can use them that way.

How to use it safely

Practical steps from what we found in this server. They lower the risk; they do not replace a review of the code.

  • Give it only the folder it needs

    create_segmentation_tree_from_table, upload_data can read or write any file path. Mount a single project folder, read-only where you can.

  • Turn off the tools you do not use

    Most MCP clients let you disable single tools. If you do not need create_segmentation_tree_from_table, upload_data, switch them off.

  • Update its vulnerable packages

    Use anyio 4.14.2 or later, authlib 1.9.1 or later, certifi 2026.10.18 or later, cryptography 50.0.0 or later and 7 more.

  • Keep confirmations on

    Leave your MCP client's confirmation prompt on for tools that change files, run commands or send data.

What its tools can do on your machine

The server offers 144 tools, 9 prompts, 1 resource. When an AI agent calls them, this is what their code can do on the machine where the server runs, as traced in the source. Tools that call code the scanner could not follow may do more.

Read or write filesopen, create, change or delete files
create_segmentation_tree_from_table, upload_data, upload_file
3 of 154
Connect to the internet or other hostssend requests or open connections
create_glossary_term, create_performance_definition, delete_glossary_term_type, describe_analytic_store, execute_sas_code, get_glossary_term and 18 more
25 of 154

No tool was seen to: start other programs on the machine; read passwords, tokens or keys; read environment variables; touch sensitive locations.

Where its requests and secrets go

Read from the names along each tool's calls, not from a run: what the code says, not every address it may reach at run time.

Hosts written in the code

The literal addresses the tools' requests name.

  • None: no request names a fixed host.
Addresses from settings

Constants or settings that start an address; the value comes from configuration.

  • None seen.
Secrets it reads

Credential-like environment variables. Give the server a key with the least access it needs.

  • None: no credential-like variable is read by the tools.

Text it brings in from outside

Text that reaches the model from outside: an instruction hidden in it can steer the agent (prompt injection). Treat what these tools return as data, not as orders.

  • files3 tools · create_segmentation_tree_from_table, upload_data, upload_file

Tool annotations

No tool declares MCP annotations (readOnlyHint, destructiveHint and the rest). Clients use them to decide what to confirm; directories such as Anthropic's and OpenAI's ask for them.

Tools, prompts and resources (154: 144 tools, 9 prompts, 1 resource)

Open a row for its full description. Chips show what its code can reach, and which risky capability its own description declares.

create_segmentation_tree_from_tabletool Build one segmentation tree from a strategy table: one row per branch, a column per decision key.Filesoutside textReads/writes files
Build 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 (missing values
        included). With ``split="exact"`` each distinct value is its own branch.

        The table comes from exactly one of ``rows`` (inline, small tables),
        ``file_path`` (a CSV the server reads, gated by
        ``ALLOW_LOCAL_FILE_UPLOAD``) or ``caslib_name`` + ``table_name`` (a CAS
        table — load an Excel sheet with upload_data first). Repeated column
        names in a CSV get ``_2``, ``_3``.

        The result reports what was built — leaves, split nodes, outcomes, and
        rows whose path is identical but whose outcome differs (``conflicts``)
        — not the tree itself, which can be hundreds of kilobytes.

        Args:
            name: Tree name.
            key_columns: Decision key columns in strategy order. A column name,
                or ``{"column": ..., "variable": ...}`` to name the tree
                variable; two columns may test the same variable (a key that
                appears twice in the strategy).
            outcome_columns: Columns the leaves assign, e.g. ["Scenario ID", "Scenario Group"].
            rows: Inline rows, each an object of column to value.
            file_path: A CSV file the server reads.
            caslib_name: Caslib of a CAS table to read.
            table_name: The CAS table.
            server_id: CAS server (default cas-shared-default).
            split: "lower_bound" (range lower bounds) or "exact" (values).
            outcome_prefix: Prefix of outcome names (default: the first outcome column).
            row_label_column: Column that identifies a row in the report, e.g. the branch number.
            outcome_types: Data type per outcome column, overriding the one
                inferred from the values: ``{"Scenario Group": "string"}``.
                Types must match the decision variables the tree is mapped to.
            create_value_lists: Also create a value list per tested variable,
                holding the conditions its nodes use, and tie the variable to it.
            description: Optional description.
            folder: Where to store the tree (and value lists): a folder path,
                ``My Folder``, a folder ID or URI. Omit to use the default
                folder; if there is none, ask the user.
upload_datatool Upload a data file into a CAS table — read **by the server**, not the model.FilesNetworkoutside textReads/writes files
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).

        Args:
            server_id: CAS server name or ID.
            caslib_name: Target caslib name.
            table_name: Name for the new table.
            file_path: Path to a data file the server reads directly from disk.
            url: HTTP(S) URL the server fetches the file from.
            data_format: Override format detection. One of csv, tsv, xls, xlsx,
                sas7bdat, sashdat (aliases: excel→xlsx, tab→tsv, sas→sas7bdat).
            sheet_name: For Excel sources, the worksheet to import (first sheet by default).
            contains_header_row: Whether the first row holds column names — applies
                to csv/tsv/Excel (default True).
build_va_dashboardprompt Build a polished multi-page Visual Analytics dashboard from a CAS table,
Build a polished multi-page Visual Analytics dashboard from a CAS table,
        using the report-authoring tools (discover → shape → structure → polish → verify).
data_quality_checkprompt Generate SAS code for a data quality assessment (completeness, uniqueness, validity).
Generate SAS code for a data quality assessment (completeness, uniqueness, validity).
debug_sas_logprompt Analyze a SAS log for errors, warnings, and notes with root-cause explanations and suggested fixes.
Analyze a SAS log for errors, warnings, and notes with root-cause explanations and suggested fixes.
explain_sas_codeprompt Provide a block-by-block explanation of SAS code, tailored to skill level.
Provide a block-by-block explanation of SAS code, tailored to skill level.
explore_datasetprompt Generate comprehensive SAS data-profiling code (CONTENTS, MEANS, FREQ, UNIVARIATE).
Generate comprehensive SAS data-profiling code (CONTENTS, MEANS, FREQ, UNIVARIATE).
generate_reportprompt Generate SAS ODS/PROC REPORT code for formatted output.
Generate SAS ODS/PROC REPORT code for formatted output.
optimize_sas_codeprompt Review and optimize SAS code for performance, readability, or both.
Review and optimize SAS code for performance, readability, or both.
sas_macro_builderprompt Build a production-quality reusable SAS macro.
Build a production-quality reusable SAS macro.
statistical_analysisprompt Set up a complete SAS statistical analysis workflow with diagnostics.
Set up a complete SAS statistical analysis workflow with diagnostics.
uriresource
No description.
(name computed at run time)tool
No description.
(name computed at run time)tool
No description.
(name computed at run time)tool
No description.
(name computed at run time)tool
No description.
activate_lookup_tabletool Make a lookup table version the one rules use: publish its entries to MAS and CAS.
Make 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: "newest" (default), or a version's ID or label. An earlier
                version (a rollback) or one whose activation failed is
                activated as a new version with its entries.
            wait_seconds: How long to wait for publishing to finish (max 300).
            republish: Copy the active version to MAS and CAS again instead of activating one.
apply_report_operationstool Apply an ordered batch of operations to a report — the authoring workhorse.
Apply 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="addData"`` covers formats,
        aggregations, and geography via ``dataItems``) and each object's data
        roles, and ``get_castable_columns`` to map columns onto those roles.

        Layout & titles (see ``describe_report_objects`` → ``placement`` /
        ``layout_recipes`` for details):
          * Page title — give ``addPage`` a ``title`` (e.g. ``{"addPage":
            {"pageName": "Overview", "title": "Sales Overview"}}``); it becomes a
            text band at the top of that page's body. Page/report headers accept
            ONLY control objects — never text or visuals.
          * Chart titles — pass ``{"options": {"object": {"title": "..."}}}``
            inside the object spec at add time (all types except
            ``standardContainer``, which takes no options at add time).
          * One-batch multi-page — create pages inline with placement
            ``{"report": {"context": "new_page", "pageName": "Trends",
            "pagePosition": 1}}`` (numeric position) and target that pageName
            from later operations in the same batch.
          * Grids/columns — ``relativeToObject`` with ``left/right/top/bottom``
            (geometric) or ``before/after`` (flow order) against an EXISTING
            object's name; same-batch forward references fail, so chain across
            calls using the names each result returns. Objects are auto-named
            and auto-sized; placement and dataRoles are write-once
            (``updateObject`` changes options only).
          * Read structure back anytime with ``get_report_outline``; verify
            visually with ``export_report`` page-by-page (see ``verify_hint``
            in the result).

        The tool validates every operation against the object catalog before any
        HTTP call (unknown/typo'd object type, non-addable object, bad data-role
        names or arity, disallowed object/placement keys) and reports ALL invalid
        operations at once. It also handles the ETag optimistic-concurrency
        handshake for you, retrying once transparently on a concurrent edit.

        Args:
            report_id: Target report id (from ``create_report`` or ``list_reports``).
            operations: Ordered native operations array. Example element:
                ``{"addObject": {"object": {"barChart": {"dataSource": "CARS",
                "dataRoles": {"category": "Origin", "measures": ["MSRP"]},
                "options": {"object": {"title": "MSRP by Origin"}}}},
                "placement": {"page": {"target": "Overview"}}}}``.
            dry_run: Validate and return the normalized payload (plus any
                soft warnings about missing common roles) without writing anything.
            response_format: ``concise`` (default) returns the created page/object/
                data-source names+labels; ``detailed`` also echoes the full VA
                response.
            save_as: False (default) edits the report in place. True applies the
                operations to a NEW report instead, leaving the source untouched
                (atomic template instantiation; pairs with ``changeData``), named
                by ``result_report_name`` and/or placed by ``result_folder`` — at
                least one is required. This flag alone decides the mode: a
                ``result_report_name`` or ``result_folder`` given while it is
                False is refused rather than acted on, so the source can never
                be edited or cloned by surprise. Blank values count as not given.
            result_report_name: Save-as name for the new report.
            result_folder: Save-as target folder URI; omit for My Folder.
            result_name_conflict: Save-as name-conflict policy — ``rename``
                (default), ``abort``, or ``replace``.
assign_glossary_termtool Assign a business term to a table column — the step that makes a term govern data.
Assign 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 URI (preferred).
            table_name: Table name, if the URI is not known.
cancel_jobtool Cancel a running job.
Cancel a running job.

        Args:
            job_id: ID of the job to cancel.
catalog_download_table_profiletool Download a catalog table's data dictionary and profile as CSV.
Download 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_find_instance`` does. ``instance_id`` takes precedence if both are given.

        Args:
            instance_id: Catalog instance id of the table (the ``id`` from a catalog_search hit).
            resource_uri: Source URI of the table (the ``resource_uri`` from a search hit,
                e.g. '/dataTables/dataSources/cas~fs~.../tables/MYTABLE'). Used when
                ``instance_id`` is omitted.
            level: Detail level — 'dataDictionaryAndProfile' (default; columns + profile),
                'detailedMetrics' (full per-column metrics), or 'dataDictionary'
                (column metadata only).
catalog_find_instancetool Resolve the catalog instance for a source-asset URI.
Resolve 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``, ``nlpTags``,
        ``mostImportantFields``) before calling ``catalog_download_table_profile``.

        Args:
            resource_uri: Source URI of the asset (e.g.
                '/dataTables/dataSources/cas~fs~.../tables/MYTABLE').
catalog_get_adhoc_analysistool Get the status of an ad-hoc analysis job, and whether its profile is ready.
Get 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 until ``profile_ready`` is true, then download.

        Args:
            job_id: The analysis job id returned by catalog_run_adhoc_analysis.
catalog_get_agent_historytool Get the execution history of a catalog agent's runs.
Get 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_agentstool List SAS Data Governance discovery agents.
List 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_analysistool Submit an ad-hoc analysis (profiling) job for a table in the catalog.
Submit 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 most useful for). Leave them on unless you
        only need a plain column profile and want the job to finish faster.

        Args:
            resource_uri: Source URI of the table to analyze (the ``resource_uri`` from
                a catalog_search hit, e.g. '/dataTables/dataSources/cas~fs~.../tables/MYTABLE').
            name: A name for the analysis job.
            resource_type: Catalog entity type of the resource. Defaults to
                'CASMEMTable' when the URI is a CAS table (contains 'cas~fs~');
                pass it explicitly for other asset types.
            description: Optional description for the job.
            provider: Job provider (default 'TABLE-BOT').
            identify_language: Detect each text column's language (default True).
            analyze_sentiment: Score sentiment on text columns (default True).
            get_nlp_semantic_id: Derive semantic types / privacy classification
                (informationPrivacy, nlpTerms, nlpTags) (default True).
catalog_run_agenttool Start a catalog discovery agent run (asynchronous).
Start 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_searchtool Search the SAS Data Governance catalog for assets (tables, columns, reports, ...).
Search 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``).

        The ``query`` uses the SAS catalog search grammar:
          * Free text matches names, with wildcards ``*`` (0+ chars) and ``?`` (1 char): ``cust*``.
          * Facets constrain fields, e.g. ``AssetType:Report``, ``Name:sales``,
            ``Library.name:PUBLIC``, ``Column.informationPrivacy:Sensitive``.
          * Ranges ``DateModified:[2024-01-01 TO 2024-12-31]`` and ``+`` to require a term.
            Combine freely: ``AssetType:"CAS Table" +Name:cust*``.
        Use ``catalog_search_helper`` to discover valid facet names and values.

        Args:
            query: The catalog search query (see grammar above). Use ``*`` to match all names.
            indices: Comma-separated index name(s) to search (default 'catalog').
            limit: Maximum hits to return (default 20).
            start: Offset of the first hit (default 0).
catalog_search_helpertool Discover how to search the catalog: list facets, or values for one facet.
Discover 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 names; when
                listing values, matches value prefixes.
            limit: Maximum entries to return (default 50).
copy_decisioning_assettool Copy a rule set (with its rules), decision, segmentation tree, code file, value list or lookup table.
Copy 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, or a
                folder URI. Omit to use the default folder; if there is none,
                ask the user.
            revision_id: Copy this revision instead of the current state.
copy_reporttool Copy a Visual Analytics report to a new report, returning the copy's id.
Copy 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_conflict: Name-conflict policy — ``rename`` (default), ``abort``,
                or ``replace``.
create_business_ruletool Create a new rule inside an existing SAS Business Rules rule set.
Create 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 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),
                each ``{"type": "complex", "expression", "term": {"name",
                "dataType", "direction"}}``, or ``{"type": "lookup", "term":
                {...}, "lookup": "<lookup table name or ID>"}`` — true when the
                term's value is a key of the lookup table.
            actions: List of actions, each ``{"type": "assignment"|"return",
                "term": {"name", "dataType", "direction"}, "expression"}``, or
                ``{"type": "lookupValue", "term": {...}, "expression": "<key>",
                "lookup": "<lookup table name or ID>"}`` — assigns the value the
                lookup table stores for the key the expression evaluates to.

        A lookup named in a condition or action is resolved to its ID. Rules
        use the lookup table's active version. The result's ``problems`` lists
        any condition or action Viya stored as invalid.
create_business_rulesettool Create a new SAS Business Rules rule set in a SAS Content folder.
Create 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"}`` — dataType one of string,
                decimal, integer, date, datetime, dataGrid, boolean, any;
                direction one of input, output, inOut.
            description: Optional description.
            folder: Where to store the rule set: 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>``). Omit to use the default folder.
create_code_filetool Create a SAS Intelligent Decisioning code file: DS2, Python or SQL.
Create 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 the
        ``dataType`` of every input and output, or they stay unknown; for DS2
        it adds descriptions and lengths. The result's ``status`` and
        ``errorMessage`` say whether the code parsed.

        Args:
            name: Code file name.
            code_type: ds2, python or sql.
            code: The code.
            description: Optional description.
            signature: Optional ``[{"name", "dataType", "direction", "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.
create_custom_functiontool Create a DS2 custom function that rule expressions can call, after checking that it compiles.
Create 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_flowtool Create a SAS Intelligent Decisioning flow: rule sets, segmentation trees, code files,
Create 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", "variable": "P_BAD1", "cases": [
                    {"label": "Low risk", "max": 0.1999, "steps": [
                        {"type": "assignment", "assignments": {"offer": "GOLD", "credit_limit": 10000}}]},
                    {"label": "Medium risk", "min": 0.2, "max": 0.4999, "steps": [
                        {"type": "rule_set", "id": "<rule set id>"}]}],
                 "default": [{"type": "assignment", "assignments": {"offer": "DECLINE"}}]},
                {"type": "condition", "expression": "offer = 'GOLD'",
                 "on_true": [{"type": "code_file", "id": "<code file id>"}], "on_false": []},
            ]

        Steps nest: a branch case, a branch default and either side of a
        condition hold steps of any kind, branches and conditions included.

        * **Assignment** — ``assignments`` maps a decision variable to a
          constant, written plainly (``"GOLD"``, ``10000``): the service quotes
          strings itself and evaluates nothing, so ``"a + b"`` is stored as
          that text. Compute values in a rule set or code file. The variable
          must be in ``signature``; ``name`` labels the step.
        * **Model** — ``id`` of a model in the model repository
          (``list_registered_models``, Tier 6). Its inputs map to same-named
          decision variables; its outputs (e.g. ``P_BAD1``, ``I_BAD``) are added
          as decision variables unless ``signature`` has them, a class label
          as a string. ``mappings`` renames: ``{"model variable": "decision variable"}``.
        * **Branch** — ``variable`` (on the branch, or per case) and ``cases``,
          checked in order; the first match runs, else ``default``. ``range``
          cases take ``min`` and/or ``max`` (leave one out for an open end) and
          compare inclusively, ``>= min`` and ``<= max``; cases must not share
          a value, so end the lower case just below the next (``max 0.1999``
          next to ``min 0.2``). ``equals`` cases take one ``value``; ``like``
          cases a ``pattern`` with ``%`` and ``_`` wildcards.
        * **Condition** — a DS2 ``expression`` over decision variables, e.g.
          ``score >= 630 and band = 'A'``; check it with
          validate_decision_expression first.
        * **Rule set, segmentation tree, code file, sub-decision** — ``id``,
          optional ``revision`` and ``mappings``. Segmentation trees, code
          files, value lists and custom functions are created with the Tier 10
          (Decisioning Advanced) tools; list_decisioning_assets finds existing ones.

        The decision is always stored in a SAS Content 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: Decision name (max 60 chars).
            signature: Flow-level input/output variables, each ``{"name",
                "direction", "dataType"}`` — direction input or output;
                dataType string, decimal, integer, date, datetime, boolean.
            steps: The flow, in order — any step kind (see above): ``rule_set``,
                ``segmentation_tree``, ``code_file``, ``decision`` (a sub-decision),
                ``model``, ``assignment``, ``condition`` or ``branch``. ``revision``
                defaults to the newest locked revision (one is locked if there is
                none); "working" uses the editable one. Mappings default to
                same-named decision variables; ``{"step term": "decision variable"}``
                renames. The result's ``steps_report`` lists the revisions used,
                the variables added and any step input nothing maps to.
            rule_set_steps: Ordered list of rule set steps to execute in
                sequence, each ``{"ruleSetId", "versionId", "mappings"}`` —
                versionId is a locked rule set revision (see
                ``lock_business_ruleset_revision``); mappings is a list of
                ``{"stepTermName", "direction", "targetDecisionTermName"}``
                connecting the rule set's terms to this decision's signature.
                A term produced as output by an earlier step can be consumed
                as input by a later step via a shared signature entry.
            description: Optional description.
            folder: Where to store the decision: 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>``). Omit to use the default folder.
            add_missing_variables: With ``steps``, add a decision variable for every
                step term none matches (default true): Intelligent Decisioning
                validates a step only when all its terms are mapped. The result's
                ``steps_report.variables_added`` lists them.
create_foldertool Create a SAS Content folder, including any missing folders above it.
Create a SAS Content folder, including any missing folders above it.

        Where it is created:

        * a path from the top, ``/Public/Content/Risk``, is created there;
        * ``My Folder/Risk`` is created in the user's own My Folder;
        * a relative path, ``Risk/2026``, is created under the deployment's
          default folder (``MCP_DEFAULT_FOLDER``). Without that setting a
          relative path is refused: ask the user for the full path.

        A folder that already exists is returned unchanged (``status``
        ``exists``), so calling twice is safe. The user's SAS Viya permissions
        decide where they may create folders; top-level folders such as
        Public are made by administrators. For SAS Content only: model projects
        live in model repositories (see ``create_model_project``).

        Args:
            path: The folder to create, as described above.

        Returns:
            The folder's ``id``, ``uri`` (what ``upload_file`` and the
            decisioning tools take), ``name`` and ``path``; ``status``
            ``created`` or ``exists``; and ``created``, the paths of the folders
            this call made.
create_glossary_termtool Create a business term in the SAS Business Glossary.Network
Create 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-04T13:41:24Z"``; a bare date or a numeric
          offset is normalised to UTC rather than rejected
        * **time** — ``"15:41:28Z"``; seconds and the ``Z`` are required, and a
          numeric offset is converted to UTC rather than dropped

        Values are validated before the call, so a mistake comes back naming the
        attribute and what it expected, instead of as an opaque HTTP 400.

        **Terms are published by default.** The underlying API defaults to
        creating a *draft*, which nobody but its author can see; that is almost
        never what a caller asking to "create a term" means, so this publishes
        unless ``publish`` is set false. A draft is promoted afterwards with
        ``update_glossary_term(publish=true)``, and is visible to
        ``list_glossary_terms`` only under ``include_drafts``.

        A term's name must be unique among its siblings (case-insensitively) and
        differ from its parent's; a clash is rejected, not merged.

        Args:
            name: Term name, max 100 characters, no backslashes.
            term_type: The term type — its UUID or its name. Immutable afterwards.
            definition: What the term means. The field users read; worth filling in.
            description: Short overview, max 1000 characters.
            label: Display name, if it should differ from ``name``.
            parent_id: Parent term id, to nest this term in the hierarchy.
            attributes: Custom attributes keyed by label, e.g.
                ``{"Scope": "Group", "Used in Risk": True,
                "Regions": ["EMEA", "APAC"]}``.
            publish: Publish immediately (default true). False leaves a draft,
                which ``update_glossary_term(publish=true)`` promotes later.
create_glossary_term_typetool Create a term type — the template that fixes what a term must carry.
Create 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``, ``date-time``, ``time``

        The attribute identifiers the API demands are generated here, since it
        will not mint them itself and rejects the omission with a message that
        names neither the attribute nor the real problem.

        Args:
            name: Term type name, unique across the deployment.
            label: Display name. Defaults to *name* — the API leaves it empty
                rather than defaulting it, which shows as a blank in the UI.
            description: What terms of this type are for.
            attributes: The attribute definitions, e.g.
                ``[{"label": "Scope", "type": "single-select",
                "allowed_values": ["Local", "Group"], "required": true}]``.
            allow_custom_attributes: Let individual terms add attributes beyond
                these (default false).
create_lookup_tabletool Create a SAS Intelligent Decisioning lookup table: keys and the value stored for each.
Create 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; numbers are
        stored as text. Keys must be unique and values not empty — an empty
        value behaves like a missing key.

        Args:
            name: Lookup table name.
            entries: ``{"Iran": "High", "Cuba": "High"}``, or a list of
                ``{"key", "value"}`` objects or ``[key, value]`` pairs.
            description: Optional description.
            key_label: Optional name of the key column, e.g. "Country".
            value_label: Optional name of the value column, e.g. "Risk level".
            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.
            activate: Publish the first version right away (default false).
            wait_seconds: How long to wait for activation to finish (max 300).
create_ml_projecttool Create a new AutoML pipeline automation project from a CAS table.
Create 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 target/response variable.
            server_id: CAS server name or ID (default 'cas-shared-default').
            description: Optional project description.
            prediction_type: 'binary', 'interval', or 'nominal' (default 'binary').
            target_event_level: Target event level for binary/nominal classification (default '1').
            auto_run: Whether to automatically run pipelines after creation (default True).
create_model_projecttool Create a SAS Model Manager project to hold models.
Create a SAS Model Manager project to hold models.

        Projects live in a model repository, not in SAS Content. A project of
        that name already in the repository is returned instead of a second one
        (``status`` ``exists``). ``register_model`` also creates the project
        it names when it does not exist, so this is needed only to prepare one.

        Args:
            name: The project's name.
            repository: Repository name or ID (default: the deployment's
                ``MCP_DEFAULT_MODEL_REPOSITORY``, ``Public`` unless changed; see
                ``list_model_repositories``).
            folder: A folder inside the repository to put the project in,
                created when missing. One folder name, not a path.
            function: ``classification`` (default), ``prediction`` or another
                Model Manager function.
            target_variable: The target the project's models predict.
            target_level: ``binary``, ``nominal`` or ``interval``.
            target_event: The event value, for a binary or nominal target.
            description: Optional description.
create_performance_definitiontool Define how a project's models are monitored over time (a performance definition).Network
Define how a project's models are monitored over time (a performance definition).

        The data comes as one CAS table per period in ``data_caslib``, named
        ``<data_prefix>_<n>_<label>``: ``CREDIT_1_Q1``, ``CREDIT_2_Q2``, ... Each
        holds the model's inputs and the actual target. With ``score_data``
        (the default) Model Manager scores them itself; otherwise they must
        already hold the model's outputs. Results go to the
        ``ModelPerformanceData`` caslib, and ``run_performance_definition``
        computes them.

        The project needs its target fields and a champion first:
        ``set_project_champion`` sets both. A project has one performance
        definition: when it has one already, that one is returned, and
        ``replace`` changes it to these settings instead (it keeps its ID).

        Args:
            project_id: The project.
            data_caslib: Caslib of the period tables.
            data_prefix: Their common prefix.
            model_ids: Models to monitor (default: the project's champion).
            name: Definition name (default: "<project> performance").
            input_variables: Inputs to check for drift (default: the first
                model's inputs).
            output_variables: Outputs to assess (default: the event
                probability variable, else the model's outputs).
            score_data: Score the period tables first (default true).
            monitor_champion: Also follow whichever model is champion later.
            monitor_challengers: Also monitor the project's challengers.
            max_bins: Bins for the drift statistics (default 10).
            replace: Change the project's existing definition to these settings.
create_reporttool Create a Visual Analytics report and return its id for further edits.
Create 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, so verify page-by-page with ``export_report``
        (see the result's ``verify_hint``) rather than a whole-report export.

        Args:
            name: Report name (``resultReportName``). Must be unique in the folder
                unless ``on_conflict`` resolves it.
            folder: Optional target folder URI (``resultFolder``); omit for the
                caller's My Folder.
            on_conflict: Name-conflict policy — ``rename`` (default), ``abort``,
                or ``replace``.
            operations: Optional native operations array to apply at creation, in
                the same shape ``apply_report_operations`` takes. Call
                ``describe_report_objects`` for the operation and object formats.
create_segmentation_treetool Create a SAS Intelligent Decisioning segmentation tree.
Create 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", "assign": {"band": "LOW"}},
                        {"name": "high_risk", "assign": {"band": "HIGH"}}]

        An outcome assigns with ``assign`` (variable to value) or runs DS2
        statements with ``code``. To build a large tree from a strategy table,
        use ``create_segmentation_tree_from_table``.

        Args:
            name: Tree name.
            signature: Every variable the tree tests or assigns, each
                ``{"name", "dataType", "direction"}`` — dataType string,
                decimal, integer, date, datetime or boolean; direction input,
                output or inOut. Add ``valueListId`` / ``valueListContentId``
                to tie a variable to a value list.
            node: The root node.
            outcomes: The outcomes the value nodes lead to.
            description: Optional description.
            boolean_expressions: Named DS2 conditions, ``{"name", "expression"}``,
                for nodes of type booleanExpression (value nodes "true" / "false").
            matrices: Matrix definitions, for nodes of type matrix.
            code_files: Internal code files ``{"name", "type": "internal", "code"}``.
            folder: Where to store the tree: a folder path, ``My Folder``, a
                folder ID or URI. Omit to use the default folder; if there is
                none, ask the user.
create_value_listtool Create a value list: the values (or ranges) a variable is compared with.
Create 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_ruletool Permanently delete a rule from a SAS Business Rules rule set.
Permanently 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_rulesettool Permanently delete a SAS Business Rules rule set.
Permanently 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_flowtool Permanently delete a SAS Intelligent Decisioning flow.
Permanently 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_assettool Permanently delete a piece of decisioning content and all its revisions.
Permanently 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_termtool Permanently delete a business term.
Permanently 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: The glossary term UUID.
delete_glossary_term_typetool Delete a term type.Network
Delete 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_kpi_alert_ruletool Delete one of a project's KPI alert rules (``get_project_kpis`` lists them).
Delete one of a project's KPI alert rules (``get_project_kpis`` lists them).

        Args:
            project_id: The project.
            alert_rule_id: The rule.
delete_reporttool Delete a Visual Analytics report and its content.
Delete 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_analytic_storetool Describe an analytic store (a model saved in CAS): its inputs, outputs and algorithm.Network
Describe an analytic store (a model saved in CAS): its inputs, outputs and algorithm.

        Runs PROC ASTORE DESCRIBE. Use it before ``register_model`` to see
        which variables the model expects and produces, and so which target
        and event to register it with.

        Args:
            caslib_name: Caslib of the analytic store table.
            table_name: The analytic store table (for example one written by
                a ``savestate rstore=`` statement).
describe_report_objectstool Discover what a Visual Analytics report can contain — operations and objects.
Discover 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 filtered to one category (Tables, Controls,
            Containers, Content, Graphs, Geo Maps, Analytics, Statistics,
            Machine Learning).
          * ``object_type`` — one object's full contract: its data roles (each
            marked single vs list), the roles it commonly needs, its common
            options (``options.object.title`` etc.), and a ready-to-send
            ``addObject`` example. Colloquial names resolve (``"kpi"`` →
            ``keyValue``); for a VA UI object with no API support (Text Topics,
            Decision tree, GAM, GLM) it returns the nearest addable alternative;
            for an unknown key it returns ``did_you_mean``.
          * ``operation`` — one operation's full shape with a worked example and
            notes; ``operation="addData"`` documents ``dataItems`` (column
            renames, SAS formats, aggregations, geography classification — the
            polish layer most reports need).

        Pair it with ``get_castable_columns`` to see which columns are categories
        vs measures, then map those columns onto the roles reported here.

        Args:
            object_type: A schema key (e.g. ``"barChart"``, ``"scatterPlot"``)
                or colloquial alias for its contract and example.
            category: Restrict the catalog to one category.
            operation: An operation key (e.g. ``"addData"``, ``"applyDataView"``)
                for its full shape, example, and notes.
download_filetool Download file content from the Viya Files Service.
Download file content from the Viya Files Service.

        Args:
            file_id: ID of the file to download.
drop_castabletool Drop a table from CAS memory, keeping its source file.
Drop a table from CAS memory, keeping its source file.

        Frees the memory a loaded table takes; ``promote_table_to_memory``
        loads it again from its source. Nothing on disk is deleted. A table
        with no source file in its caslib exists only in memory, so dropping
        it would lose its data: such a table is refused unless
        ``allow_unsaved`` is true. Save it first with ``save_castable``, or
        ask the user before dropping it. A table that is not loaded is left
        as it is.

        Args:
            caslib_name: Caslib of the table.
            table_name: The table to drop from memory.
            server_id: CAS server (default ``cas-shared-default``).
            allow_unsaved: Drop it even when no source file holds its data
                (default false). Only with the user's say-so.
execute_sas_codetool Executes the provided SAS code in the Viya environment and returns information about the completed Job.Network
Executes 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
        ``reset_compute_session``) when the code must start from a clean slate.

        Tip: to reach CAS data, prefer ``libname casuser cas;`` (or a targeted
        ``caslib`` statement) over ``caslib _all_ assign;`` — on tenants with
        many caslibs the latter floods the log with assignment NOTEs.

        Args:
            sas_code (str): the SAS code snippet to be executed using the Viya Job Execution API Service
            fresh_session: When True, discard any cached compute session first
                so the code runs with no inherited SAS state (equivalent to
                calling ``reset_compute_session`` immediately before).
            html_results: When True (the default), the output is also written
                as an HTML page, as SAS Data and AI Studio shows it, graphs
                included, and
                saved so the person can open it in a browser. The code runs
                between an ``ods html5`` statement and its close, preceded by
                ``;*';*";*/;run;quit;`` so that an unterminated statement or
                quote cannot swallow the close; neither appears in the log.
                Pass False to submit the code exactly as given.

        Returns:
            A dictionary of string fields describing the executed job:
            ``snippet_id`` (the job's snippet identifier), ``state`` (the final
            job state, e.g. ``completed``/``error``/``warning``), ``log`` (the
            full SAS log — execution details, notes, and any errors/warnings),
            and ``listing`` (the SAS listing output, i.e. the intended results
            when the code ran successfully). When the code printed output and
            ``html_results`` is on, also ``html_results_url``: the same output
            as an HTML page, as SAS Data and AI Studio shows it. Put this URL in
            your reply so the person can open it; they may not see the tool
            result itself.
            It opens in their browser after they sign in to SAS Viya, for them
            only. Do not fetch it yourself: ``listing`` already holds the same
            output as text. ``html_results_error`` instead says why the page
            could not be saved.
execute_sas_codetool Execute SAS code in a reusable Viya compute session.Network
Execute SAS code in a reusable Viya compute session.

        Args:
            sas_code (str): the SAS code snippet to be executed using the Viya Job Execution API Service
            html_results: When True (the default), the output is also written
                as an HTML page, as SAS Data and AI Studio shows it, graphs
                included, and
                saved so the person can open it in a browser. The code runs
                between an ``ods html5`` statement and its close, preceded by
                ``;*';*";*/;run;quit;`` so that an unterminated statement or
                quote cannot swallow the close; neither appears in the log.
                Pass False to submit the code exactly as given.

        Returns:
            A dictionary of string fields describing the executed job:
            ``snippet_id`` (the job's snippet identifier), ``state`` (the final
            job state, e.g. ``completed``/``error``/``warning``), ``log`` (the
            full SAS log — execution details, notes, and any errors/warnings),
            and ``listing`` (the SAS listing output, i.e. the intended results
            when the code ran successfully). When the code printed output and
            ``html_results`` is on, also ``html_results_url``: the same output
            as an HTML page, as SAS Data and AI Studio shows it. Put this URL in
            your reply so the person can open it; they may not see the tool
            result itself.
            It opens in their browser after they sign in to SAS Viya, for them
            only. Do not fetch it yourself: ``listing`` already holds the same
            output as text. ``html_results_error`` instead says why the page
            could not be saved.
export_reporttool Export a Visual Analytics report (or specific report objects) in any
Export 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. ``"1200px,800px"``.
          * ``csv`` / ``tsv`` / ``xlsx`` — the data behind a single report
            object; exactly one object label is required.
          * ``summary`` — the report's text summary.

        Args:
            report_id: ID of the report.
            export_format: One of package, pdf, png, svg, csv, tsv, xlsx, summary.
            report_objects: Report object labels to export. ``package``/``pdf``
                accept several; image and data formats accept exactly one;
                ``summary`` accepts none. Omit to export the whole report where
                the format allows it.
            image_size: Required for ``png``/``svg``; format ``"<w>px,<h>px"``.
            options: Optional ``pdf`` rendering overrides, passed through as query
                parameters (e.g. ``{"orientation": "landscape"}``).

        Returns text inline for text formats, image content for ``png``, and an
        embedded binary file (carrying the right MIME type) for ``package`` /
        ``pdf`` / ``xlsx``. Binary results larger than ``MAX_EXPORT_INLINE_BYTES``
        are refused with guidance rather than streamed through the model context.

        Verifying freshly authored reports: a WHOLE-report ``png`` can render
        blank (API-created reports keep an empty default "Page 1" first) —
        export page-by-page instead by passing a page label in
        ``report_objects``. Text objects 404 on per-object image export; use
        their page. ``pdf`` with no ``report_objects`` is the reliable
        whole-report fallback. ``get_report_outline`` lists the page/object
        labels to pass here.
find_foldertool Look up a SAS Content folder and return its ID, URI, name and full path.
Look 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>``).
fntool
No description.
fntool
No description.
get_business_ruletool Fetch a single rule's definition from a SAS Business Rules rule set.
Fetch 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_rulesettool Fetch a single SAS Business Rules rule set by ID.
Fetch 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_columnstool Get column metadata for a CAS table (names, types, labels, formats).
Get 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_datatool Fetch rows from a CAS table with column names.
Fetch 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_infotool Get metadata for a CAS table (row count, column count, size, etc.).
Get 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_datatool Fetch rows from a table in a SAS library, with column names.
Fetch 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 ``execute_sas_code`` calls are visible.

        Args:
            compute_context_name: Name of the compute context (see list_compute_contexts).
            library_name: The libref, e.g. ``WORK`` or ``SASHELP``.
            table_name: The table within the library.
            limit: Maximum rows to return (default 100).
            start: Row offset for paging (default 0).

        Returns:
            ``{columns, rows, count, start, limit, truncated, column_types}`` —
            ``rows`` are dicts keyed by column name, ``count`` is the table's
            total row count as the service reports it, and ``truncated`` is
            true when rows exist beyond this page.
get_decision_flowtool Fetch the current state of a SAS Intelligent Decisioning flow.
Fetch 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_codetool Retrieve the generated DS2 execution code for a decision flow.
Retrieve 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_revisiontool Fetch the content of a specific locked decision revision.
Fetch 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_assettool Fetch one piece of decisioning content, or one of its revisions, with the folder it is in.
Fetch 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,
                value_list, lookup_table, custom_function or function_category.
            asset_id: The ID (not the name — list_decisioning_assets returns
                both); a lookup table may also be given by its exact name.
            revision_id: A revision to read instead of the current state (for a
                lookup table: a version ID or label).
            summary_only: Return the summary rather than the full content.
get_decisioning_asset_codetool The DS2 code Viya generates for a rule set, decision or segmentation tree, or a code file's source.
The 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_termtool Get one business term in full, with its custom attributes named rather than hashed.Network
Get 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`` — the *other* id this term has, the
        one asset relationships point at.

        Args:
            term_id: The glossary term UUID (not the catalog entity id —
                search_glossary_terms returns both).
get_glossary_term_typetool Get a term type and the attribute contract its terms must satisfy.Network
Get 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_logtool Retrieve the log of a completed job.
Retrieve the log of a completed job.

        Args:
            job_id: ID of the job.
get_job_statustool Check the status of a submitted job.
Check the status of a submitted job.

        Args:
            job_id: ID of the job.
get_lookup_tabletool Read a lookup table: its versions, one version's entries and the rule sets that use it.
Read 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.
            start: Index of the first entry to return (for paging).
            limit: Maximum entries to return (default 200); ``next_start``
                is set when there are more.
get_mas_module_step_signaturetool Fetch a MAS module step's input/output variable signature.
Fetch 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_modeltool Describe a registered model: project, version, target, variables and files.Network
Describe a registered model: project, version, target, variables and files.

        Use it before scoring, publishing or monitoring a model, to see its
        input variables (what a scoring table must hold), its target and event
        probability variable, and whether it is the project's champion
        (``role``).

        Args:
            model_id: The model's ID (see ``list_registered_models``).
get_project_kpistool Read how a project's models are monitored: KPIs, KPI alert rules, alerts and performance definitions.
Read how a project's models are monitored: KPIs, KPI alert rules, alerts and performance definitions.

        ``kpis`` are the latest values from the performance runs, each with a
        ``name`` (``_AUC_``, ``_MISC_``, ``_F1_``, ``_ASE_``, ...; ``devIndex``
        once per variable for drift), a ``value`` and a ``kpiCategory``.
        ``alert_rules`` are the project's KPI alert rules
        (``set_kpi_alert_rule``), and ``alerts`` checks the champion — or
        ``model_id`` — against each: ``breached`` is Model Manager's own
        verdict on the latest KPI. ``performance_definitions`` are what
        ``run_performance_definition`` runs.

        Args:
            project_id: The project.
            model_id: Check this model against the rules instead of the champion.
            limit: Maximum KPIs (default 100).
get_reporttool Get a Visual Analytics report's metadata and definition.
Get a Visual Analytics report's metadata and definition.

        Args:
            report_id: ID of the report.
get_report_outlinetool Read a report's structure: pages → objects with the handles other tools need.
Read 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.

        Returns ``{"status": "ok", "pages": [...], "hint": ...}`` (or
        ``not_found`` / ``outline_failed``).

        Args:
            report_id: The report id to outline.
get_score_executiontool Report a score execution: its state, its output table, and why it failed if it did.
Report a score execution: its state, its output table, and why it failed if it did.

        Args:
            execution_id: From ``score_table`` (or ``test_score_model`` when it
                ran out of time).
            rows: When it has completed, also return this many scored rows
                (default 0, at most 100).
import_glossary_termstool Create many business terms, and their hierarchy, in one call.Network
Create 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 order; they
        are sorted so every parent is created before its children.

        Attribute values take the same forms as ``create_glossary_term`` —
        ``True``/``False`` for a boolean, a list for a multi-select — and are
        validated here, per term type, before anything is sent. So are the term
        type's **required** attributes: a row missing one fails inside the job
        with a message naming only the field, so the batch is refused here
        instead, before any of it is committed.

        **The import runs as a job and reports rows individually.** A row can
        fail while the rest succeed, so the result carries ``created``,
        ``failed`` and a ``failures`` list naming each bad row and why. Treat a
        non-empty ``failures`` as a partial import: the successful rows are
        already committed.

        **The result names the term each row became.** ``terms`` carries
        ``{name, path, term_id, existed}`` per row, so the next step — assigning
        an asset, re-parenting, reading one back — needs no lookup. This costs
        one filtered request per 40 distinct names, not one per term.

        Two things the import does that a per-term create does not:

        * **A row is written whole.** With ``update_existing`` the term at that
          path is *replaced*, so an attribute the row omits is reset — not left
          as it was. Without it the existing term is left alone. Either way the
          job counts the row as successful, so ``created`` counts rows the job
          accepted; **``new`` is the count of terms that did not exist before**,
          with ``already_existed`` the rest and ``existed`` saying which is
          which per row.
        * **Omitted attributes take the term type's default**, on new rows as
          well as replaced ones — the same as creating a term through the API.

        Args:
            terms: The rows to create. Each is
                ``{"name": ..., "parent": ..., "definition": ...,
                "description": ..., "attributes": {...}}``; ``term_type`` may be
                given per row to mix types in one batch.
            term_type: The term type for rows that do not name one.
            update_existing: Replace a term that already exists at the same path
                (default false, which leaves it untouched).
            timeout_seconds: How long to wait for the import job (default 600).
            dry_run: Validate and show what *would* be imported without
                importing anything: the rows in the order they would be sent,
                each with its resolved parent path and encoded attributes.
                Use it to let the person confirm a batch first — in a client
                that renders interactive views the preview appears as a table
                with an Import button; elsewhere, call again with
                ``dry_run=false`` once they agree.
list_business_rulestool List all rules inside a SAS Business Rules rule set.
List 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_revisionstool List all locked revisions of a rule set.
List 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_rulesetstool List SAS Business Rules rule sets, optionally filtered by name substring.
List 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_serverstool List available CAS servers on the Viya environment.
List available CAS servers on the Viya environment.
list_caslibstool List CAS libraries (caslibs) available on a CAS server.
List 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_castablestool List tables in a CAS library.
List 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_columnstool List the columns of a table in a SAS library within a compute context.
List 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_contextstool List available compute contexts on the Viya environment.
List available compute contexts on the Viya environment.
list_compute_librariestool List the SAS libraries (librefs) assigned in a compute context.
List 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_tablestool List the tables in a SAS library within a compute context.
List 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_revisionstool List all locked revisions of a decision flow.
List 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_flowstool List SAS Intelligent Decisioning flows, optionally filtered by name substring.
List 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_revisionstool List the revisions of a rule set, decision, segmentation tree or code file, newest first.
List 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_assetstool List SAS Intelligent Decisioning content of one kind, optionally filtered by name.
List 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_filestool List files in the Viya Files Service.
List files in the Viya Files Service.

        Args:
            limit: Maximum files to return (default 50).
            filter_name: Optional name filter (substring match).
list_glossary_term_typestool List the term types defined in the SAS Business Glossary.
List 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 term types to return (default 50).
            start: Offset of the first term type (default 0).
list_glossary_termstool List glossary terms by structure — term type, parent, or name fragment.Network
List 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 unpublished drafts (default false — published only).
            limit: Maximum terms to return (default 20).
            start: Offset of the first term (default 0).
            include_attributes: Also return each term's custom attributes,
                named (default false). Free — the listing already carries them.
            attribute_filter: Keep only terms whose attributes match, e.g.
                ``{"Needs masking": true}`` or ``{"Regions": "EMEA"}``. Clauses
                are ANDed; a multi-select matches when it *contains* the value.
                **The glossary cannot filter on attributes server-side**, so
                this is applied here over pages fetched for the purpose: the
                result reports how many terms were scanned and whether the scan
                reached the end. Narrow it with ``term_type`` or ``parent_id``
                where you can.
list_jobstool List recent jobs from the Job Execution service.
List recent jobs from the Job Execution service.

        Args:
            limit: Maximum jobs to return (default 20).
list_mas_modulestool List published scoring models and decisions (MAS modules).
List published scoring models and decisions (MAS modules).

        Args:
            limit: Maximum modules to return (default 50).
list_ml_projectstool List AutoML pipeline automation projects.
List AutoML pipeline automation projects.

        Args:
            limit: Maximum projects to return (default 50).
list_model_projectstool List SAS Model Manager projects, most recently changed first.
List SAS Model Manager projects, most recently changed first.

        Args:
            repository: Only this repository (name or ID); all when omitted.
            name_filter: Only projects whose name contains this text.
            limit: Maximum projects (default 50).
list_model_repositoriestool List the SAS Model Manager repositories (where model projects live).
List the SAS Model Manager repositories (where model projects live).

        ``default`` marks the one new projects and registrations use when a call
        names none (the deployment's ``MCP_DEFAULT_MODEL_REPOSITORY``).
list_model_versionstool List a registered model's versions, the current one first.Network
List a registered model's versions, the current one first.

        Args:
            model_id: The model's ID (see ``list_registered_models``).
list_published_modelstool List models published to destinations (MAS, CAS, containers, Git, ...).
List models published to destinations (MAS, CAS, containers, Git, ...).

        Each entry names its destination, its published name, its state and
        the registered model it came from (``modelId``). Use it to find the
        published copy that ``validate_published_model`` checks, or to see
        where a model is already deployed.

        Args:
            destination_name: Only this destination (see
                ``list_publishing_destinations``).
            name_filter: Only published names containing this text.
            limit: Maximum entries (default 50).
list_publishing_destinationstool List available publishing destinations.
List 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_modelstool List models in the Model Repository.
List models in the Model Repository.

        Args:
            limit: Maximum models to return (default 50).
list_reportstool List Visual Analytics reports.
List Visual Analytics reports.

        Args:
            limit: Maximum reports to return (default 50).
            filter_name: Optional name filter (substring match).
list_source_tablestool List source tables that are NOT yet loaded into memory in a CAS library.
List 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_termstool List the business terms assigned to a table's columns.
List 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, if the URI is not known. Rejected as ambiguous
                when more than one table matches.
            max_columns: Maximum columns to inspect (default 200).
            assigned_only: Return only columns that carry a term (default true).
                Set false to see the unassigned columns too.
list_term_assetstool List the data assets a business term is attached to — the columns that mean it.
List 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 tables without resolving columns.

        Args:
            term_id: The glossary term UUID.
            term_name: Exact term name, if the id is not known. One of the two is
                required.
            limit: Maximum assets to return in one call (default 100, ceiling
                500 — the catalog's page size).
            start: Offset of the first asset returned (default 0). ``count`` in
                the result is the term's **total** asset count, so to read every
                asset of a heavily used term, call again with
                ``start`` = ``next_start`` until ``truncated`` is false.
lock_business_ruleset_revisiontool Lock the current state of a rule set as an immutable revision.
Lock 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 set's full content
        from the body sent, so this fetches the rule set with its rules
        included (``application/vnd.sas.business.rule.set.integral+json``)
        and resends them — omitting them would wipe the live rule set's rules,
        not just the new revision.

        Args:
            ruleset_id: The rule set UUID (not its name — list_business_rulesets returns both).
            revision_type: "minor" for iterative changes, "major" for a
                significant/approved milestone (default "minor").
lock_decision_flow_revisiontool Lock the current state of a decision flow as an immutable revision.
Lock 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_revisiontool Freeze the current state of a rule set, decision, segmentation tree or code file as a locked revision.
Freeze 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_memorytool Load a source table into CAS memory at global scope (visible to all sessions).
Load 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_flowtool Publish a locked decision revision to a Micro Analytic Score (MAS) destination.
Publish 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 the real ``moduleId`` alongside the
        publish record, so the result is directly usable with
        ``get_mas_module_step_signature``/``score_data`` without a separate
        lookup via ``list_mas_modules``.

        The code is generated for MAS, as SAS Intelligent Decisioning does when
        it publishes, so lookup tables are read from MAS. Unlike a module the
        Intelligent Decisioning UI publishes, whose inputs end in an underscore
        (``credit_score_``), the module's inputs keep the decision's variable
        names.

        Args:
            decision_id: The decision flow UUID (not its name — list_decision_flows returns both).
            revision_id: The locked revision UUID (see
                ``lock_decision_flow_revision``).
            publish_name: The published name shown in Model Publish (not the
                MAS module ID — see above).
            destination_name: A Micro Analytic Score publishing destination.
                Default: the deployment's ``MCP_DEFAULT_PUBLISH_DESTINATION``,
                ``maslocal`` unless an administrator changed it. The code is
                generated for MAS, so the destination must be a MAS one.
            poll_timeout: Max seconds to wait for the publish job to reach a
                terminal state before giving up (default 60.0).
publish_ml_champion_modeltool Publish the champion model from an AutoML pipeline automation project to a destination.
Publish the champion model from an AutoML pipeline automation project to a destination.

        Args:
            project_id: ID of the ML pipeline automation project.
            destination_name: Name of the destination to publish to (see
                ``list_publishing_destinations``). Default: the deployment's
                ``MCP_DEFAULT_PUBLISH_DESTINATION``, ``maslocal`` unless an
                administrator changed it.
publish_modeltool Publish a registered model to a destination: MAS, CAS, a container registry, Git, ...Network
Publish a registered model to a destination: MAS, CAS, a container registry, Git, ...

        Any model in the Model Repository can be published, whatever made it.
        With ``dry_run`` the tool only reports what it would do: the
        destination and its type, the published name, and whether a published
        model of that name is already there. A published model of the same
        name is not replaced unless ``replace`` is true. Publishing runs in the
        background; ``list_published_models`` shows its state and
        ``validate_published_model`` checks the published copy.

        Args:
            model_id: The model's ID.
            destination_name: Destination (see ``list_publishing_destinations``).
                Default: the deployment's ``MCP_DEFAULT_PUBLISH_DESTINATION``,
                ``maslocal`` unless an administrator changed it.
            publish_name: The published name (default: the model's name, with
                characters a destination refuses turned into underscores).
            replace: Replace a published model of the same name.
            dry_run: Only report what would happen.
            git_remote_path: For a Git destination: the directory in the
                repository to publish to.
query_datatool Run a FedSQL SELECT against CAS or compute data and return the rows.Network
Run 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 ``caslib.table``
          (e.g. ``Public.HMEQ``); see list_caslibs / list_castables.
        * ``target='compute'`` — qualify as ``libref.table`` (e.g. ``WORK.SALES``);
          see list_compute_libraries / list_compute_tables. **Concatenated
          librefs — several directories under one name, which is what SASHELP
          and MAPS are — are invisible to FedSQL**, because its BASE driver maps
          one schema to one directory. Copy such a table into WORK first
          (``data work.cars; set sashelp.cars; run;``) and query ``WORK.CARS``.

        **Dialect notes** (FedSQL, not PROC SQL): joins (inner/left/right/full/
        cross), subqueries, UNION, GROUP BY/HAVING/ORDER BY, and scalar functions
        work. There is **no WITH/CTE** — use a derived table ``(select ...) "t"``
        — and **no MERGE**; express a merge as a join (a full join with COALESCE
        gives upsert semantics). Double-quote identifiers that are reserved words
        or contain spaces; SAS name literals (``'x'n``) are not FedSQL.

        Row capping is done by this tool, not by your SQL: any LIMIT you write is
        ignored in favour of ``limit`` (a malformed LIMIT is silently discarded by
        CAS and would return the whole table). Add ORDER BY for stable paging.

        Args:
            query: A single FedSQL SELECT statement. DDL/DML is refused — this
                tool only reads rows.
            target: Which tier the identifiers refer to — ``cas`` (default) or
                ``compute``.
            limit: Maximum rows to return, 1..10000 (default 100).
            start: Row offset for paging (default 0).
            create_view_name: If set, the result includes ``create_view_sql`` —
                the ``CREATE VIEW <name> AS <query>`` text for this query. It is
                returned for you to run yourself, never executed here.
            compute_context_name: Compute context to run in; defaults to the
                server's configured execution context.

        Returns:
            ``{columns, rows, count, start, limit, truncated, column_types}`` on
            success — ``rows`` are dicts keyed by column name, with dates
            rendered as ISO text and missing values as null. ``truncated`` is
            true when more rows exist beyond this page. On failure, a status dict
            (``invalid_query``, ``table_not_found``, ``column_not_found``,
            ``schema_not_found``, ``ambiguous_column``, ``syntax_error``,
            ``query_failed``) whose ``message`` names the fix.
register_ml_champion_modeltool Register the champion model from an AutoML pipeline automation project to the Model Repository.
Register the champion model from an AutoML pipeline automation project to the Model Repository.

        Args:
            project_id: ID of the ML pipeline automation project.
register_modeltool Register a SAS model in SAS Model Manager with PROC REGISTERMODEL.Network
Register a SAS model in SAS Model Manager with PROC REGISTERMODEL.

        Takes either an analytic store in CAS (``astore_caslib`` +
        ``astore_table``, as written by ``savestate rstore=``) or DATA step
        score code (``score_code``). Not Python or DS2 models. The procedure
        stores the model's variables, properties and score code, and with
        ``assessment`` its fit statistics, ROC and lift. It runs in a compute
        session of its own and takes 5–30 seconds.

        The project is ``project_id``, or the project named ``project`` in the
        repository (created there when missing, in ``project_folder``).

        A model with the same name already in the project is **refused**
        unless ``replace`` is true. Replacing deletes that model and creates
        one with a new ID, which loses its score tests, publish history and
        monitoring: ask the user before passing ``replace``.

        Args:
            name: The model's name in the project.
            project: Project name (found or created in ``repository``).
            project_id: An existing project's ID, instead of ``project``.
            repository: Repository name (default: the deployment's
                ``MCP_DEFAULT_MODEL_REPOSITORY``, ``Public`` unless changed).
            project_folder: Folder in the repository for a new project; one
                folder name, not a path.
            astore_caslib: Caslib of the analytic store table.
            astore_table: The analytic store table.
            score_code: DATA step score code, instead of an analytic store.
            data_caslib: Caslib of the training or validation table.
            data_table: The table the model was trained on. It defines the
                input variables of DATA step code and is needed for assessment.
            target_variable: The target variable.
            target_level: ``binary``, ``nominal`` or ``interval``.
            target_event: The event value of a binary or nominal target, such as ``1``.
            algorithm: The algorithm, as a keyword: TREE, FOREST, GRADBOOST,
                LOGISTIC, REGRESSION, NEURAL, SVM, ...
            function: CLASSIFICATION or PREDICTION, as a keyword.
            description: Optional description.
            modeler: Optional name of who built the model.
            assessment: Compute fit statistics, ROC and lift (default: when a
                data table and a target are given).
            replace: Replace a model of the same name (see above).
reset_compute_sessiontool Reset (delete) the cached compute session for a compute context.
Reset (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`` uses).
run_ml_projecttool Run an AutoML pipeline automation project.
Run an AutoML pipeline automation project.

        Args:
            project_id: ID of the project to run.
run_performance_definitiontool Run a performance definition: score and assess each period table, then calculate the KPIs.
Run a performance definition: score and assess each period table, then calculate the KPIs.

        Name the definition, or the project when it has just one. The run
        goes on in the background. With ``wait_seconds`` the tool waits up to
        that long (at most 600); when the run has finished it has Model
        Manager calculate the project's KPIs, as Model Manager's own
        monitoring workflow does, and reports the KPI alert rules the
        champion breaks. Otherwise call again with ``wait_seconds``, or read
        ``get_project_kpis`` later. Runs over two small periods took from
        half a minute to two minutes on SAS Viya 2026.10.

        Args:
            performance_definition_id: From ``create_performance_definition``.
            project_id: The project instead, when it has one definition.
            wait_seconds: How long to wait for the run (default 0).
save_castabletool Save an in-memory CAS table to a file (or database table) in a caslib.
Save an in-memory CAS table to a file (or database table) in a caslib.

        A table loaded into CAS memory is lost when it is dropped or the CAS
        server restarts unless it is saved. This writes it to the caslib's
        data source, so ``promote_table_to_memory`` can load it again later.
        An existing file is not overwritten unless ``replace`` is true.

        Args:
            caslib_name: Caslib of the loaded table.
            table_name: The loaded table to save.
            server_id: CAS server (default ``cas-shared-default``).
            target_caslib: Caslib to write to (default: the table's own).
            target_name: Name of the saved file, without extension (default:
                the table's name).
            file_format: ``sashdat`` (default, fastest to load back), ``csv``,
                ``parquet`` or ``sas7bdat``.
            replace: Overwrite an existing file of that name (default false).
score_datatool Score data against a published model or decision (MAS module).
Score 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.
score_tabletool Score a whole CAS table with a registered model; the result is a new CAS table.Network
Score a whole CAS table with a registered model; the result is a new CAS table.

        Runs the model straight from the Model Repository, so it need not be
        published first. Scoring runs in the background: this returns the
        score execution at once, and ``get_score_execution`` reports when it
        has finished and where the scored table is. The score definition
        stays in the model's project, as one made in Model Manager would.

        Args:
            model_id: The model's ID.
            caslib_name: Caslib of the input table.
            table_name: A CAS table holding the model's input variables.
            output_caslib: Caslib for the scored table (default: the input's).
            output_table: Name of the scored table (default:
                ``<table_name>_SCORED``).
search_glossary_termstool Free-text search of the business glossary — the way in when you know a word, not an id.Network
Free-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 term is actually in
        use before spending a call on ``list_term_assets``. A term with a count
        of 0 exists in the dictionary and is attached to no data.

        Args:
            query: Search text. ``*`` matches every term.
            limit: Maximum hits to return (default 20).
            start: Offset of the first hit (default 0).
            include_attributes: Also return each hit's custom attributes, named
                (default false). The search index does not carry them, so this
                costs one extra batched call per 40 hits; leave it off when the
                names and definitions are all you need.
set_kpi_alert_ruletool Set a KPI alert rule on a model project: alert when a monitoring KPI crosses a threshold.Network
Set a KPI alert rule on a model project: alert when a monitoring KPI crosses a threshold.

        Model Manager checks the project's models against its rules whenever
        their KPIs are calculated (``run_performance_definition``) and lists
        them as the project's KPI rules. ``kpi`` is one of:

        - accuracy: ``AUC``, ``misclassification``, ``TPR``, ``FPR``, ``F1``,
          ``ASE``, ``RASE``, ``R-squared``, ``global accuracy``, cumulative
          lift ``_Cumlift5_`` to ``_Cumlift30_``, or the KPI names
          ``get_project_kpis`` lists;
        - drift: ``devIndex`` (the deviation index) of each variable in
          ``variables``, input or output — one rule per variable;
        - fairness: ``EqualOpportunity``, ``DemographicParity``,
          ``PredictiveParity``, ``EqualAccuracy`` or ``EqualizedOdds`` for the
          sensitive variable in ``variables``.

        ``operator`` is ``greaterThan`` (alert above the threshold, as for
        misclassification or drift) or ``lessThan`` (alert below it, as for
        AUC). A rule for the same KPI, variable and direction is updated, not
        duplicated; ``alert_rule_id`` updates a given rule, its direction too.
        The result says whether the champion breaks the rule now.

        Args:
            project_id: The project.
            kpi: The KPI to watch.
            operator: ``greaterThan`` or ``lessThan``.
            threshold: The value the KPI should not cross.
            variables: The variables of a drift or fairness KPI.
            severity: ``low``, ``medium`` (default) or ``high``: Model
                Manager's priority.
            occurrences: Alert after this many occurrences (default 1).
            name: The rule's name (default as Model Manager names it,
                "AUC Less than 0.9"); ``{variable}`` is replaced by each variable.
            alert_rule_id: A rule to update instead.
set_project_championtool Make a model its project's champion, preparing the project as Model Manager's UI does.Network
Make a model its project's champion, preparing the project as Model Manager's UI does.

        The champion is the model a project publishes and monitors. Model
        Manager refuses a champion until the project has its target fields
        and its variables, which PROC REGISTERMODEL does not set, so this
        first copies the model's target, event and event probability variable
        to the project where they are missing, and adds the model's input and
        output variables the project lacks. Fields already set are kept.

        Args:
            project_id: The project's ID.
            model_id: A model in that project.
submit_batch_jobtool Submit a SAS job for asynchronous execution via the Job Execution service.
Submit 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.
test_score_modeltool Score a few rows with a registered model and return the scored rows.Network
Score a few rows with a registered model and return the scored rows.

        Model Manager's own score test: it takes the first ``rows`` rows of
        the table, scores them with the model in the "SAS Model Manager
        compute context", waits, and returns them with the model's output
        columns (for example ``P_BAD1`` and ``I_BAD``). Use it to check that a
        model runs before publishing or monitoring it. Nothing is left behind:
        the scratch tables and the score definition are removed. It takes
        about 15 seconds plus a compute session start.

        The table needs the model's input variables (``get_model`` lists
        them). For a whole table use ``score_table``.

        Args:
            model_id: The model's ID.
            caslib_name: Caslib of the input table.
            table_name: A loaded CAS table holding the model's inputs.
            rows: How many rows to score (default 10, at most 100).
            timeout_seconds: How long to wait for the score test (default 180).
unassign_glossary_termtool Remove a business term's assignment from a table column.
Remove 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_ruletool Update an existing rule inside a SAS Business Rules rule set.
Update 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).
            actions: List of assignment/return/lookupValue actions to perform when matched.
update_business_rulesettool Update an existing SAS Business Rules rule set's name/description/signature.
Update 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 variables the rules operate on.
            description: Optional description.
            folder: Only used when the rule set is in no folder yet: a folder
                path, ``My Folder``, a folder ID or a folder URI to file it in.
update_code_filetool Change a code file's working revision: its code, name, description or signature types.
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.

        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_functiontool Change a custom function's code, description or category; new code is checked to compile first.
Change 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_flowtool Update an existing SAS Intelligent Decisioning flow.
Update 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 whole flow, every step kind — assignments, models,
                branches, conditions, rule sets, trees, code files, sub-decisions;
                ``create_decision_flow`` describes each, with an example.
            rule_set_steps: Ordered list of rule set steps (see
                ``create_decision_flow`` for the shape).
            description: Optional description.
            folder: Only used when the decision is in no folder yet: a folder
                path, ``My Folder``, a folder ID or a folder URI to file it in.
            add_missing_variables: With ``steps``, add a decision variable for every
                step term none matches (default true; see ``create_decision_flow``).
update_glossary_termtool Update a business term's text, parent or custom attributes — and publish a draft.Network
Update 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 attribute the type marks
        **required** must hold a value — including ones made required after this
        term was created. That is checked before the call, and reported by name.

        A term's **type** cannot be changed after creation. Its **parent** can:
        pass ``parent_id`` to move it, or ``""`` to make it a root term.

        **A draft is a different resource.** A term left unpublished by
        ``create_glossary_term(publish=false)`` can be read and deleted at the
        ordinary path, but not written there — the service answers a plain
        ``PUT`` on a draft with a 404. This routes the write to the draft
        instead, so editing one works; and ``publish`` then promotes it to a
        published term, which nothing else here could do. Publishing a term that
        is already published is reported, not attempted: there is no draft to
        promote and the service answers that with a 404 too.

        Args:
            term_id: The glossary term UUID.
            name: New name (unique among siblings, max 100 characters).
            definition: New definition.
            description: New description, max 1000 characters.
            label: New display label.
            parent_id: Move the term under a different parent, or ``""`` to make
                it a root term. A term cannot be its own ancestor.
            attributes: Custom attributes to change, keyed by label. Same value
                forms as create_glossary_term — booleans as True/False,
                multi-select as a list.
            publish: Publish the term if it is still a draft (default false).
                Pass it on its own to publish without changing anything else.
update_glossary_term_typetool Change a term type: rename it, or add, edit and remove its attributes.Network
Change 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 stays behind under the old one, no
        longer readable as that attribute. ``get_glossary_term_type`` returns
        the id of each.

        Making an attribute ``required`` applies to terms created *afterwards*
        and to every later edit of the ones already there: an update rewrites
        the whole term, so older terms must be given a value for it before they
        can be saved again. ``update_glossary_term`` reports that by name.

        Args:
            term_type_id: The term type UUID, or its name.
            name: New name.
            label: New display name.
            description: New description.
            attributes: Attributes to add or change, same shape as
                ``create_glossary_term_type``, plus an optional
                ``attribute_id`` naming which existing attribute the spec is —
                required to rename one. Omitted attributes survive.
            remove_attributes: Labels to drop from the type. Terms keep the
                stored value, but under an identifier nothing names any more, so
                it stops being readable as that attribute.
            allow_custom_attributes: Whether terms may add their own.
update_lookup_tabletool Change a lookup table's entries, column labels, name or description.
Change 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_table: The lookup table's ID or exact name.
            set_entries: Entries to add or overwrite: ``{"key": "value"}`` or a
                list of ``{"key", "value"}`` objects.
            remove_keys: Keys to delete.
            replace_entries: The complete new entries (not with set_entries or remove_keys).
            name: New name.
            description: New description.
            key_label: New name of the key column.
            value_label: New name of the value column.
            activate: Publish the changed version right away (default false).
            wait_seconds: How long to wait for activation to finish (max 300).
            folder: Only used for a lookup table that is in no folder yet.
update_segmentation_treetool Change a segmentation tree's working revision: only the parts given are replaced.
Change 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.
            folder: Only used for a tree that is in no folder yet.
update_value_list_entriestool Replace the entries of a value list's newest version.
Replace 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_filetool Upload a file to the Viya Files Service, optionally into a Content folder.FilesNetworkoutside text
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.

        Args:
            file_name: Name for the file.
            content: File content as an inline string (small text files).
            file_path: Path to a file the server reads directly from disk.
            url: HTTP(S) URL the server fetches the file from.
            parent_folder_uri: Target folder URI (``/folders/folders/{id}``);
                get one from list_files or the Folders service.
            content_type: MIME type. Defaults to ``text/plain`` for ``content``,
                else guessed from ``file_name`` (``application/octet-stream``
                when unguessable).
upload_inline_datatool Create a small CAS table from inline delimited text passed as a string.
Create 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.
            caslib_name: Target caslib name.
            table_name: Name for the new table.
            data: The delimited text, including the header row.
            data_format: 'csv' (default) or 'tsv' (alias 'tab').
            contains_header_row: Whether the first row holds column names (default True).
validate_custom_functiontool Compile a DS2 custom function without saving it, and return its errors.
Compile 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_expressiontool Check that a DS2 expression compiles: a rule condition or action, a branch or a condition step.
Check 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"}]``.
validate_published_modeltool Check a published model by scoring a few rows with the published copy.Network
Check a published model by scoring a few rows with the published copy.

        Model Manager's publish validation: the first ``rows`` rows of the
        table are scored in the destination itself (MAS, CAS, ...), and the
        scored rows come back. Compare them with ``test_score_model`` on the
        registered model to confirm the copy behaves the same. Name the copy
        by ``published_model_id`` (see ``list_published_models``), or by
        ``model_id`` and ``destination_name``.

        Args:
            caslib_name: Caslib of the input table.
            table_name: A loaded CAS table holding the model's inputs.
            published_model_id: The published copy's ID.
            model_id: The registered model, instead of published_model_id.
            destination_name: With model_id (default: the deployment's
                ``MCP_DEFAULT_PUBLISH_DESTINATION``).
            rows: How many rows to score (default 10, at most 100).
            timeout_seconds: How long to wait (default 180).

Text the model reads (199)

Every tool, prompt and resource description as written in the code: the model sees all of it, the user usually does not.

(name computed at run time) tool
fn tool
(name computed at run time) tool
(name computed at run time) tool
fn tool
(name computed at run time) tool
list_ml_projects tool
List AutoML pipeline automation projects.

        Args:
            limit: Maximum projects to return (default 50).
create_ml_project tool
Create 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 target/response variable.
            server_id: CAS server name or ID (default 'cas-shared-default').
            description: Optional project description.
            prediction_type: 'binary', 'interval', or 'nominal' (default 'binary').
            target_event_level: Target event level for binary/nominal classification (default '1').
            auto_run: Whether to automatically run pipelines after creation (default True).
register_ml_champion_model tool
Register the champion model from an AutoML pipeline automation project to the Model Repository.

        Args:
            project_id: ID of the ML pipeline automation project.
publish_ml_champion_model tool
Publish the champion model from an AutoML pipeline automation project to a destination.

        Args:
            project_id: ID of the ML pipeline automation project.
            destination_name: Name of the destination to publish to (see
                ``list_publishing_destinations``). Default: the deployment's
                ``MCP_DEFAULT_PUBLISH_DESTINATION``, ``maslocal`` unless an
                administrator changed it.
run_ml_project tool
Run an AutoML pipeline automation project.

        Args:
            project_id: ID of the project to run.
execute_sas_code tool
Executes 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
        ``reset_compute_session``) when the code must start from a clean slate.

        Tip: to reach CAS data, prefer ``libname casuser cas;`` (or a targeted
        ``caslib`` statement) over ``caslib _all_ assign;`` — on tenants with
        many caslibs the latter floods the log with assignment NOTEs.

        Args:
            sas_code (str): the SAS code snippet to be executed using the Viya Job Execution API Service
            fresh_session: When True, discard any cached compute session first
                so the code runs with no inherited SAS state (equivalent to
                calling ``reset_compute_session`` immediately before).
            html_results: When True (the default), the output is also written
                as an HTML page, as SAS Data and AI Studio shows it, graphs
                included, and
                saved so the person can open it in a browser. The code runs
                between an ``ods html5`` statement and its close, preceded by
                ``;*';*";*/;run;quit;`` so that an unterminated statement or
                quote cannot swallow the close; neither appears in the log.
                Pass False to submit the code exactly as given.

        Returns:
            A dictionary of string fields describing the executed job:
            ``snippet_id`` (the job's snippet identifier), ``state`` (the final
            job state, e.g. ``completed``/``error``/``warning``), ``log`` (the
            full SAS log — execution details, notes, and any errors/warnings),
            and ``listing`` (the SAS listing output, i.e. the intended results
            when the code ran successfully). When the code printed output and
            ``html_results`` is on, also ``html_results_url``: the same output
            as an HTML page, as SAS Data and AI Studio shows it. Put this URL in
            your reply so the person can open it; they may not see the tool
            result itself.
            It opens in their browser after they sign in to SAS Viya, for them
            only. Do not fetch it yourself: ``listing`` already holds the same
            output as text. ``html_results_error`` instead says why the page
            could not be saved.
list_compute_contexts tool
List available compute contexts on the Viya environment.
reset_compute_session tool
Reset (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`` uses).
upload_data tool
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).

        Args:
            server_id: CAS server name or ID.
            caslib_name: Target caslib name.
            table_name: Name for the new table.
            file_path: Path to a data file the server reads directly from disk.
            url: HTTP(S) URL the server fetches the file from.
            data_format: Override format detection. One of csv, tsv, xls, xlsx,
                sas7bdat, sashdat (aliases: excel→xlsx, tab→tsv, sas→sas7bdat).
            sheet_name: For Excel sources, the worksheet to import (first sheet by default).
            contains_header_row: Whether the first row holds column names — applies
                to csv/tsv/Excel (default True).
upload_inline_data tool
Create 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.
            caslib_name: Target caslib name.
            table_name: Name for the new table.
            data: The delimited text, including the header row.
            data_format: 'csv' (default) or 'tsv' (alias 'tab').
            contains_header_row: Whether the first row holds column names (default True).
promote_table_to_memory tool
Load 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.
list_files tool
List files in the Viya Files Service.

        Args:
            limit: Maximum files to return (default 50).
            filter_name: Optional name filter (substring match).
upload_file tool
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.

        Args:
            file_name: Name for the file.
            content: File content as an inline string (small text files).
            file_path: Path to a file the server reads directly from disk.
            url: HTTP(S) URL the server fetches the file from.
            parent_folder_uri: Target folder URI (``/folders/folders/{id}``);
                get one from list_files or the Folders service.
            content_type: MIME type. Defaults to ``text/plain`` for ``content``,
                else guessed from ``file_name`` (``application/octet-stream``
                when unguessable).
find_folder tool
Look 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>``).
create_folder tool
Create a SAS Content folder, including any missing folders above it.

        Where it is created:

        * a path from the top, ``/Public/Content/Risk``, is created there;
        * ``My Folder/Risk`` is created in the user's own My Folder;
        * a relative path, ``Risk/2026``, is created under the deployment's
          default folder (``MCP_DEFAULT_FOLDER``). Without that setting a
          relative path is refused: ask the user for the full path.

        A folder that already exists is returned unchanged (``status``
        ``exists``), so calling twice is safe. The user's SAS Viya permissions
        decide where they may create folders; top-level folders such as
        Public are made by administrators. For SAS Content only: model projects
        live in model repositories (see ``create_model_project``).

        Args:
            path: The folder to create, as described above.

        Returns:
            The folder's ``id``, ``uri`` (what ``upload_file`` and the
            decisioning tools take), ``name`` and ``path``; ``status``
            ``created`` or ``exists``; and ``created``, the paths of the folders
            this call made.
save_castable tool
Save an in-memory CAS table to a file (or database table) in a caslib.

        A table loaded into CAS memory is lost when it is dropped or the CAS
        server restarts unless it is saved. This writes it to the caslib's
        data source, so ``promote_table_to_memory`` can load it again later.
        An existing file is not overwritten unless ``replace`` is true.

        Args:
            caslib_name: Caslib of the loaded table.
            table_name: The loaded table to save.
            server_id: CAS server (default ``cas-shared-default``).
            target_caslib: Caslib to write to (default: the table's own).
            target_name: Name of the saved file, without extension (default:
                the table's name).
            file_format: ``sashdat`` (default, fastest to load back), ``csv``,
                ``parquet`` or ``sas7bdat``.
            replace: Overwrite an existing file of that name (default false).
drop_castable tool
Drop a table from CAS memory, keeping its source file.

        Frees the memory a loaded table takes; ``promote_table_to_memory``
        loads it again from its source. Nothing on disk is deleted. A table
        with no source file in its caslib exists only in memory, so dropping
        it would lose its data: such a table is refused unless
        ``allow_unsaved`` is true. Save it first with ``save_castable``, or
        ask the user before dropping it. A table that is not loaded is left
        as it is.

        Args:
            caslib_name: Caslib of the table.
            table_name: The table to drop from memory.
            server_id: CAS server (default ``cas-shared-default``).
            allow_unsaved: Drop it even when no source file holds its data
                (default false). Only with the user's say-so.
download_file tool
Download file content from the Viya Files Service.

        Args:
            file_id: ID of the file to download.
create_business_ruleset tool
Create 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"}`` — dataType one of string,
                decimal, integer, date, datetime, dataGrid, boolean, any;
                direction one of input, output, inOut.
            description: Optional description.
            folder: Where to store the rule set: 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>``). Omit to use the default folder.
update_business_ruleset tool
Update 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 variables the rules operate on.
            description: Optional description.
            folder: Only used when the rule set is in no folder yet: a folder
                path, ``My Folder``, a folder ID or a folder URI to file it in.
get_business_ruleset tool
Fetch a single SAS Business Rules rule set by ID.

        Args:
            ruleset_id: The rule set UUID (not its name — list_business_rulesets returns both).
list_business_rulesets tool
List 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.
delete_business_ruleset tool
Permanently 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).
lock_business_ruleset_revision tool
Lock 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 set's full content
        from the body sent, so this fetches the rule set with its rules
        included (``application/vnd.sas.business.rule.set.integral+json``)
        and resends them — omitting them would wipe the live rule set's rules,
        not just the new revision.

        Args:
            ruleset_id: The rule set UUID (not its name — list_business_rulesets returns both).
            revision_type: "minor" for iterative changes, "major" for a
                significant/approved milestone (default "minor").
list_business_ruleset_revisions tool
List 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).
create_business_rule tool
Create 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 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),
                each ``{"type": "complex", "expression", "term": {"name",
                "dataType", "direction"}}``, or ``{"type": "lookup", "term":
                {...}, "lookup": "<lookup table name or ID>"}`` — true when the
                term's value is a key of the lookup table.
            actions: List of actions, each ``{"type": "assignment"|"return",
                "term": {"name", "dataType", "direction"}, "expression"}``, or
                ``{"type": "lookupValue", "term": {...}, "expression": "<key>",
                "lookup": "<lookup table name or ID>"}`` — assigns the value the
                lookup table stores for the key the expression evaluates to.

        A lookup named in a condition or action is resolved to its ID. Rules
        use the lookup table's active version. The result's ``problems`` lists
        any condition or action Viya stored as invalid.
update_business_rule tool
Update 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).
            actions: List of assignment/return/lookupValue actions to perform when matched.
get_business_rule tool
Fetch 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.
list_business_rules tool
List 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).
delete_business_rule tool
Permanently 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.
create_decision_flow tool
Create 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", "variable": "P_BAD1", "cases": [
                    {"label": "Low risk", "max": 0.1999, "steps": [
                        {"type": "assignment", "assignments": {"offer": "GOLD", "credit_limit": 10000}}]},
                    {"label": "Medium risk", "min": 0.2, "max": 0.4999, "steps": [
                        {"type": "rule_set", "id": "<rule set id>"}]}],
                 "default": [{"type": "assignment", "assignments": {"offer": "DECLINE"}}]},
                {"type": "condition", "expression": "offer = 'GOLD'",
                 "on_true": [{"type": "code_file", "id": "<code file id>"}], "on_false": []},
            ]

        Steps nest: a branch case, a branch default and either side of a
        condition hold steps of any kind, branches and conditions included.

        * **Assignment** — ``assignments`` maps a decision variable to a
          constant, written plainly (``"GOLD"``, ``10000``): the service quotes
          strings itself and evaluates nothing, so ``"a + b"`` is stored as
          that text. Compute values in a rule set or code file. The variable
          must be in ``signature``; ``name`` labels the step.
        * **Model** — ``id`` of a model in the model repository
          (``list_registered_models``, Tier 6). Its inputs map to same-named
          decision variables; its outputs (e.g. ``P_BAD1``, ``I_BAD``) are added
          as decision variables unless ``signature`` has them, a class label
          as a string. ``mappings`` renames: ``{"model variable": "decision variable"}``.
        * **Branch** — ``variable`` (on the branch, or per case) and ``cases``,
          checked in order; the first match runs, else ``default``. ``range``
          cases take ``min`` and/or ``max`` (leave one out for an open end) and
          compare inclusively, ``>= min`` and ``<= max``; cases must not share
          a value, so end the lower case just below the next (``max 0.1999``
          next to ``min 0.2``). ``equals`` cases take one ``value``; ``like``
          cases a ``pattern`` with ``%`` and ``_`` wildcards.
        * **Condition** — a DS2 ``expression`` over decision variables, e.g.
          ``score >= 630 and band = 'A'``; check it with
          validate_decision_expression first.
        * **Rule set, segmentation tree, code file, sub-decision** — ``id``,
          optional ``revision`` and ``mappings``. Segmentation trees, code
          files, value lists and custom functions are created with the Tier 10
          (Decisioning Advanced) tools; list_decisioning_assets finds existing ones.

        The decision is always stored in a SAS Content 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: Decision name (max 60 chars).
            signature: Flow-level input/output variables, each ``{"name",
                "direction", "dataType"}`` — direction input or output;
                dataType string, decimal, integer, date, datetime, boolean.
            steps: The flow, in order — any step kind (see above): ``rule_set``,
                ``segmentation_tree``, ``code_file``, ``decision`` (a sub-decision),
                ``model``, ``assignment``, ``condition`` or ``branch``. ``revision``
                defaults to the newest locked revision (one is locked if there is
                none); "working" uses the editable one. Mappings default to
                same-named decision variables; ``{"step term": "decision variable"}``
                renames. The result's ``steps_report`` lists the revisions used,
                the variables added and any step input nothing maps to.
            rule_set_steps: Ordered list of rule set steps to execute in
                sequence, each ``{"ruleSetId", "versionId", "mappings"}`` —
                versionId is a locked rule set revision (see
                ``lock_business_ruleset_revision``); mappings is a list of
                ``{"stepTermName", "direction", "targetDecisionTermName"}``
                connecting the rule set's terms to this decision's signature.
                A term produced as output by an earlier step can be consumed
                as input by a later step via a shared signature entry.
            description: Optional description.
            folder: Where to store the decision: 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>``). Omit to use the default folder.
            add_missing_variables: With ``steps``, add a decision variable for every
                step term none matches (default true): Intelligent Decisioning
                validates a step only when all its terms are mapped. The result's
                ``steps_report.variables_added`` lists them.
update_decision_flow tool
Update 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 whole flow, every step kind — assignments, models,
                branches, conditions, rule sets, trees, code files, sub-decisions;
                ``create_decision_flow`` describes each, with an example.
            rule_set_steps: Ordered list of rule set steps (see
                ``create_decision_flow`` for the shape).
            description: Optional description.
            folder: Only used when the decision is in no folder yet: a folder
                path, ``My Folder``, a folder ID or a folder URI to file it in.
            add_missing_variables: With ``steps``, add a decision variable for every
                step term none matches (default true; see ``create_decision_flow``).
get_decision_flow tool
Fetch the current state of a SAS Intelligent Decisioning flow.

        Args:
            decision_id: The decision flow UUID (not its name — list_decision_flows returns both).
list_decision_flows tool
List 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.
delete_decision_flow tool
Permanently delete a SAS Intelligent Decisioning flow.

        Args:
            decision_id: The decision flow UUID to delete (not its name — list_decision_flows returns both).
get_decision_flow_code tool
Retrieve the generated DS2 execution code for a decision flow.

        Args:
            decision_id: The decision flow UUID (not its name — list_decision_flows returns both).
lock_decision_flow_revision tool
Lock 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).
list_decision_flow_revisions tool
List 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).
get_decision_flow_revision tool
Fetch 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.
publish_decision_flow tool
Publish 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 the real ``moduleId`` alongside the
        publish record, so the result is directly usable with
        ``get_mas_module_step_signature``/``score_data`` without a separate
        lookup via ``list_mas_modules``.

        The code is generated for MAS, as SAS Intelligent Decisioning does when
        it publishes, so lookup tables are read from MAS. Unlike a module the
        Intelligent Decisioning UI publishes, whose inputs end in an underscore
        (``credit_score_``), the module's inputs keep the decision's variable
        names.

        Args:
            decision_id: The decision flow UUID (not its name — list_decision_flows returns both).
            revision_id: The locked revision UUID (see
                ``lock_decision_flow_revision``).
            publish_name: The published name shown in Model Publish (not the
                MAS module ID — see above).
            destination_name: A Micro Analytic Score publishing destination.
                Default: the deployment's ``MCP_DEFAULT_PUBLISH_DESTINATION``,
                ``maslocal`` unless an administrator changed it. The code is
                generated for MAS, so the destination must be a MAS one.
            poll_timeout: Max seconds to wait for the publish job to reach a
                terminal state before giving up (default 60.0).
validate_decision_expression tool
Check 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"}]``.
create_segmentation_tree tool
Create 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", "assign": {"band": "LOW"}},
                        {"name": "high_risk", "assign": {"band": "HIGH"}}]

        An outcome assigns with ``assign`` (variable to value) or runs DS2
        statements with ``code``. To build a large tree from a strategy table,
        use ``create_segmentation_tree_from_table``.

        Args:
            name: Tree name.
            signature: Every variable the tree tests or assigns, each
                ``{"name", "dataType", "direction"}`` — dataType string,
                decimal, integer, date, datetime or boolean; direction input,
                output or inOut. Add ``valueListId`` / ``valueListContentId``
                to tie a variable to a value list.
            node: The root node.
            outcomes: The outcomes the value nodes lead to.
            description: Optional description.
            boolean_expressions: Named DS2 conditions, ``{"name", "expression"}``,
                for nodes of type booleanExpression (value nodes "true" / "false").
            matrices: Matrix definitions, for nodes of type matrix.
            code_files: Internal code files ``{"name", "type": "internal", "code"}``.
            folder: Where to store the tree: a folder path, ``My Folder``, a
                folder ID or URI. Omit to use the default folder; if there is
                none, ask the user.
update_segmentation_tree tool
Change 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.
            folder: Only used for a tree that is in no folder yet.
create_segmentation_tree_from_table tool
Build 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 (missing values
        included). With ``split="exact"`` each distinct value is its own branch.

        The table comes from exactly one of ``rows`` (inline, small tables),
        ``file_path`` (a CSV the server reads, gated by
        ``ALLOW_LOCAL_FILE_UPLOAD``) or ``caslib_name`` + ``table_name`` (a CAS
        table — load an Excel sheet with upload_data first). Repeated column
        names in a CSV get ``_2``, ``_3``.

        The result reports what was built — leaves, split nodes, outcomes, and
        rows whose path is identical but whose outcome differs (``conflicts``)
        — not the tree itself, which can be hundreds of kilobytes.

        Args:
            name: Tree name.
            key_columns: Decision key columns in strategy order. A column name,
                or ``{"column": ..., "variable": ...}`` to name the tree
                variable; two columns may test the same variable (a key that
                appears twice in the strategy).
            outcome_columns: Columns the leaves assign, e.g. ["Scenario ID", "Scenario Group"].
            rows: Inline rows, each an object of column to value.
            file_path: A CSV file the server reads.
            caslib_name: Caslib of a CAS table to read.
            table_name: The CAS table.
            server_id: CAS server (default cas-shared-default).
            split: "lower_bound" (range lower bounds) or "exact" (values).
            outcome_prefix: Prefix of outcome names (default: the first outcome column).
            row_label_column: Column that identifies a row in the report, e.g. the branch number.
            outcome_types: Data type per outcome column, overriding the one
                inferred from the values: ``{"Scenario Group": "string"}``.
                Types must match the decision variables the tree is mapped to.
            create_value_lists: Also create a value list per tested variable,
                holding the conditions its nodes use, and tie the variable to it.
            description: Optional description.
            folder: Where to store the tree (and value lists): a folder path,
                ``My Folder``, a folder ID or URI. Omit to use the default
                folder; if there is none, ask the user.
create_code_file tool
Create 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 the
        ``dataType`` of every input and output, or they stay unknown; for DS2
        it adds descriptions and lengths. The result's ``status`` and
        ``errorMessage`` say whether the code parsed.

        Args:
            name: Code file name.
            code_type: ds2, python or sql.
            code: The code.
            description: Optional description.
            signature: Optional ``[{"name", "dataType", "direction", "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.
update_code_file tool
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.

        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.
create_value_list tool
Create 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.
update_value_list_entries tool
Replace 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.
create_custom_function tool
Create 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.
update_custom_function tool
Change 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).
validate_custom_function tool
Compile 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.
list_decisioning_assets tool
List 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.
get_decisioning_asset tool
Fetch 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,
                value_list, lookup_table, custom_function or function_category.
            asset_id: The ID (not the name — list_decisioning_assets returns
                both); a lookup table may also be given by its exact name.
            revision_id: A revision to read instead of the current state (for a
                lookup table: a version ID or label).
            summary_only: Return the summary rather than the full content.
get_decisioning_asset_code tool
The 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.
list_decisioning_asset_revisions tool
List 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).
lock_decisioning_asset_revision tool
Freeze 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.
copy_decisioning_asset tool
Copy 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, or a
                folder URI. Omit to use the default folder; if there is none,
                ask the user.
            revision_id: Copy this revision instead of the current state.
delete_decisioning_asset tool
Permanently 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.
get_lookup_table tool
Read 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.
            start: Index of the first entry to return (for paging).
            limit: Maximum entries to return (default 200); ``next_start``
                is set when there are more.
create_lookup_table tool
Create 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; numbers are
        stored as text. Keys must be unique and values not empty — an empty
        value behaves like a missing key.

        Args:
            name: Lookup table name.
            entries: ``{"Iran": "High", "Cuba": "High"}``, or a list of
                ``{"key", "value"}`` objects or ``[key, value]`` pairs.
            description: Optional description.
            key_label: Optional name of the key column, e.g. "Country".
            value_label: Optional name of the value column, e.g. "Risk level".
            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.
            activate: Publish the first version right away (default false).
            wait_seconds: How long to wait for activation to finish (max 300).
update_lookup_table tool
Change 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_table: The lookup table's ID or exact name.
            set_entries: Entries to add or overwrite: ``{"key": "value"}`` or a
                list of ``{"key", "value"}`` objects.
            remove_keys: Keys to delete.
            replace_entries: The complete new entries (not with set_entries or remove_keys).
            name: New name.
            description: New description.
            key_label: New name of the key column.
            value_label: New name of the value column.
            activate: Publish the changed version right away (default false).
            wait_seconds: How long to wait for activation to finish (max 300).
            folder: Only used for a lookup table that is in no folder yet.
activate_lookup_table tool
Make 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: "newest" (default), or a version's ID or label. An earlier
                version (a rollback) or one whose activation failed is
                activated as a new version with its entries.
            wait_seconds: How long to wait for publishing to finish (max 300).
            republish: Copy the active version to MAS and CAS again instead of activating one.
catalog_search tool
Search 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``).

        The ``query`` uses the SAS catalog search grammar:
          * Free text matches names, with wildcards ``*`` (0+ chars) and ``?`` (1 char): ``cust*``.
          * Facets constrain fields, e.g. ``AssetType:Report``, ``Name:sales``,
            ``Library.name:PUBLIC``, ``Column.informationPrivacy:Sensitive``.
          * Ranges ``DateModified:[2024-01-01 TO 2024-12-31]`` and ``+`` to require a term.
            Combine freely: ``AssetType:"CAS Table" +Name:cust*``.
        Use ``catalog_search_helper`` to discover valid facet names and values.

        Args:
            query: The catalog search query (see grammar above). Use ``*`` to match all names.
            indices: Comma-separated index name(s) to search (default 'catalog').
            limit: Maximum hits to return (default 20).
            start: Offset of the first hit (default 0).
catalog_search_helper tool
Discover 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 names; when
                listing values, matches value prefixes.
            limit: Maximum entries to return (default 50).
catalog_find_instance tool
Resolve 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``, ``nlpTags``,
        ``mostImportantFields``) before calling ``catalog_download_table_profile``.

        Args:
            resource_uri: Source URI of the asset (e.g.
                '/dataTables/dataSources/cas~fs~.../tables/MYTABLE').
catalog_list_agents tool
List 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_agent tool
Start 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_get_agent_history tool
Get 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_run_adhoc_analysis tool
Submit 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 most useful for). Leave them on unless you
        only need a plain column profile and want the job to finish faster.

        Args:
            resource_uri: Source URI of the table to analyze (the ``resource_uri`` from
                a catalog_search hit, e.g. '/dataTables/dataSources/cas~fs~.../tables/MYTABLE').
            name: A name for the analysis job.
            resource_type: Catalog entity type of the resource. Defaults to
                'CASMEMTable' when the URI is a CAS table (contains 'cas~fs~');
                pass it explicitly for other asset types.
            description: Optional description for the job.
            provider: Job provider (default 'TABLE-BOT').
            identify_language: Detect each text column's language (default True).
            analyze_sentiment: Score sentiment on text columns (default True).
            get_nlp_semantic_id: Derive semantic types / privacy classification
                (informationPrivacy, nlpTerms, nlpTags) (default True).
catalog_get_adhoc_analysis tool
Get 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 until ``profile_ready`` is true, then download.

        Args:
            job_id: The analysis job id returned by catalog_run_adhoc_analysis.
catalog_download_table_profile tool
Download 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_find_instance`` does. ``instance_id`` takes precedence if both are given.

        Args:
            instance_id: Catalog instance id of the table (the ``id`` from a catalog_search hit).
            resource_uri: Source URI of the table (the ``resource_uri`` from a search hit,
                e.g. '/dataTables/dataSources/cas~fs~.../tables/MYTABLE'). Used when
                ``instance_id`` is omitted.
            level: Detail level — 'dataDictionaryAndProfile' (default; columns + profile),
                'detailedMetrics' (full per-column metrics), or 'dataDictionary'
                (column metadata only).
list_compute_libraries tool
List 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_tables tool
List 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_compute_columns tool
List 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_cas_servers tool
List available CAS servers on the Viya environment.
list_caslibs tool
List 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_castables tool
List 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_source_tables tool
List 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).
get_castable_info tool
Get 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_castable_columns tool
Get 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_data tool
Fetch 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_compute_table_data tool
Fetch 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 ``execute_sas_code`` calls are visible.

        Args:
            compute_context_name: Name of the compute context (see list_compute_contexts).
            library_name: The libref, e.g. ``WORK`` or ``SASHELP``.
            table_name: The table within the library.
            limit: Maximum rows to return (default 100).
            start: Row offset for paging (default 0).

        Returns:
            ``{columns, rows, count, start, limit, truncated, column_types}`` —
            ``rows`` are dicts keyed by column name, ``count`` is the table's
            total row count as the service reports it, and ``truncated`` is
            true when rows exist beyond this page.
query_data tool
Run 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 ``caslib.table``
          (e.g. ``Public.HMEQ``); see list_caslibs / list_castables.
        * ``target='compute'`` — qualify as ``libref.table`` (e.g. ``WORK.SALES``);
          see list_compute_libraries / list_compute_tables. **Concatenated
          librefs — several directories under one name, which is what SASHELP
          and MAPS are — are invisible to FedSQL**, because its BASE driver maps
          one schema to one directory. Copy such a table into WORK first
          (``data work.cars; set sashelp.cars; run;``) and query ``WORK.CARS``.

        **Dialect notes** (FedSQL, not PROC SQL): joins (inner/left/right/full/
        cross), subqueries, UNION, GROUP BY/HAVING/ORDER BY, and scalar functions
        work. There is **no WITH/CTE** — use a derived table ``(select ...) "t"``
        — and **no MERGE**; express a merge as a join (a full join with COALESCE
        gives upsert semantics). Double-quote identifiers that are reserved words
        or contain spaces; SAS name literals (``'x'n``) are not FedSQL.

        Row capping is done by this tool, not by your SQL: any LIMIT you write is
        ignored in favour of ``limit`` (a malformed LIMIT is silently discarded by
        CAS and would return the whole table). Add ORDER BY for stable paging.

        Args:
            query: A single FedSQL SELECT statement. DDL/DML is refused — this
                tool only reads rows.
            target: Which tier the identifiers refer to — ``cas`` (default) or
                ``compute``.
            limit: Maximum rows to return, 1..10000 (default 100).
            start: Row offset for paging (default 0).
            create_view_name: If set, the result includes ``create_view_sql`` —
                the ``CREATE VIEW <name> AS <query>`` text for this query. It is
                returned for you to run yourself, never executed here.
            compute_context_name: Compute context to run in; defaults to the
                server's configured execution context.

        Returns:
            ``{columns, rows, count, start, limit, truncated, column_types}`` on
            success — ``rows`` are dicts keyed by column name, with dates
            rendered as ISO text and missing values as null. ``truncated`` is
            true when more rows exist beyond this page. On failure, a status dict
            (``invalid_query``, ``table_not_found``, ``column_not_found``,
            ``schema_not_found``, ``ambiguous_column``, ``syntax_error``,
            ``query_failed``) whose ``message`` names the fix.
list_glossary_term_types tool
List 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 term types to return (default 50).
            start: Offset of the first term type (default 0).
get_glossary_term_type tool
Get 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.
create_glossary_term_type tool
Create 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``, ``date-time``, ``time``

        The attribute identifiers the API demands are generated here, since it
        will not mint them itself and rejects the omission with a message that
        names neither the attribute nor the real problem.

        Args:
            name: Term type name, unique across the deployment.
            label: Display name. Defaults to *name* — the API leaves it empty
                rather than defaulting it, which shows as a blank in the UI.
            description: What terms of this type are for.
            attributes: The attribute definitions, e.g.
                ``[{"label": "Scope", "type": "single-select",
                "allowed_values": ["Local", "Group"], "required": true}]``.
            allow_custom_attributes: Let individual terms add attributes beyond
                these (default false).
update_glossary_term_type tool
Change 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 stays behind under the old one, no
        longer readable as that attribute. ``get_glossary_term_type`` returns
        the id of each.

        Making an attribute ``required`` applies to terms created *afterwards*
        and to every later edit of the ones already there: an update rewrites
        the whole term, so older terms must be given a value for it before they
        can be saved again. ``update_glossary_term`` reports that by name.

        Args:
            term_type_id: The term type UUID, or its name.
            name: New name.
            label: New display name.
            description: New description.
            attributes: Attributes to add or change, same shape as
                ``create_glossary_term_type``, plus an optional
                ``attribute_id`` naming which existing attribute the spec is —
                required to rename one. Omitted attributes survive.
            remove_attributes: Labels to drop from the type. Terms keep the
                stored value, but under an identifier nothing names any more, so
                it stops being readable as that attribute.
            allow_custom_attributes: Whether terms may add their own.
delete_glossary_term_type tool
Delete 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).
search_glossary_terms tool
Free-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 term is actually in
        use before spending a call on ``list_term_assets``. A term with a count
        of 0 exists in the dictionary and is attached to no data.

        Args:
            query: Search text. ``*`` matches every term.
            limit: Maximum hits to return (default 20).
            start: Offset of the first hit (default 0).
            include_attributes: Also return each hit's custom attributes, named
                (default false). The search index does not carry them, so this
                costs one extra batched call per 40 hits; leave it off when the
                names and definitions are all you need.
list_glossary_terms tool
List 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 unpublished drafts (default false — published only).
            limit: Maximum terms to return (default 20).
            start: Offset of the first term (default 0).
            include_attributes: Also return each term's custom attributes,
                named (default false). Free — the listing already carries them.
            attribute_filter: Keep only terms whose attributes match, e.g.
                ``{"Needs masking": true}`` or ``{"Regions": "EMEA"}``. Clauses
                are ANDed; a multi-select matches when it *contains* the value.
                **The glossary cannot filter on attributes server-side**, so
                this is applied here over pages fetched for the purpose: the
                result reports how many terms were scanned and whether the scan
                reached the end. Narrow it with ``term_type`` or ``parent_id``
                where you can.
get_glossary_term tool
Get 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`` — the *other* id this term has, the
        one asset relationships point at.

        Args:
            term_id: The glossary term UUID (not the catalog entity id —
                search_glossary_terms returns both).
list_term_assets tool
List 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 tables without resolving columns.

        Args:
            term_id: The glossary term UUID.
            term_name: Exact term name, if the id is not known. One of the two is
                required.
            limit: Maximum assets to return in one call (default 100, ceiling
                500 — the catalog's page size).
            start: Offset of the first asset returned (default 0). ``count`` in
                the result is the term's **total** asset count, so to read every
                asset of a heavily used term, call again with
                ``start`` = ``next_start`` until ``truncated`` is false.
list_table_terms tool
List 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, if the URI is not known. Rejected as ambiguous
                when more than one table matches.
            max_columns: Maximum columns to inspect (default 200).
            assigned_only: Return only columns that carry a term (default true).
                Set false to see the unassigned columns too.
create_glossary_term tool
Create 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-04T13:41:24Z"``; a bare date or a numeric
          offset is normalised to UTC rather than rejected
        * **time** — ``"15:41:28Z"``; seconds and the ``Z`` are required, and a
          numeric offset is converted to UTC rather than dropped

        Values are validated before the call, so a mistake comes back naming the
        attribute and what it expected, instead of as an opaque HTTP 400.

        **Terms are published by default.** The underlying API defaults to
        creating a *draft*, which nobody but its author can see; that is almost
        never what a caller asking to "create a term" means, so this publishes
        unless ``publish`` is set false. A draft is promoted afterwards with
        ``update_glossary_term(publish=true)``, and is visible to
        ``list_glossary_terms`` only under ``include_drafts``.

        A term's name must be unique among its siblings (case-insensitively) and
        differ from its parent's; a clash is rejected, not merged.

        Args:
            name: Term name, max 100 characters, no backslashes.
            term_type: The term type — its UUID or its name. Immutable afterwards.
            definition: What the term means. The field users read; worth filling in.
            description: Short overview, max 1000 characters.
            label: Display name, if it should differ from ``name``.
            parent_id: Parent term id, to nest this term in the hierarchy.
            attributes: Custom attributes keyed by label, e.g.
                ``{"Scope": "Group", "Used in Risk": True,
                "Regions": ["EMEA", "APAC"]}``.
            publish: Publish immediately (default true). False leaves a draft,
                which ``update_glossary_term(publish=true)`` promotes later.
update_glossary_term tool
Update 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 attribute the type marks
        **required** must hold a value — including ones made required after this
        term was created. That is checked before the call, and reported by name.

        A term's **type** cannot be changed after creation. Its **parent** can:
        pass ``parent_id`` to move it, or ``""`` to make it a root term.

        **A draft is a different resource.** A term left unpublished by
        ``create_glossary_term(publish=false)`` can be read and deleted at the
        ordinary path, but not written there — the service answers a plain
        ``PUT`` on a draft with a 404. This routes the write to the draft
        instead, so editing one works; and ``publish`` then promotes it to a
        published term, which nothing else here could do. Publishing a term that
        is already published is reported, not attempted: there is no draft to
        promote and the service answers that with a 404 too.

        Args:
            term_id: The glossary term UUID.
            name: New name (unique among siblings, max 100 characters).
            definition: New definition.
            description: New description, max 1000 characters.
            label: New display label.
            parent_id: Move the term under a different parent, or ``""`` to make
                it a root term. A term cannot be its own ancestor.
            attributes: Custom attributes to change, keyed by label. Same value
                forms as create_glossary_term — booleans as True/False,
                multi-select as a list.
            publish: Publish the term if it is still a draft (default false).
                Pass it on its own to publish without changing anything else.
import_glossary_terms tool
Create 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 order; they
        are sorted so every parent is created before its children.

        Attribute values take the same forms as ``create_glossary_term`` —
        ``True``/``False`` for a boolean, a list for a multi-select — and are
        validated here, per term type, before anything is sent. So are the term
        type's **required** attributes: a row missing one fails inside the job
        with a message naming only the field, so the batch is refused here
        instead, before any of it is committed.

        **The import runs as a job and reports rows individually.** A row can
        fail while the rest succeed, so the result carries ``created``,
        ``failed`` and a ``failures`` list naming each bad row and why. Treat a
        non-empty ``failures`` as a partial import: the successful rows are
        already committed.

        **The result names the term each row became.** ``terms`` carries
        ``{name, path, term_id, existed}`` per row, so the next step — assigning
        an asset, re-parenting, reading one back — needs no lookup. This costs
        one filtered request per 40 distinct names, not one per term.

        Two things the import does that a per-term create does not:

        * **A row is written whole.** With ``update_existing`` the term at that
          path is *replaced*, so an attribute the row omits is reset — not left
          as it was. Without it the existing term is left alone. Either way the
          job counts the row as successful, so ``created`` counts rows the job
          accepted; **``new`` is the count of terms that did not exist before**,
          with ``already_existed`` the rest and ``existed`` saying which is
          which per row.
        * **Omitted attributes take the term type's default**, on new rows as
          well as replaced ones — the same as creating a term through the API.

        Args:
            terms: The rows to create. Each is
                ``{"name": ..., "parent": ..., "definition": ...,
                "description": ..., "attributes": {...}}``; ``term_type`` may be
                given per row to mix types in one batch.
            term_type: The term type for rows that do not name one.
            update_existing: Replace a term that already exists at the same path
                (default false, which leaves it untouched).
            timeout_seconds: How long to wait for the import job (default 600).
            dry_run: Validate and show what *would* be imported without
                importing anything: the rows in the order they would be sent,
                each with its resolved parent path and encoded attributes.
                Use it to let the person confirm a batch first — in a client
                that renders interactive views the preview appears as a table
                with an Import button; elsewhere, call again with
                ``dry_run=false`` once they agree.
delete_glossary_term tool
Permanently 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: The glossary term UUID.
assign_glossary_term tool
Assign 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 URI (preferred).
            table_name: Table name, if the URI is not known.
unassign_glossary_term tool
Remove 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.
submit_batch_job tool
Submit 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.
get_job_status tool
Check the status of a submitted job.

        Args:
            job_id: ID of the job.
list_jobs tool
List recent jobs from the Job Execution service.

        Args:
            limit: Maximum jobs to return (default 20).
cancel_job tool
Cancel a running job.

        Args:
            job_id: ID of the job to cancel.
get_job_log tool
Retrieve the log of a completed job.

        Args:
            job_id: ID of the job.
list_model_repositories tool
List the SAS Model Manager repositories (where model projects live).

        ``default`` marks the one new projects and registrations use when a call
        names none (the deployment's ``MCP_DEFAULT_MODEL_REPOSITORY``).
list_model_projects tool
List SAS Model Manager projects, most recently changed first.

        Args:
            repository: Only this repository (name or ID); all when omitted.
            name_filter: Only projects whose name contains this text.
            limit: Maximum projects (default 50).
create_model_project tool
Create a SAS Model Manager project to hold models.

        Projects live in a model repository, not in SAS Content. A project of
        that name already in the repository is returned instead of a second one
        (``status`` ``exists``). ``register_model`` also creates the project
        it names when it does not exist, so this is needed only to prepare one.

        Args:
            name: The project's name.
            repository: Repository name or ID (default: the deployment's
                ``MCP_DEFAULT_MODEL_REPOSITORY``, ``Public`` unless changed; see
                ``list_model_repositories``).
            folder: A folder inside the repository to put the project in,
                created when missing. One folder name, not a path.
            function: ``classification`` (default), ``prediction`` or another
                Model Manager function.
            target_variable: The target the project's models predict.
            target_level: ``binary``, ``nominal`` or ``interval``.
            target_event: The event value, for a binary or nominal target.
            description: Optional description.
set_project_champion tool
Make a model its project's champion, preparing the project as Model Manager's UI does.

        The champion is the model a project publishes and monitors. Model
        Manager refuses a champion until the project has its target fields
        and its variables, which PROC REGISTERMODEL does not set, so this
        first copies the model's target, event and event probability variable
        to the project where they are missing, and adds the model's input and
        output variables the project lacks. Fields already set are kept.

        Args:
            project_id: The project's ID.
            model_id: A model in that project.
describe_analytic_store tool
Describe an analytic store (a model saved in CAS): its inputs, outputs and algorithm.

        Runs PROC ASTORE DESCRIBE. Use it before ``register_model`` to see
        which variables the model expects and produces, and so which target
        and event to register it with.

        Args:
            caslib_name: Caslib of the analytic store table.
            table_name: The analytic store table (for example one written by
                a ``savestate rstore=`` statement).
register_model tool
Register a SAS model in SAS Model Manager with PROC REGISTERMODEL.

        Takes either an analytic store in CAS (``astore_caslib`` +
        ``astore_table``, as written by ``savestate rstore=``) or DATA step
        score code (``score_code``). Not Python or DS2 models. The procedure
        stores the model's variables, properties and score code, and with
        ``assessment`` its fit statistics, ROC and lift. It runs in a compute
        session of its own and takes 5–30 seconds.

        The project is ``project_id``, or the project named ``project`` in the
        repository (created there when missing, in ``project_folder``).

        A model with the same name already in the project is **refused**
        unless ``replace`` is true. Replacing deletes that model and creates
        one with a new ID, which loses its score tests, publish history and
        monitoring: ask the user before passing ``replace``.

        Args:
            name: The model's name in the project.
            project: Project name (found or created in ``repository``).
            project_id: An existing project's ID, instead of ``project``.
            repository: Repository name (default: the deployment's
                ``MCP_DEFAULT_MODEL_REPOSITORY``, ``Public`` unless changed).
            project_folder: Folder in the repository for a new project; one
                folder name, not a path.
            astore_caslib: Caslib of the analytic store table.
            astore_table: The analytic store table.
            score_code: DATA step score code, instead of an analytic store.
            data_caslib: Caslib of the training or validation table.
            data_table: The table the model was trained on. It defines the
                input variables of DATA step code and is needed for assessment.
            target_variable: The target variable.
            target_level: ``binary``, ``nominal`` or ``interval``.
            target_event: The event value of a binary or nominal target, such as ``1``.
            algorithm: The algorithm, as a keyword: TREE, FOREST, GRADBOOST,
                LOGISTIC, REGRESSION, NEURAL, SVM, ...
            function: CLASSIFICATION or PREDICTION, as a keyword.
            description: Optional description.
            modeler: Optional name of who built the model.
            assessment: Compute fit statistics, ROC and lift (default: when a
                data table and a target are given).
            replace: Replace a model of the same name (see above).
publish_model tool
Publish a registered model to a destination: MAS, CAS, a container registry, Git, ...

        Any model in the Model Repository can be published, whatever made it.
        With ``dry_run`` the tool only reports what it would do: the
        destination and its type, the published name, and whether a published
        model of that name is already there. A published model of the same
        name is not replaced unless ``replace`` is true. Publishing runs in the
        background; ``list_published_models`` shows its state and
        ``validate_published_model`` checks the published copy.

        Args:
            model_id: The model's ID.
            destination_name: Destination (see ``list_publishing_destinations``).
                Default: the deployment's ``MCP_DEFAULT_PUBLISH_DESTINATION``,
                ``maslocal`` unless an administrator changed it.
            publish_name: The published name (default: the model's name, with
                characters a destination refuses turned into underscores).
            replace: Replace a published model of the same name.
            dry_run: Only report what would happen.
            git_remote_path: For a Git destination: the directory in the
                repository to publish to.
validate_published_model tool
Check a published model by scoring a few rows with the published copy.

        Model Manager's publish validation: the first ``rows`` rows of the
        table are scored in the destination itself (MAS, CAS, ...), and the
        scored rows come back. Compare them with ``test_score_model`` on the
        registered model to confirm the copy behaves the same. Name the copy
        by ``published_model_id`` (see ``list_published_models``), or by
        ``model_id`` and ``destination_name``.

        Args:
            caslib_name: Caslib of the input table.
            table_name: A loaded CAS table holding the model's inputs.
            published_model_id: The published copy's ID.
            model_id: The registered model, instead of published_model_id.
            destination_name: With model_id (default: the deployment's
                ``MCP_DEFAULT_PUBLISH_DESTINATION``).
            rows: How many rows to score (default 10, at most 100).
            timeout_seconds: How long to wait (default 180).
create_performance_definition tool
Define how a project's models are monitored over time (a performance definition).

        The data comes as one CAS table per period in ``data_caslib``, named
        ``<data_prefix>_<n>_<label>``: ``CREDIT_1_Q1``, ``CREDIT_2_Q2``, ... Each
        holds the model's inputs and the actual target. With ``score_data``
        (the default) Model Manager scores them itself; otherwise they must
        already hold the model's outputs. Results go to the
        ``ModelPerformanceData`` caslib, and ``run_performance_definition``
        computes them.

        The project needs its target fields and a champion first:
        ``set_project_champion`` sets both. A project has one performance
        definition: when it has one already, that one is returned, and
        ``replace`` changes it to these settings instead (it keeps its ID).

        Args:
            project_id: The project.
            data_caslib: Caslib of the period tables.
            data_prefix: Their common prefix.
            model_ids: Models to monitor (default: the project's champion).
            name: Definition name (default: "<project> performance").
            input_variables: Inputs to check for drift (default: the first
                model's inputs).
            output_variables: Outputs to assess (default: the event
                probability variable, else the model's outputs).
            score_data: Score the period tables first (default true).
            monitor_champion: Also follow whichever model is champion later.
            monitor_challengers: Also monitor the project's challengers.
            max_bins: Bins for the drift statistics (default 10).
            replace: Change the project's existing definition to these settings.
run_performance_definition tool
Run a performance definition: score and assess each period table, then calculate the KPIs.

        Name the definition, or the project when it has just one. The run
        goes on in the background. With ``wait_seconds`` the tool waits up to
        that long (at most 600); when the run has finished it has Model
        Manager calculate the project's KPIs, as Model Manager's own
        monitoring workflow does, and reports the KPI alert rules the
        champion breaks. Otherwise call again with ``wait_seconds``, or read
        ``get_project_kpis`` later. Runs over two small periods took from
        half a minute to two minutes on SAS Viya 2026.10.

        Args:
            performance_definition_id: From ``create_performance_definition``.
            project_id: The project instead, when it has one definition.
            wait_seconds: How long to wait for the run (default 0).
get_project_kpis tool
Read how a project's models are monitored: KPIs, KPI alert rules, alerts and performance definitions.

        ``kpis`` are the latest values from the performance runs, each with a
        ``name`` (``_AUC_``, ``_MISC_``, ``_F1_``, ``_ASE_``, ...; ``devIndex``
        once per variable for drift), a ``value`` and a ``kpiCategory``.
        ``alert_rules`` are the project's KPI alert rules
        (``set_kpi_alert_rule``), and ``alerts`` checks the champion — or
        ``model_id`` — against each: ``breached`` is Model Manager's own
        verdict on the latest KPI. ``performance_definitions`` are what
        ``run_performance_definition`` runs.

        Args:
            project_id: The project.
            model_id: Check this model against the rules instead of the champion.
            limit: Maximum KPIs (default 100).
set_kpi_alert_rule tool
Set a KPI alert rule on a model project: alert when a monitoring KPI crosses a threshold.

        Model Manager checks the project's models against its rules whenever
        their KPIs are calculated (``run_performance_definition``) and lists
        them as the project's KPI rules. ``kpi`` is one of:

        - accuracy: ``AUC``, ``misclassification``, ``TPR``, ``FPR``, ``F1``,
          ``ASE``, ``RASE``, ``R-squared``, ``global accuracy``, cumulative
          lift ``_Cumlift5_`` to ``_Cumlift30_``, or the KPI names
          ``get_project_kpis`` lists;
        - drift: ``devIndex`` (the deviation index) of each variable in
          ``variables``, input or output — one rule per variable;
        - fairness: ``EqualOpportunity``, ``DemographicParity``,
          ``PredictiveParity``, ``EqualAccuracy`` or ``EqualizedOdds`` for the
          sensitive variable in ``variables``.

        ``operator`` is ``greaterThan`` (alert above the threshold, as for
        misclassification or drift) or ``lessThan`` (alert below it, as for
        AUC). A rule for the same KPI, variable and direction is updated, not
        duplicated; ``alert_rule_id`` updates a given rule, its direction too.
        The result says whether the champion breaks the rule now.

        Args:
            project_id: The project.
            kpi: The KPI to watch.
            operator: ``greaterThan`` or ``lessThan``.
            threshold: The value the KPI should not cross.
            variables: The variables of a drift or fairness KPI.
            severity: ``low``, ``medium`` (default) or ``high``: Model
                Manager's priority.
            occurrences: Alert after this many occurrences (default 1).
            name: The rule's name (default as Model Manager names it,
                "AUC Less than 0.9"); ``{variable}`` is replaced by each variable.
            alert_rule_id: A rule to update instead.
delete_kpi_alert_rule tool
Delete one of a project's KPI alert rules (``get_project_kpis`` lists them).

        Args:
            project_id: The project.
            alert_rule_id: The rule.
list_registered_models tool
List models in the Model Repository.

        Args:
            limit: Maximum models to return (default 50).
list_publishing_destinations tool
List 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_mas_modules tool
List published scoring models and decisions (MAS modules).

        Args:
            limit: Maximum modules to return (default 50).
get_mas_module_step_signature tool
Fetch 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").
score_data tool
Score 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.
get_model tool
Describe a registered model: project, version, target, variables and files.

        Use it before scoring, publishing or monitoring a model, to see its
        input variables (what a scoring table must hold), its target and event
        probability variable, and whether it is the project's champion
        (``role``).

        Args:
            model_id: The model's ID (see ``list_registered_models``).
list_model_versions tool
List a registered model's versions, the current one first.

        Args:
            model_id: The model's ID (see ``list_registered_models``).
test_score_model tool
Score a few rows with a registered model and return the scored rows.

        Model Manager's own score test: it takes the first ``rows`` rows of
        the table, scores them with the model in the "SAS Model Manager
        compute context", waits, and returns them with the model's output
        columns (for example ``P_BAD1`` and ``I_BAD``). Use it to check that a
        model runs before publishing or monitoring it. Nothing is left behind:
        the scratch tables and the score definition are removed. It takes
        about 15 seconds plus a compute session start.

        The table needs the model's input variables (``get_model`` lists
        them). For a whole table use ``score_table``.

        Args:
            model_id: The model's ID.
            caslib_name: Caslib of the input table.
            table_name: A loaded CAS table holding the model's inputs.
            rows: How many rows to score (default 10, at most 100).
            timeout_seconds: How long to wait for the score test (default 180).
score_table tool
Score a whole CAS table with a registered model; the result is a new CAS table.

        Runs the model straight from the Model Repository, so it need not be
        published first. Scoring runs in the background: this returns the
        score execution at once, and ``get_score_execution`` reports when it
        has finished and where the scored table is. The score definition
        stays in the model's project, as one made in Model Manager would.

        Args:
            model_id: The model's ID.
            caslib_name: Caslib of the input table.
            table_name: A CAS table holding the model's input variables.
            output_caslib: Caslib for the scored table (default: the input's).
            output_table: Name of the scored table (default:
                ``<table_name>_SCORED``).
get_score_execution tool
Report a score execution: its state, its output table, and why it failed if it did.

        Args:
            execution_id: From ``score_table`` (or ``test_score_model`` when it
                ran out of time).
            rows: When it has completed, also return this many scored rows
                (default 0, at most 100).
list_published_models tool
List models published to destinations (MAS, CAS, containers, Git, ...).

        Each entry names its destination, its published name, its state and
        the registered model it came from (``modelId``). Use it to find the
        published copy that ``validate_published_model`` checks, or to see
        where a model is already deployed.

        Args:
            destination_name: Only this destination (see
                ``list_publishing_destinations``).
            name_filter: Only published names containing this text.
            limit: Maximum entries (default 50).
list_reports tool
List Visual Analytics reports.

        Args:
            limit: Maximum reports to return (default 50).
            filter_name: Optional name filter (substring match).
get_report tool
Get a Visual Analytics report's metadata and definition.

        Args:
            report_id: ID of the report.
export_report tool
Export 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. ``"1200px,800px"``.
          * ``csv`` / ``tsv`` / ``xlsx`` — the data behind a single report
            object; exactly one object label is required.
          * ``summary`` — the report's text summary.

        Args:
            report_id: ID of the report.
            export_format: One of package, pdf, png, svg, csv, tsv, xlsx, summary.
            report_objects: Report object labels to export. ``package``/``pdf``
                accept several; image and data formats accept exactly one;
                ``summary`` accepts none. Omit to export the whole report where
                the format allows it.
            image_size: Required for ``png``/``svg``; format ``"<w>px,<h>px"``.
            options: Optional ``pdf`` rendering overrides, passed through as query
                parameters (e.g. ``{"orientation": "landscape"}``).

        Returns text inline for text formats, image content for ``png``, and an
        embedded binary file (carrying the right MIME type) for ``package`` /
        ``pdf`` / ``xlsx``. Binary results larger than ``MAX_EXPORT_INLINE_BYTES``
        are refused with guidance rather than streamed through the model context.

        Verifying freshly authored reports: a WHOLE-report ``png`` can render
        blank (API-created reports keep an empty default "Page 1" first) —
        export page-by-page instead by passing a page label in
        ``report_objects``. Text objects 404 on per-object image export; use
        their page. ``pdf`` with no ``report_objects`` is the reliable
        whole-report fallback. ``get_report_outline`` lists the page/object
        labels to pass here.
describe_report_objects tool
Discover 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 filtered to one category (Tables, Controls,
            Containers, Content, Graphs, Geo Maps, Analytics, Statistics,
            Machine Learning).
          * ``object_type`` — one object's full contract: its data roles (each
            marked single vs list), the roles it commonly needs, its common
            options (``options.object.title`` etc.), and a ready-to-send
            ``addObject`` example. Colloquial names resolve (``"kpi"`` →
            ``keyValue``); for a VA UI object with no API support (Text Topics,
            Decision tree, GAM, GLM) it returns the nearest addable alternative;
            for an unknown key it returns ``did_you_mean``.
          * ``operation`` — one operation's full shape with a worked example and
            notes; ``operation="addData"`` documents ``dataItems`` (column
            renames, SAS formats, aggregations, geography classification — the
            polish layer most reports need).

        Pair it with ``get_castable_columns`` to see which columns are categories
        vs measures, then map those columns onto the roles reported here.

        Args:
            object_type: A schema key (e.g. ``"barChart"``, ``"scatterPlot"``)
                or colloquial alias for its contract and example.
            category: Restrict the catalog to one category.
            operation: An operation key (e.g. ``"addData"``, ``"applyDataView"``)
                for its full shape, example, and notes.
create_report tool
Create 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, so verify page-by-page with ``export_report``
        (see the result's ``verify_hint``) rather than a whole-report export.

        Args:
            name: Report name (``resultReportName``). Must be unique in the folder
                unless ``on_conflict`` resolves it.
            folder: Optional target folder URI (``resultFolder``); omit for the
                caller's My Folder.
            on_conflict: Name-conflict policy — ``rename`` (default), ``abort``,
                or ``replace``.
            operations: Optional native operations array to apply at creation, in
                the same shape ``apply_report_operations`` takes. Call
                ``describe_report_objects`` for the operation and object formats.
apply_report_operations tool
Apply 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="addData"`` covers formats,
        aggregations, and geography via ``dataItems``) and each object's data
        roles, and ``get_castable_columns`` to map columns onto those roles.

        Layout & titles (see ``describe_report_objects`` → ``placement`` /
        ``layout_recipes`` for details):
          * Page title — give ``addPage`` a ``title`` (e.g. ``{"addPage":
            {"pageName": "Overview", "title": "Sales Overview"}}``); it becomes a
            text band at the top of that page's body. Page/report headers accept
            ONLY control objects — never text or visuals.
          * Chart titles — pass ``{"options": {"object": {"title": "..."}}}``
            inside the object spec at add time (all types except
            ``standardContainer``, which takes no options at add time).
          * One-batch multi-page — create pages inline with placement
            ``{"report": {"context": "new_page", "pageName": "Trends",
            "pagePosition": 1}}`` (numeric position) and target that pageName
            from later operations in the same batch.
          * Grids/columns — ``relativeToObject`` with ``left/right/top/bottom``
            (geometric) or ``before/after`` (flow order) against an EXISTING
            object's name; same-batch forward references fail, so chain across
            calls using the names each result returns. Objects are auto-named
            and auto-sized; placement and dataRoles are write-once
            (``updateObject`` changes options only).
          * Read structure back anytime with ``get_report_outline``; verify
            visually with ``export_report`` page-by-page (see ``verify_hint``
            in the result).

        The tool validates every operation against the object catalog before any
        HTTP call (unknown/typo'd object type, non-addable object, bad data-role
        names or arity, disallowed object/placement keys) and reports ALL invalid
        operations at once. It also handles the ETag optimistic-concurrency
        handshake for you, retrying once transparently on a concurrent edit.

        Args:
            report_id: Target report id (from ``create_report`` or ``list_reports``).
            operations: Ordered native operations array. Example element:
                ``{"addObject": {"object": {"barChart": {"dataSource": "CARS",
                "dataRoles": {"category": "Origin", "measures": ["MSRP"]},
                "options": {"object": {"title": "MSRP by Origin"}}}},
                "placement": {"page": {"target": "Overview"}}}}``.
            dry_run: Validate and return the normalized payload (plus any
                soft warnings about missing common roles) without writing anything.
            response_format: ``concise`` (default) returns the created page/object/
                data-source names+labels; ``detailed`` also echoes the full VA
                response.
            save_as: False (default) edits the report in place. True applies the
                operations to a NEW report instead, leaving the source untouched
                (atomic template instantiation; pairs with ``changeData``), named
                by ``result_report_name`` and/or placed by ``result_folder`` — at
                least one is required. This flag alone decides the mode: a
                ``result_report_name`` or ``result_folder`` given while it is
                False is refused rather than acted on, so the source can never
                be edited or cloned by surprise. Blank values count as not given.
            result_report_name: Save-as name for the new report.
            result_folder: Save-as target folder URI; omit for My Folder.
            result_name_conflict: Save-as name-conflict policy — ``rename``
                (default), ``abort``, or ``replace``.
get_report_outline tool
Read 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.

        Returns ``{"status": "ok", "pages": [...], "hint": ...}`` (or
        ``not_found`` / ``outline_failed``).

        Args:
            report_id: The report id to outline.
copy_report tool
Copy 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_conflict: Name-conflict policy — ``rename`` (default), ``abort``,
                or ``replace``.
delete_report tool
Delete 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.
execute_sas_code tool
Execute SAS code in a reusable Viya compute session.

        Args:
            sas_code (str): the SAS code snippet to be executed using the Viya Job Execution API Service
            html_results: When True (the default), the output is also written
                as an HTML page, as SAS Data and AI Studio shows it, graphs
                included, and
                saved so the person can open it in a browser. The code runs
                between an ``ods html5`` statement and its close, preceded by
                ``;*';*";*/;run;quit;`` so that an unterminated statement or
                quote cannot swallow the close; neither appears in the log.
                Pass False to submit the code exactly as given.

        Returns:
            A dictionary of string fields describing the executed job:
            ``snippet_id`` (the job's snippet identifier), ``state`` (the final
            job state, e.g. ``completed``/``error``/``warning``), ``log`` (the
            full SAS log — execution details, notes, and any errors/warnings),
            and ``listing`` (the SAS listing output, i.e. the intended results
            when the code ran successfully). When the code printed output and
            ``html_results`` is on, also ``html_results_url``: the same output
            as an HTML page, as SAS Data and AI Studio shows it. Put this URL in
            your reply so the person can open it; they may not see the tool
            result itself.
            It opens in their browser after they sign in to SAS Viya, for them
            only. Do not fetch it yourself: ``listing`` already holds the same
            output as text. ``html_results_error`` instead says why the page
            could not be saved.
validate_custom_function tool
create_custom_function tool
integration test
update_custom_function tool
changed
validate_decision_expression tool
validate_decision_expression tool
create_value_list tool
update_value_list_entries tool
create_segmentation_tree tool
update_segmentation_tree tool
changed
create_segmentation_tree_from_table tool
create_code_file tool
integration test
create_code_file tool
create_code_file tool
update_code_file tool
changed
lock_decisioning_asset_revision tool
list_decisioning_asset_revisions tool
get_decisioning_asset_code tool
get_decisioning_asset tool
list_decisioning_assets tool
copy_decisioning_asset tool
create_decision_flow tool
score_data tool
create_lookup_table tool
get_lookup_table tool
create_business_ruleset tool
create_business_rule tool
get_lookup_table tool
create_decision_flow tool
lock_decision_flow_revision tool
publish_decision_flow tool
get_mas_module_step_signature tool
update_lookup_table tool
activate_lookup_table tool
activate_lookup_table tool
list_decisioning_assets tool
copy_decisioning_asset tool
list_caslibs tool
get_castable_info tool
list_castables tool
delete_report tool
delete_report tool
catalog_search tool
Search the catalog. For a filter, see catalog_search_helper.
catalog_search_helper tool
Build a filter for catalog_search.
list_glossary_terms tool
list_caslibs tool
debug_sas_log prompt
Analyze a SAS log for errors, warnings, and notes with root-cause explanations and suggested fixes.
explore_dataset prompt
Generate comprehensive SAS data-profiling code (CONTENTS, MEANS, FREQ, UNIVARIATE).
data_quality_check prompt
Generate SAS code for a data quality assessment (completeness, uniqueness, validity).
statistical_analysis prompt
Set up a complete SAS statistical analysis workflow with diagnostics.
optimize_sas_code prompt
Review and optimize SAS code for performance, readability, or both.
explain_sas_code prompt
Provide a block-by-block explanation of SAS code, tailored to skill level.
sas_macro_builder prompt
Build a production-quality reusable SAS macro.
generate_report prompt
Generate SAS ODS/PROC REPORT code for formatted output.
build_va_dashboard prompt
Build a polished multi-page Visual Analytics dashboard from a CAS table,
        using the report-authoring tools (discover → shape → structure → polish → verify).
uri resource

What we checked

The same checks run on every server. Each line below has one of these marks:

FoundA published issue such as a risky tool or a CVE
PassedWe ran the check on this server and found nothing
After reviewChecked; we publish it once a person verifies it
Partly tracedRan, but the scanner could not follow every path to its end
FactWhat the code does, not a judgement either way
Not checkedThe scanner had nothing to read for it, or it needs the live server
Code Safetypartly traced
  • 8 checks: command injection, argument injection, path traversal, server-side request forgery, SQL injection, code execution, unsafe deserialization, template injection
    Checked on every scan. Results in this category are published only after a person has verified them.
Capability Exposure6.9
  • Runs programs the caller chooses
    No tool runs a command or program the caller supplies — 154 tool handlers traced. Not every path could be followed, so this is not a clean pass.
  • Executes caller-supplied code
    No tool evaluates code the caller supplies — 154 tool handlers traced. Not every path could be followed, so this is not a clean pass.
  • Reads or writes any file path
    2 findings the scanner could not decide; see the findings below
  • Requests any address
    No tool sends a request to an address the caller supplies — 154 tool handlers traced. Not every path could be followed, so this is not a clean pass.
  • Runs caller-supplied SQL
    No tool executes a query the caller supplies — 154 tool handlers traced. Not every path could be followed, so this is not a clean pass.
  • Tools that start processes
    Not seen in the traced code of 154 capabilities; 147 more call code the scanner could not follow, where it may happen
  • Tools that touch files
    3 of 154 capabilities touch files; 144 more call code the scanner could not follow, where it may happen
  • Tools that call the network
    25 of 154 capabilities call the network; 122 more call code the scanner could not follow, where it may happen
Where the code is: 154 handlers in 18 files at commit d0f158463f8c
Prompt Integrity10.0
  • 5 checks: tool poisoning, instruction override, hidden content, exfiltration requests, metadata integrity
    Checked on every scan. Results in this category are published only after a person has verified them.
Supply Chain2.0
  • Dependency manifests
    1 manifest: pyproject.toml
  • Lockfiles checked against OSV
    1 file resolved and checked against the OSV database; 1 not resolved: pyproject.toml: dependency ranges declared here were not resolved against a lockfile and were not checked
  • Known vulnerabilities in production dependencies CRITICAL
    11 production packages with known advisories
  • Known vulnerabilities in other dependencies
    No package used only for development, tests or examples has a known advisory
  • MCP SDK version
    fastmcp >=4.0.0,<5.0.0
Secrets & Credentials10.0
  • 3 checks: credential harvesting, undeclared credential access, credentials sent over the network
    Checked on every scan. Results in this category are published only after a person has verified them.
  • Tools that read credentials
    Not seen in the traced code of 154 capabilities; 147 more call code the scanner could not follow, where it may happen
  • Authentication declared
    Not checked: needs the live server's tools/list (a remote server declares how clients authenticate)
Behavior Transparency10.0
  • 3 checks: undeclared network access, undeclared file access, undeclared process execution
    Checked on every scan. Results in this category are published only after a person has verified them.
  • Tool descriptions present
    Every tool has a description the model and the user can read (1 only in code no tool reaches)
  • Statically known names
    Every tool's name could be read from the code
  • Input schemas
    Not checked: needs the live server's tools/list (every tool declares an input schema)
  • Destructive tools annotated
    Not checked: needs the live server's tools/list (tools that write, delete or run commands carry destructivehint)

Dependencies with known vulnerabilities (11 in production)

Dependency ranges were not resolved against a lockfile, so the score is capped at 7.

PackageInstalledWorstAdvisoriesFixed in
pyjwtPyPI 2.13.0 CRITICAL 29 advisories 2.14.02.15.0
  • CRITICALGHSA-ffc3-869f-jxw9 CVE-2026-102268 PYSEC-2026-4145PyJWT: Asymmetric-PEM detection bypass: whitespace/line-ending-mutated public keys skip the HS/asymmetric confusion guard
  • HIGHGHSA-w2cx-738m-mc7w CVE-2026-102273 PYSEC-2026-4151PyJWT accepts public JWK containers as HMAC secrets
  • HIGHGHSA-9v7f-9g4p-ffgj CVE-2026-102267 PYSEC-2026-4144PyJWT: PyJWKClient follows redirects when fetching JWKS
  • HIGHGHSA-p4g4-x82p-q773 CVE-2026-102271 PYSEC-2026-4149PyJWT: Public keys in DER form are accepted as HMAC secrets, bypassing the CVE-2022-29217 guard
  • HIGHGHSA-9j54-fg26-wv3r CVE-2026-102266 PYSEC-2026-4143PyJWT: PyJWK accepts empty HMAC keys, bypassing PyJWT's empty-key validation
  • HIGHGHSA-pxh4-856f-4h89PyJWT: HS256/384/512 verify accepts empty HMAC key via oct JWK (PyJWK/PyJWKClient) enabling token forgery
  • HIGHGHSA-r6x4-923q-g947 CVE-2026-102272 PYSEC-2026-4150PyJWT BOM Bypass
  • MEDIUMPYSEC-2026-4151 CVE-2026-102273 GHSA-w2cx-738m-mc7wPyJWT accepts public JWK containers as HMAC secrets
  • MEDIUMGHSA-x33g-cr3x-6449 CVE-2026-102275 PYSEC-2026-4183PyJWT accepts inconsistent OKP x/d JWKs, causing public/private key identity confusion
  • MEDIUMGHSA-gvp8-978c-rx2q CVE-2026-103001 PYSEC-2026-4146PyJWT.decode() reintroduces options-dict mutation, enabling silent claim-verification bypass on dict reuse
  • MEDIUMPYSEC-2026-4150 CVE-2026-102272 GHSA-r6x4-923q-g947PyJWT BOM Bypass
  • MEDIUMGHSA-hxm8-2xgr-2p9m CVE-2026-102269 PYSEC-2026-4147PyJWT: Non-canonical signature segments enable raw-token revocation bypass
  • MEDIUMGHSA-42vr-xj54-vc7v CVE-2026-101918 PYSEC-2026-4141PyJWT: Unauthenticated RecursionError DoS in pre-verification payload parse (PyJWKClient.get_signing_key_from_jwt / verify_signature=False)
  • MEDIUMGHSA-w6j9-cwv2-h6wq CVE-2026-102274 PYSEC-2026-4152PyJWT: Malformed RSA JWK aborts parsing of an entire JWK Set
  • MEDIUMPYSEC-2026-4144 CVE-2026-102267 GHSA-9v7f-9g4p-ffgjPyJWT: PyJWKClient follows redirects when fetching JWKS
  • MEDIUMPYSEC-2026-4152 CVE-2026-102274 GHSA-w6j9-cwv2-h6wqPyJWT: Malformed RSA JWK aborts parsing of an entire JWK Set
  • MEDIUMPYSEC-2026-4183 CVE-2026-102275 GHSA-x33g-cr3x-6449PyJWT is a Python implementation of JSON Web Token standards. From 2.1.0 until 2.15.0, PyJWT OKPAlgorithm.from_jwk in jwt/algorithms.py is affected because private-JWK import path does not compare the public key derived from d with x. This occurs when an OKP private JWK supplies non-corresponding x and d components. As a result, identity derived from x can differ from operations performed with d. Consequently, if an integration also accepts private key parameters from a proof header without rejecting them, an attacker may use a stolen sender-constrained token without the legitimate private key. This issue is fixed in version 2.15.0.
  • MEDIUMGHSA-jwrc-g2q2-pq5p CVE-2026-102270 PYSEC-2026-4148PyJWT: ReDoS vulnerability when calling the `is_pem_format` function.
  • MEDIUMPYSEC-2026-4147 CVE-2026-102269 GHSA-hxm8-2xgr-2p9mPyJWT: Non-canonical signature segments enable raw-token revocation bypass
  • MEDIUMPYSEC-2026-4143 CVE-2026-102266 GHSA-9j54-fg26-wv3rPyJWT: PyJWK accepts empty HMAC keys, bypassing PyJWT's empty-key validation
  • MEDIUMPYSEC-2026-4148 CVE-2026-102270 GHSA-jwrc-g2q2-pq5pPyJWT: ReDoS vulnerability when calling the `is_pem_format` function.
  • MEDIUMPYSEC-2026-4146 CVE-2026-103001 GHSA-gvp8-978c-rx2qPyJWT.decode() reintroduces options-dict mutation, enabling silent claim-verification bypass on dict reuse
  • MEDIUMPYSEC-2026-4149 CVE-2026-102271 GHSA-p4g4-x82p-q773PyJWT: Public keys in DER form are accepted as HMAC secrets, bypassing the CVE-2022-29217 guard
  • MEDIUMGHSA-2gx3-rcp4-g85q CVE-2026-101917 PYSEC-2026-4140PyJWT: PyJWKClient still amplifies unauthenticated JWKS fetches on unknown kid values (incomplete fix of CVE-2026-48524)
  • MEDIUMPYSEC-2026-4142 CVE-2026-102265 GHSA-8wjv-2p76-3863PyJWT: Uncaught RecursionError in jwt.decode() on deeply nested token header
  • MEDIUMPYSEC-2026-4140 CVE-2026-101917 GHSA-2gx3-rcp4-g85qPyJWT: PyJWKClient still amplifies unauthenticated JWKS fetches on unknown kid values (incomplete fix of CVE-2026-48524)
  • MEDIUMPYSEC-2026-4141 CVE-2026-101918 GHSA-42vr-xj54-vc7vPyJWT: Unauthenticated RecursionError DoS in pre-verification payload parse (PyJWKClient.get_signing_key_from_jwt / verify_signature=False)
  • MEDIUMPYSEC-2026-4145 CVE-2026-102268 GHSA-ffc3-869f-jxw9PyJWT: Asymmetric-PEM detection bypass: whitespace/line-ending-mutated public keys skip the HS/asymmetric confusion guard
  • MEDIUMGHSA-8wjv-2p76-3863 CVE-2026-102265 PYSEC-2026-4142PyJWT: Uncaught RecursionError in jwt.decode() on deeply nested token header
authlibPyPI 1.7.2 CRITICAL 16 advisories 1.8.01.9.01.9.1
  • CRITICALGHSA-6v38-4h7w-rj9h CVE-2026-96760Authlib: empty signatures validation in JWS JSON deserialization
  • HIGHGHSA-c73q-w75p-j82v CVE-2026-116672Authlib RFC 7592 examples omit registration-access-token client binding
  • HIGHGHSA-7vr2-2fgp-9w7p CVE-2026-114615 PYSEC-2026-4355Authlib incomplete algorithm-confusion fix permits HMAC forgery with prefixed public keys
  • HIGHGHSA-8m4g-j4wp-wgcg CVE-2026-114616 PYSEC-2026-4356Authlib accepts an empty HMAC key, allowing JWS/JWT signature forgery (HS256/HS384/HS512)
  • MEDIUMPYSEC-2026-4356 CVE-2026-114616 GHSA-8m4g-j4wp-wgcgAuthlib is a Python library which builds OAuth and OpenID Connect servers. Prior to 1.9.1, Authlib's OctKey.import_key() and HMAC signing and verification path accept zero-length key material. If an application's secret lookup can return an empty string or empty bytes, a remote attacker can compute the deterministic HS256, HS384, or HS512 signature for arbitrary token claims and have Authlib treat the token as authentic. This issue is fixed in version 1.9.1.
  • MEDIUMGHSA-q686-2qmg-hqc7 CVE-2026-114619 PYSEC-2026-4359Authlib: OpenID implicit grant checks raw scope instead of allowed scope before issuing ID tokens
  • MEDIUMGHSA-x4rv-c3wx-4cr8 CVE-2026-114620 PYSEC-2026-4360Authlib: Unvalidated request_uri fetch in JWT-secured authorization request (JAR) leading to SSRF
  • MEDIUMPYSEC-2026-4354 CVE-2026-114614 GHSA-jj7h-c3hg-m23xAuthlib is a Python library which builds OAuth and OpenID Connect servers. From 0.13 until 1.8.0, authlib.common.security.is_secure_transport() uses a textual prefix comparison for loopback HTTP exemptions, so a URL whose userinfo begins with a loopback host can be accepted even when its parsed host is an external non-loopback system. An external party able to supply a URL to OIDC RP-Initiated Logout registration, authorization-server metadata validation, or another call site can bypass the TLS-required guard and cause cleartext redirection or acceptance of cleartext endpoints. The issue does not bypass redirect URI exact matching and does not by itself forge tokens or authenticate users. The vulnerable authlib.common.security.is_secure_transport() implementation in authlib/common/security.py misinterprets the userinfo component before OIDC RP-Initiated Logout dynamic client registration and other consumers enforce transport security. This issue is fixed in version 1.8.0.
  • MEDIUMGHSA-fch4-3c6x-j4gc CVE-2026-114618 PYSEC-2026-4358Authlib: Default JWT bearer grant accepts assertions for the wrong audience
  • MEDIUMPYSEC-2026-4358 CVE-2026-114618 GHSA-fch4-3c6x-j4gcAuthlib is a Python library which builds OAuth and OpenID Connect servers. Prior to 1.9.0, the default RFC 7523 JWTBearerGrant.get_audiences() returns an empty list, causing JWTBearerGrant.verify_claims() to require only that an aud claim exists without matching the current authorization server. An attacker holding a legitimate assertion for another service can present it to a server that shares the signing key and uses the default grant, obtaining an access token across a trust boundary. Implementations that override get_audiences() with the server's valid audience identifiers are not affected. This issue is fixed in version 1.9.0.
  • MEDIUMPYSEC-2026-4359 CVE-2026-114619 GHSA-q686-2qmg-hqc7Authlib is a Python library which builds OAuth and OpenID Connect servers. Prior to 1.9.0, OpenIDImplicitGrant.validate_authorization_request() checks the client-controlled raw request.payload.scope for openid after the parent grant has filtered allowed scopes into request.scope. A registered client permitted an ID token response type but not the openid scope can add openid to the request, obtain user consent, and receive a signed ID token containing the user's subject and allowed profile claims. Authorization code flow and deployments that allow openid for every client permitted an ID token response are not affected. In authlib/oidc/core/grants/implicit.py, OpenIDImplicitGrant.validate_authorization_request() checks request.payload.scope instead of the filtered request.scope. This issue is fixed in version 1.9.0.
  • MEDIUMGHSA-c5mf-xmp2-59rc CVE-2026-114617 PYSEC-2026-4357Authlib: ID token can disable its own nonce validation via the nonce_supported claim
  • MEDIUMPYSEC-2026-4360 CVE-2026-114620 GHSA-x4rv-c3wx-4cr8Authlib is a Python library which builds OAuth and OpenID Connect servers. Prior to 1.9.0, Authlib's RFC 9101 JWTAuthenticationRequest passes the unauthenticated, client-controlled request_uri parameter to the abstract get_request_object() hook before applying a destination or registration policy; the hook itself performs no network request, while the documentation demonstrates an unrestricted HTTP fetch. In deployments whose integrator implements that hook as an unrestricted outbound fetch, a remote attacker who knows a valid public client identifier can make the authorization server request internal, link-local, or otherwise unintended URLs and can distinguish fetch outcomes through different error responses and timing. Deployments whose custom hook already applies a secure allowlist, destination controls, and retrieval limits are not affected. The JWTAuthenticationRequest implementation in authlib/oauth2/rfc9101/authorization_server.py forwards request_uri to get_request_object() before an application-approved retrieval policy accepts the destination. This issue is fixed in version 1.9.0.
  • MEDIUMPYSEC-2026-4355 CVE-2026-114615 GHSA-7vr2-2fgp-9w7pAuthlib is a Python library which builds OAuth and OpenID Connect servers. From 1.3.1 until 1.9.0, OctKey.import_key() checks asymmetric-key markers only at byte zero while Authlib's PEM loaders accept leading whitespace, comments, or a byte-order mark. In deployments that use the documented mixed algorithm registry and already configure verification with PEM or certificate bytes containing such a prefix, an unauthenticated attacker who knows those same public-key bytes can use them as an HMAC secret and forge HS256 tokens with arbitrary identity or authorization claims. This is a bypass of the remediation for CVE-2024-37568. The module-level jwt object reaches OctKey.import_key() in authlib/jose/rfc7518/oct_key.py, where POSSIBLE_UNSAFE_KEYS fails to identify prefixed asymmetric key material. This issue is fixed in version 1.9.0.
  • MEDIUMPYSEC-2026-4357 CVE-2026-114617 GHSA-c5mf-xmp2-59rcAuthlib is a Python library which builds OAuth and OpenID Connect servers. Prior to 1.9.0, OpenIDMixin.parse_id_token() reads the nonce_supported decision from the untrusted ID token being validated and sets the expected nonce to null when that claim is the JSON boolean false. In implicit and hybrid relying parties, or applications that directly accept externally supplied ID tokens, an attacker with a captured validly signed token can bypass the nonce-to-session binding and replay the victim's token into an attacker-controlled session. Plain authorization code flow is not affected, and the token must still pass signature, issuer, and audience validation. OpenIDMixin.parse_id_token() trusts nonce_supported in both authlib/integrations/base_client/sync_openid.py and authlib/integrations/base_client/async_openid.py to disable the expected nonce. This issue is fixed in version 1.9.0.
  • LOWGHSA-jj7h-c3hg-m23x CVE-2026-114614 PYSEC-2026-4354Authlib: is_secure_transport() loopback exemption can be bypassed with a userinfo component, allowing cleartext-HTTP URLs to non-loopback hosts
anyioPyPI 4.14.0 CRITICAL 6 advisories 4.14.2
  • CRITICALGHSA-82r6-8w77-94w6 CVE-2026-63374 PYSEC-2026-4025AnyIO: TLSStream IDNA 2003 host name encoding enables potential TLS certificate spoofing
  • HIGHGHSA-3w57-8xmc-8v26 CVE-2026-63349 PYSEC-2026-4023AnyIO run_process/open_process ignores extra_groups and can retain parent supplementary groups
  • MEDIUMPYSEC-2026-4023 CVE-2026-63349 GHSA-3w57-8xmc-8v26AnyIO run_process/open_process ignores extra_groups and can retain parent supplementary groups
  • MEDIUMPYSEC-2026-4024 CVE-2026-64847 GHSA-5p39-cfhj-2xmpAnyIO process-pool workers can block indefinitely on undrained stderr
  • MEDIUMPYSEC-2026-4025 CVE-2026-63374 GHSA-82r6-8w77-94w6AnyIO: TLSStream IDNA 2003 host name encoding enables potential TLS certificate spoofing
  • MEDIUMGHSA-5p39-cfhj-2xmp CVE-2026-64847 PYSEC-2026-4024AnyIO process-pool workers can block indefinitely on undrained stderr
certifiPyPI 2026.6.17 CRITICAL 2 advisories 2026.10.18
  • CRITICALGHSA-6q48-6c7w-9gw2 PYSEC-2026-4320certifi bundles emSign root CAs with compromised intermediate CA keys
  • MEDIUMPYSEC-2026-4320 GHSA-6q48-6c7w-9gw2certifi bundles emSign root CAs with compromised intermediate CA keys
mcpPyPI 2.1.1 HIGH 5 advisories 1.30.02.2.0
  • HIGHGHSA-qx49-fqc8-xw99 CVE-2026-115563Model Context Protocol Python SDK: OAuth client could send credentials to an authorization server chosen by the MCP server
  • MEDIUMGHSA-84m7-p3x7-pcfv CVE-2026-59951MCP Python SDK: Unbounded Session Accumulation in StreamableHTTP Transport Enables Resource Exhaustion
  • MEDIUMGHSA-w4fh-qvv9-3v23 CVE-2026-116684Model Context Protocol Python SDK: Server bearer-token authentication accepts tokens issued for a different resource server
  • MEDIUMGHSA-5h93-6whr-6q8j CVE-2026-116685Model Context Protocol Python SDK: HTTP client transports followed cross-origin redirects carrying custom headers and bodies
  • MEDIUMGHSA-rwrf-2pqf-9j8j CVE-2026-116686Model Context Protocol Python SDK: Client fetched server-chosen $ref URLs while validating tool results against output schemas
cryptographyPyPI 49.0.0 HIGH 2 advisories 50.0.0
  • HIGHGHSA-g6cj-pr64-35w5 CVE-2026-69247 PYSEC-2026-3552cryptography: PKCS#7 EnvelopedData decryption exposes a Bleichenbacher oracle through distinguishable errors and timing
  • MEDIUMPYSEC-2026-3552 CVE-2026-69247 GHSA-g6cj-pr64-35w5cryptography: PKCS#7 EnvelopedData decryption exposes a Bleichenbacher oracle through distinguishable errors and timing
dnspythonPyPI 2.8.0 HIGH 2 advisories 2.9.02.9.2
joserfcPyPI 1.7.1 HIGH 2 advisories 1.7.51.7.6
  • HIGHGHSA-jpxq-7h8p-2q76 CVE-2026-119283joserfc: Unbounded JWE General JSON `recipients` Array Leads to CPU Exhaustion (DoS) via Repeated RSA Private-Key Decryption
  • MEDIUMGHSA-9pg5-8c7x-5hfx CVE-2026-119284joserfc: Compact JWS size guard allocates attacker-controlled segments before rejection
fastmcpPyPI 4.0.0 MEDIUM 2 advisories 3.4.104.1.2
  • MEDIUMGHSA-7xgj-8392-5q4rFastMCP: Post-transform component authorization is skipped on direct calls
  • MEDIUMGHSA-vqqp-x5qm-5qp4FastMCP MCP client wrappers construct M2M OAuth providers without issuer binding — client secret redirectable to attacker-advertised authorization server
fastmcp-slimPyPI 4.0.0 MEDIUM 2 advisories 3.4.104.1.2
  • MEDIUMGHSA-vqqp-x5qm-5qp4FastMCP MCP client wrappers construct M2M OAuth providers without issuer binding — client secret redirectable to attacker-advertised authorization server
  • MEDIUMGHSA-7xgj-8392-5q4rFastMCP: Post-transform component authorization is skipped on direct calls
opentelemetry-apiPyPI 1.42.1 MEDIUM 2 advisories 1.45.11.45.2
  • MEDIUMGHSA-xcq7-p3pf-p88h CVE-2026-114603OpenTelemetry Python: Unbounded tracestate parsing in opentelemetry-api
  • MEDIUMGHSA-mf5v-w3w3-f6cg CVE-2026-126360OpenTelemetry Python API: Denial of service through quadratic-time traceparent parsing

Past security advisories

Vulnerabilities published for this server itself, from the GitHub Advisory Database.

No security advisories have been published for this server in the GitHub Advisory Database.

How it runs

Where it runsOn your machine, started by your MCP client from this repository or its package
Transportnot stated in the code the scanner read; most local servers talk over stdio
Sign-innot checked needs the live server
MCP SDKfastmcp >=4.0.0,<5.0.0
Servers in the code20 (Payload Test Server, Integration Test Server, glossary-test, landing-facts, landing-untiered, test-prompts, read-only-test, gate-test, test, tier-test, annotations-test, rename-test, rename-real, plain, ui-test)

The project's own security

Security policyyes SECURITY.md
Private reportingmentioned the policy names a private channel
Past advisoriesnone in the GitHub Advisory Database
Last push2026-11-13
Signed releasesnot checked yet

Where it is published

MCP Registryio.github.sassoftware/sas-mcp-server
Listed in4 catalogs (github_search, glama, mcp_registry, mcp_toplist)
LicenseApache-2.0
Created2025-11-13
Topicssas-aiml sas-osp

Attack map

How the server is built and where its risky tools lead: servers, their tools, what the tools' code can do, and the traced route from a declared risky tool's argument to the operation it reaches. Click a node for details.

Request a scan or an audit

Tell us about your server. We reply within 5 working days.

What do you need? *

We use these details only to answer you.