Skip to main content
Glama
sassoftware

SAS MCP Server

Official
by sassoftware

Validate Decision Expression

validate_decision_expression
Idempotent

Check if a DS2 expression compiles using given variables, returning validity and compiler errors/warnings to catch syntax issues early.

Instructions

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.

Input Schema

NameRequiredDescriptionDefault
signatureNoThe variables it uses, ``[{"name", "dataType", "direction"}]``.
expressionYesThe expression, e.g. ``risk_band(credit_score) = 'LOW'``.

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv1.19.0

TDQS

A4.4/5.0
Behavior4/5

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

Goes beyond the annotations by disclosing what comes back (a `valid` flag plus compiler error and warning lines) and the key semantic rule that undeclared variables produce warnings, since DS2 auto-creates them. It does not explain the non-obvious readOnlyHint=false on what appears to be a pure check, leaving a small gap.

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

Conciseness5/5

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

Four short sentences, front-loaded with the core action and followed by scope, return contents, and the one semantic caveat an agent could get wrong. No filler and nothing repeated from the schema.

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 an output schema present the description needn't enumerate return fields, and annotations cover the safety profile, so the definition is nearly complete. The remaining hole is the unexplained non-read-only annotation, which an agent might misinterpret as a mutating operation.

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, but the description adds real meaning: `signature` defines the variables the expression is allowed to reference, and referencing anything outside it is a warning rather than a failure. That consequence is not derivable from the schema's one-line parameter description.

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?

Specific verb (validate/compile-check) applied to a precise resource (a DS2 expression), with the concrete contexts spelled out: rule condition or action, branch, condition step. This separates it from the sibling validate_custom_function, which validates a different artifact type.

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?

The description makes clear this is a pre-flight compile check for expressions and names the places expressions live (conditions, actions, branches, steps), so an agent knows the context of use. It stops short of stating when not to use it or explicitly routing to validate_custom_function for non-expression artifacts.

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