Skip to main content
Glama

Validate a script

validate_script
Read-onlyIdempotent

Check a script for errors and warnings without saving it. Pass blocks to check a draft you have not saved, or omit it to check the stored script. Errors block open_project; warnings do not but are usually worth fixing. Call this before every open_project.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
blocksNo
project_idYesProject id, from list_projects or create_project.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed4 schema fields changed
    • changedInput schema / $defs / ActionConfigSchema / properties / fire_scope / anyOf
      Previous value: -[
      -  {
      -    "type": "string"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]New value: +[
      +  {
      +    "enum": [
      +      "respondent",
      +      "session"
      +    ],
      +    "type": "string"
      +  },
      +  {
      +    "type": "null"
      +  }
      +]
    • changedInput schema / $defs / BlockOptionSchema / properties / anchor_position / anyOf
      Previous value: -[
      -  {
      -    "type": "string"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]New value: +[
      +  {
      +    "const": "last",
      +    "type": "string"
      +  },
      +  {
      +    "type": "null"
      +  }
      +]
    • changedInput schema / $defs / ContinueSchema / properties / after / anyOf
      Previous value: -[
      -  {
      -    "type": "string"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]New value: +[
      +  {
      +    "enum": [
      +      "pause",
      +      "click"
      +    ],
      +    "type": "string"
      +  },
      +  {
      +    "type": "null"
      +  }
      +]
    • changedInput schema / $defs / ContinueSchema / properties / pause / anyOf
      Previous value: -[
      -  {
      -    "type": "integer"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]New value: +[
      +  {
      +    "minimum": 0,
      +    "type": "integer"
      +  },
      +  {
      +    "type": "null"
      +  }
      +]
  2. Changed1 schema field changed
    • addedInput schema / $defs / BlockSchema / properties / text_analysis
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "boolean"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "title": "Text Analysis"
      +}
  3. First observed

TDQS

A4.6/5.0
Behavior4/5

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

Annotations already declare readOnlyHint and idempotentHint, so safety is covered, but the description adds genuinely new behavior: validation never persists changes, errors block open_project while warnings do not, and warnings are advisory. It stops short of describing the shape of the returned errors/warnings, though no output schema exists to cover that.

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 each subsequent sentence adding a distinct, load-bearing fact (draft vs stored, error/warning consequence, call timing). No 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?

For a two-parameter read-only validator with no output schema, the description covers the essential decision points (when to pass blocks, what errors mean downstream). The only gap is that it does not hint at the returned structure, which the absence of an output schema would otherwise justify explaining.

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 description coverage is only 50% (project_id documented, blocks undocumented), so the description must compensate. It does explain the meaning of `blocks` (a draft not yet saved) versus omitting it, which is the decisive semantic an agent needs, though it does not describe the block object contents.

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 ('Check a script for errors and warnings') plus the key scoping fact that it does not save. This clearly separates it from get_script, replace_script, and plan_script without needing their schemas.

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

Usage Guidelines5/5

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

Gives explicit conditional guidance: pass `blocks` for an unsaved draft, omit it to validate the stored script. It also states a concrete trigger ('Call this before every open_project'), so the agent knows both when and how to invoke it.

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.