Skip to main content
Glama
SunLicense MCP server

SunLicense MCP server

Official

validate_automation

Read-onlyIdempotent

Validate an automation graph without saving it to catch unknown node types, missing settings, CEL type errors, and broken edges; fix issues before creating the automation.

Instructions

Check a graph without saving it: unknown types, missing settings, CEL type errors, broken edges. Fix every problem; with none, save it with create_automation. A graph is {"nodes":[…],"edges":[…]}, a tree from exactly one trigger. Nodes: {"id","kind","type","config"}; kind is "trigger" (type: a trigger key, id "trigger"), "action" (type: an action key) or "condition" (no type; config {"cel": "<CEL expression over the trigger's fields>"}). Edges: {"from","to"} in the order nodes run; edges leaving a condition carry "branch": "true" (Yes) or "false" (No). Settings marked placeholders accept {{field.key}} from the trigger's fields, e.g. "{{license.id}}". CEL is typed: compare ints with ints (license.machinesUsed > 2), doubles with doubles (2.0), timestamps with timestamp("2026-01-01T00:00:00Z") or now ± duration("72h"); string fields with options only take those values.

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": {
      "graph": "<graph>"
    },
    "name": "validate_automation"
  }
}

Input Schema

NameRequiredDescriptionDefault
graphYes

Output Schema

NameRequiredDescriptionDefault
validYesno problems: it can be saved, tested and switched on
problemsNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.4/5.0
Behavior4/5

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

Annotations already declare readOnlyHint, idempotentHint, non-destructive and closed-world, and the description reinforces this with "without saving it." It adds value beyond the annotations by naming the exact classes of defects surfaced (unknown types, missing settings, CEL type errors, broken edges), which is what an agent needs to interpret a failed result. It does not describe error output shape, but an output schema exists.

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 and the create_automation handoff are front-loaded, then the grammar of the graph follows in a logical node-then-edge-then-settings-then-CEL order. It is dense and reads as a long block, but essentially every clause carries a constraint the agent would otherwise have to guess.

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?

For a nested, structurally complex parameter this covers node/edge grammar, branching semantics, placeholders and CEL type rules, and an output schema handles the return value. The only soft spot is that "broken edges" is not defined operationally, leaving the agent to infer what makes an edge invalid.

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

Parameters5/5

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

With the single graph parameter, the description supplies the full contract the schema only gestures at: node fields and their meaning, that a condition has no type and takes {"cel": …}, that edges carry branch "true"/"false" only when leaving a condition, the single-trigger tree constraint, and placeholder syntax {{field.key}}. The CEL typing rules (int vs double, timestamp()/now ± duration(), enum-only string fields) are meaning found nowhere else.

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?

"Check a graph without saving it" gives a specific verb (validate) and resource (graph), and immediately enumerates what is checked: unknown types, missing settings, CEL type errors, broken edges. The contrast with create_automation (this one does not persist) is stated in the first clause, so an agent can distinguish it from siblings without opening 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 Guidelines4/5

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

Explicit next-step routing: "Fix every problem; with none, save it with create_automation" tells the agent both the failure path and the success path. It does not mention test_automation or update_automation as alternatives, but the core when-to-use condition (pre-save validation) is unambiguous.

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