Skip to main content
Glama

validate_script_syntax

Checks Python/Jython syntax locally and returns structured diagnostics, indentation checks, and available scope objects to catch script errors before deployment.

Instructions

Validate Python/Jython syntax locally.

Args: code: Script source. scope: Script scope, used for context hints. context: Optional explicit Ignition script context. When omitted, it is inferred from scope. check_indentation: Include context-aware indentation diagnostics.

Returns: Validity, structured diagnostics and the objects available in the scope.

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": {
      "code": "<code>"
    },
    "name": "validate_script_syntax"
  }
}

Input Schema

NameRequiredDescriptionDefault
codeYes
scopeNogateway
contextNo
check_indentationNo

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

B3.4/5.0
Behavior4/5

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

With no annotations supplied, the description carries the full load and does reasonably well: it discloses that validation happens locally (no gateway round-trip), that the script context is inferred from scope when not given explicitly, and that indentation diagnostics are context-aware rather than purely syntactic. It stops short of stating explicitly that nothing is persisted or modified, and it does not mention size/time limits on the code being validated.

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 structure is conventional and front-loaded: one imperative purpose sentence, then grouped Args and Returns. The lines largely earn their place, though the Returns block partly duplicates the output schema and the scope line is too terse to be useful rather than wastefully short.

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

Completeness3/5

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

For a four-parameter validation tool with an output schema present, the definition covers what the tool does and roughly how context resolution works, so the agent can call it. The gaps that matter are the missing scope/context value domains and the absence of any routing versus check_script_indentation and the script-level validators, which leaves real ambiguity in a crowded sibling set.

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 0%, so the description must compensate, and it does name all four parameters with a one-line meaning each. However, it gives no value domain for scope (the schema default is "gateway", but no valid scope names are listed) and no valid values for the optional context, and "used for context hints" is too vague to let an agent pick a correct scope without guessing.

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?

The description opens with a specific verb and resource ("Validate Python/Jython syntax") plus an execution qualifier ("locally"), so the agent immediately knows this is a local syntax check rather than a project-wide validation. It never distinguishes itself from nearby siblings such as validate_project_scripts, validate_view_scripts, or check_script_indentation, so the agent must infer the boundary.

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

Usage Guidelines2/5

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

There is no when-to-use or when-not-to-use guidance, and no named alternative. The presence of a body containing a validate-style tool next to check_script_indentation (which appears to be a subset of check_indentation=true) is exactly the ambiguity the description should resolve, and it does not.

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