Skip to main content
Glama

Validate Script

validate_script
Read-onlyIdempotent

Structurally validate a list of commands for a bot type before saving or playing, reporting any issues by command index. Pass the script's variables as well and it also cross-checks the bindings against the ${...} and bot.getVariable reads in the commands, warning about a read nothing supplies, a binding nothing reads, and a per-occurrence variable read more than once in an iteration. Warnings never make a script invalid and never stop a save — all three are legal scripts.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
botTypeYesThe bot type the commands are for.
commandsYesThe commands to validate, each a JSON object with a 'type'.
variablesNoThe script's variable bindings, as get_script returns them. Omit to skip the binding cross-check and validate structure alone.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
validYes
issuesYes
warningsYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.2/5.0
Behavior4/5

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

The annotations already establish readOnly, idempotent, and non-destructive behavior. The description adds meaningful behavioral detail beyond that: warnings never make a script invalid and never block a save, and it describes the specific warning categories. This helps an agent predict consequences accurately.

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?

The description is front-loaded with the main purpose and is dense with useful information. The second sentence is long, but every clause conveys a distinct warning type or behavioral guarantee, so the length is justified.

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

Completeness5/5

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

Given that an output schema exists, the description does not need to explain return structure. It covers when to use the tool, what optional input changes behavior, and what warnings do and do not mean. No critical information for selecting and invoking the tool is missing.

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 description coverage is 100%, so the schema already documents botType, commands, and variables well. The description reinforces the optional variables behavior and the cross-check logic, but it does not add substantially new parameter-level format or syntax information.

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?

The description states a specific action and resource: 'structurally validate a list of commands for a bot type', reporting issues by command index. It clearly distinguishes this from sibling tools like play_script or create_script by focusing on validation rather than execution or persistence.

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?

It gives clear usage context: validate 'before saving or playing' a script. It also explains when to include the optional variables parameter to enable the binding cross-check. It does not name alternatives like get_command_schema, but the intended timing and optional behavior are clear.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.