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. suggestions lists empty presentation slots (an intro or a result with no image; for a project posted on Discord, a bare invitation): never blocking, but name them to the person and offer to fill them. Call this before every open_project.

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": {
      "project_id": "<project_id>"
    },
    "name": "validate_script"
  }
}

Input Schema

NameRequiredDescriptionDefault
blocksNoA draft script to check. Omit to check the project's stored script.
project_idYesProject id, from list_projects or create_project.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changed
    • addedInput schema / $defs / BlockSchema / properties / upload
      Added value: +{
      +  "anyOf": [
      +    {
      +      "$ref": "#/$defs/UploadSchema"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null
      +}
    • addedInput schema / $defs / UploadSchema
      Added value: +{
      +  "description": "A `file_upload` block's rules. Every field is optional: images and documents,\none file, required, up to the community's plan limit.",
      +  "properties": {
      +    "categories": {
      +      "anyOf": [
      +        {
      +          "items": {
      +            "type": "string"
      +          },
      +          "type": "array"
      +        },
      +        {
      +          "type": "null"
      +        }
      +      ],
      +      "default": null,
      +      "title": "Categories"
      +    },
      +    "max_bytes": {
      +      "anyOf": [
      +        {
      +          "type": "integer"
      +        },
      +        {
      +          "type": "null"
      +        }
      +      ],
      +      "default": null,
      +      "title": "Max Bytes"
      +    },
      +    "max_files": {
      +      "anyOf": [
      +        {
      +          "type": "integer"
      +        },
      +        {
      +          "type": "null"
      +        }
      +      ],
      +      "default": null,
      +      "title": "Max Files"
      +    },
      +    "min_files": {
      +      "anyOf": [
      +        {
      +          "type": "integer"
      +        },
      +        {
      +          "type": "null"
      +        }
      +      ],
      +      "default": null,
      +      "title": "Min Files"
      +    }
      +  },
      +  "title": "UploadSchema",
      +  "type": "object"
      +}
  2. Changed1 schema field changed
    • addedInput schema / properties / blocks / description
      Added value: +"A draft script to check. Omit to check the project's stored script."
  3. 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"
      +  }
      +]
  4. Changed1 schema field changed
    • addedInput schema / $defs / BlockSchema / properties / text_analysis
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "boolean"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "title": "Text Analysis"
      +}
  5. First observed

TDQS

A4.6/5.0
Behavior5/5

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

Annotations already declare it read-only and idempotent, and the description adds real behavioral context: errors block open_project, warnings do not but are worth fixing, and `suggestions` is never blocking. It also explains what the suggestions actually are (empty presentation slots, bare Discord invitations) and how to surface them to the user.

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?

Front-loaded with the action and scope, then the branch condition, then the consequence of each result type. Dense but nearly every clause carries information; the parenthetical about intro/result images is slightly verbose but clarifying.

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?

For a two-parameter read-only validator with no output schema, the description covers what is checked, the severity model (errors vs warnings vs suggestions), the downstream consequence for open_project, and how to present results to the user. Nothing an agent needs to call it correctly 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% and the schema already documents both `blocks` (draft vs stored) and `project_id`. The description reinforces the `blocks` semantics correctly but adds no syntax or format detail beyond the schema, so the baseline 3 applies.

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 scope qualifier 'without saving it', which separates it from replace_script or open_project.

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 branching: pass `blocks` to check a draft, omit it to check the stored script, and states a hard rule — 'Call this before every open_project.' The alternative/sequencing is unambiguous.

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.