Skip to main content
Glama
sassoftware

SAS MCP Server

Official
by sassoftware

Create Business Rule

create_business_rule

Add a conditional rule to an existing SAS Business Rules rule set with defined conditions, actions, and rule-firing tracking. Use it to extend rule sets for new business decision logic.

Instructions

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.

Input Schema

NameRequiredDescriptionDefault
nameYesRule name (max 30 chars).
actionsYesList 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.
conditionsYesList 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.
ruleset_idYesThe rule set UUID to add the rule to (not its name — list_business_rulesets returns both).
conditionalYes"if" starts a new independent rule chain, "elseif" continues the previous rule's chain, "or" ORs into it.
rule_fired_tracking_enabledYesWhether to record when this rule fires.

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changedv1.19.0
    • changedInput schema / properties / actions / description
      Previous value: -"List of actions, each ``{\"type\": \"assignment\"|\"return\",\n\"term\": {\"name\", \"dataType\", \"direction\"}, \"expression\"}``."New value: +"List of actions, each ``{\"type\": \"assignment\"|\"return\",\n\"term\": {\"name\", \"dataType\", \"direction\"}, \"expression\"}``, or\n``{\"type\": \"lookupValue\", \"term\": {...}, \"expression\": \"<key>\",\n\"lookup\": \"<lookup table name or ID>\"}`` — assigns the value the\nlookup table stores for the key the expression evaluates to."
    • changedInput schema / properties / conditions / description
      Previous value: -"List of conditions (multiple conditions AND together),\neach ``{\"type\": \"complex\", \"expression\", \"term\": {\"name\",\n\"dataType\", \"direction\"}}``."New value: +"List of conditions (multiple conditions AND together),\neach ``{\"type\": \"complex\", \"expression\", \"term\": {\"name\",\n\"dataType\", \"direction\"}}``, or ``{\"type\": \"lookup\", \"term\":\n{...}, \"lookup\": \"<lookup table name or ID>\"}`` — true when the\nterm's value is a key of the lookup table."
  2. Changed1 schema field changedv1.7.0
    • changedInput schema / properties / ruleset_id / description
      Previous value: -"The rule set UUID to add the rule to."New value: +"The rule set UUID to add the rule to (not its name — list_business_rulesets returns both)."
  3. Addedv1.5.0

TDQS

A4.1/5.0
Behavior4/5

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

Annotations already declare this is a non-read-only, non-idempotent, non-destructive, closed-world mutation, so the safety profile is covered. The description goes beyond them with a genuinely valuable silent-failure disclosure: malformed expressions are accepted by the API but produce DS2 code with a missing left-hand operand, plus the boolean variable convention. It omits operational prerequisites such as lock/revision state before mutation.

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?

Front-loads the action in the first sentence and follows with two dense, non-redundant pitfall notes rather than restating field names. Slightly long given everything else lives in the schema, but no sentence is filler.

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

Completeness4/5

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

With full schema coverage, an output schema present, and annotations covering the safety profile, the description only needed to add domain pitfalls — which it does. The remaining gap is the mutation workflow context (locking a ruleset revision, whether the target must be unlocked), which would help an agent avoid a failed call.

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 baseline is 3; the description earns extra credit by adding expression-format semantics not in the schema (variable name must be embedded in the expression, booleans compared as = 0/= 1). It does not clarify conditional chaining or lookup-table referencing beyond what the schema already states.

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?

States a specific verb and resource ("Create a new rule") and pins the scope with "inside an existing SAS Business Rules rule set", which cleanly separates it from create_business_ruleset and update_business_rule. An agent can identify the operation without reading the schema.

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

Usage Guidelines3/5

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

"New rule" vs the sibling update_business_rule implies the create-vs-modify split, and the description's mention of rule sets holding multiple rules gives context. However, it never explicitly says when to use this instead of update_business_rule, nor does it state prerequisites (e.g. that the rule set may need to be locked for a revision before adding a rule is possible).

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