Publish Decision Flow
publish_decision_flowPublishes 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
| Name | Required | Description | Default |
|---|---|---|---|
| decision_id | Yes | The decision flow UUID (not its name — list_decision_flows returns both). | |
| revision_id | Yes | The locked revision UUID (see ``lock_decision_flow_revision``). | |
| poll_timeout | No | Max seconds to wait for the publish job to reach a terminal state before giving up (default 60.0). | |
| publish_name | Yes | The published name shown in Model Publish, which also names the MAS module (see above). | |
| destination_name | No | 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. | |
| replace_existing | No | Replace 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
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||