Skip to main content
Glama
SAS MCP Server

SAS MCP Server

Official
by sassoftware

Publish Decision Flow

publish_decision_flow

Publishes a locked decision revision to a Micro Analytic Score destination, polls the publish job to completion, and returns the module ID needed to score the decision.

Instructions

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.

The module is named after publish_name, as SAS Intelligent Decisioning names it: Loan_Pre_Approval becomes the module loan_pre_approval (anything but letters, digits and underscores becomes an underscore), so it can be found by name in list_mas_modules. When a module of that name exists already the publish fails ("already in use"): pick another name, or, to put a new revision in its place, pass replace_existing — after asking the person when the module is not one they published themselves. Publishing is asynchronous: this polls the publish job (properties.masModules[0].jobUri) until it reaches a terminal state and returns the module's moduleId alongside the publish record, ready for get_mas_module_step_signature/score_data.

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.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "decision_id": "<decision_id>",
      "revision_id": "<revision_id>",
      "publish_name": "<publish_name>"
    },
    "name": "publish_decision_flow"
  }
}

Input Schema

NameRequiredDescriptionDefault
decision_idYesThe decision flow UUID (not its name — list_decision_flows returns both).
revision_idYesThe locked revision UUID (see ``lock_decision_flow_revision``).
poll_timeoutNoMax seconds to wait for the publish job to reach a terminal state before giving up (default 60.0).
publish_nameYesThe published name shown in Model Publish, which also names the MAS module (see above).
destination_nameNoA 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.
replace_existingNoReplace the code of a MAS module that already has this name (default false: such a publish fails). Scoring through the module then runs this revision.

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changedv1.22.0
    • changedInput schema / properties / publish_name / description
      Previous value: -"The published name shown in Model Publish (not the\nMAS module ID — see above)."New value: +"The published name shown in Model Publish, which\nalso names the MAS module (see above)."
    • addedInput schema / properties / replace_existing
      Added value: +{
      +  "default": false,
      +  "description": "Replace the code of a MAS module that already\nhas this name (default false: such a publish fails). Scoring\nthrough the module then runs this revision.",
      +  "type": "boolean"
      +}
  2. Changed4 schema fields changedv1.19.2
    • addedInput schema / properties / destination_name / anyOf
      Added value: +[
      +  {
      +    "type": "string"
      +  },
      +  {
      +    "type": "null"
      +  }
      +]
    • changedInput schema / properties / destination_name / default
      Previous value: -"maslocal"New value: +null
    • changedInput schema / properties / destination_name / description
      Previous value: -"The configured MAS publishing destination\n(default \"maslocal\")."New value: +"A Micro Analytic Score publishing destination.\nDefault: the deployment's ``MCP_DEFAULT_PUBLISH_DESTINATION``,\n``maslocal`` unless an administrator changed it. The code is\ngenerated for MAS, so the destination must be a MAS one."
    • removedInput schema / properties / destination_name / type
      Removed value: -"string"
  3. Changed1 schema field changedv1.7.0
    • changedInput schema / properties / decision_id / description
      Previous value: -"The decision flow UUID."New value: +"The decision flow UUID (not its name — list_decision_flows returns both)."
  4. Addedv1.5.0

TDQS

A4.6/5.0
Behavior5/5

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

Beyond the annotations (readOnly=false, idempotent=false, destructive=false), it discloses a lot an agent cannot infer: publishing is asynchronous and the call polls a jobUri to a terminal state, failure semantics for name collisions ('already in use'), the environment-level vs payload-level error distinction for rule set code generation, and the safety check to ask the user before replacing a module they did not publish.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Purpose is front-loaded in the first sentence and each subsequent paragraph covers a distinct concern (prerequisite, naming, collision handling, async polling, code generation). It is longer than typical and the closing paragraph about underscore-suffixed inputs from UI-published modules is somewhat tangential, but nothing is filler.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a six-parameter asynchronous mutation with an output schema, the description covers the prerequisite chain, failure modes, name derivation, replacement policy, and even names the field carrying the returned moduleId. An agent has enough to invoke it correctly and interpret the common errors without further exploration.

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

Parameters4/5

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

Schema coverage is 100%, so the schema already carries baseline meaning, but the description adds real semantics: publish_name is normalized into the module name (non-alphanumerics become underscores) so it can be found in list_mas_modules, and replace_existing changes what the module scores going forward. destination_name's MAS-only constraint is reinforced with the rationale that code is generated for MAS.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The opening sentence gives a specific verb, resource, and target: publishing a locked decision revision to a MAS destination. It also implicitly separates this from the model-publishing siblings (publish_model, publish_ml_champion_model) by scoping the resource to decision flows and the destination to Micro Analytic Score.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

It states a concrete upstream dependency (must run before score_data can execute, since MAS runs published modules) and downstream usage (feeds get_mas_module_step_signature/score_data), plus when to use replace_existing vs picking a new name. It gives no explicit contrast against the sibling publish_model and publish_ml_champion_model tools, which is the only notable gap.

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

Deploy Server

Other Tools