Skip to main content
Glama

get_event_script

Read a component's event handler script to inspect the code bound to events like onActionPerformed. Use it to review existing logic before editing in Ignition projects.

Instructions

Read one component event handler.

Args: view_path: View containing the component. component: Component meta.name. event: Event key, such as onActionPerformed. project: Project name; defaults to the active project.

Returns: The event handler object.

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": {
      "view_path": "<view_path>",
      "component": "<component>",
      "event": "<event>"
    },
    "name": "get_event_script"
  }
}

Input Schema

NameRequiredDescriptionDefault
eventYes
projectNo
componentYes
view_pathYes

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

B3.4/5.0
Behavior3/5

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

With no annotations supplied, the description carries the full burden. It clearly signals a read operation and states the return value, but says nothing about permissions, what happens when the component or event key does not exist, or how the handler is located across projects.

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 Args/Returns structure is front-loaded and each line maps to a real parameter or the return value. Slightly formulaic docstring formatting, but no wasted sentences.

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 four-parameter read-only getter with an existing output schema, the definition covers every parameter and the identity of the returned object. Only failure-mode behavior and authorization context are absent, which are minor for this tool's complexity.

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 0%, so the description must compensate, and it does: it explains component as the component's meta.name, gives a concrete event key example (onActionPerformed), and states that project defaults to the active project. This meaningfully exceeds the bare schema titles.

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 gives a specific verb and resource: 'Read one component event handler.' The word 'one' implicitly distinguishes it from bulk siblings like find_event_scripts, but no sibling is named, so the differentiation is left to inference.

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 explicit guidance on when to use this versus alternatives such as find_event_scripts or read_project_script, nor any prerequisites or exclusions. Usage can only be inferred from the verb and the singular object.

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