Skip to main content
Glama
sassoftware

SAS MCP Server

Official
by sassoftware

Validate Custom Function

validate_custom_function
Idempotent

Compile a DS2 custom function without saving it and return any errors, optionally validating the code against a specified category.

Instructions

Compile a DS2 custom function without saving it, and return its errors.

Input Schema

NameRequiredDescriptionDefault
codeYesThe DS2 method.
categoryNoOptional category (name or ID) to validate against.

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv1.19.0

TDQS

A3.8/5.0
Behavior4/5

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

Annotations already declare idempotent=true, destructive=false and (somewhat oddly) readOnlyHint=false, so the safety profile is largely covered. The description adds the important behavioral fact that compilation does not persist anything and that errors are the return signal, which is real value beyond the annotations. It does not explain whether code is executed in a sandbox or what happens on a successful compile.

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?

One sentence, front-loaded with the action and resource, with the non-persistence qualifier immediately attached and zero 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 an output schema present, the description need not describe return values, and the 'return its errors' phrasing is enough orientation. For a two-parameter tool this is nearly complete; only the scope of 'category' and the boundary against validate_decision_expression remain implicit.

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

Parameters3/5

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

Schema coverage is 100%, so both parameters are already documented, and the description adds nothing about them. The meaning of 'category' (name or ID, scoping the validation) is only conveyed by the schema, which is acceptable at this coverage level but earns no extra credit.

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

Purpose4/5

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

States a specific verb (compile/validate) and resource (DS2 custom function) and adds the key qualifier 'without saving it,' which separates it from create_custom_function and update_custom_function. It does not name the closely related validate_decision_expression sibling, so full sibling differentiation is incomplete.

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?

The phrase 'without saving it' implies the use case (checking code before persisting), but there is no explicit when-to-use statement, no prerequisites, and no pointer to validate_decision_expression for non-DS2 expressions. Usage is inferable rather than stated.

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