Skip to main content
Glama

event_case

Sets the event handled by an Event Structure frame, for a front-panel control event or a VI/app event, and replaces that frame's existing events.

Instructions

Make frame frame of an Event Structure (a.vi%GObject|EV) handle event: of a front-panel control (control="a.vi%Control|Stop", event "Value Change", "Mouse Down", ...) or, without control, of the VI/app ("Timeout", "Panel Close?", ...). Replaces that frame's events. Add frames first with invoke(target, "Add Frame"). An unknown name lists them all.

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": {
      "target": "<target>",
      "frame": "<frame>",
      "event": "<event>"
    },
    "name": "event_case"
  }
}

Input Schema

NameRequiredDescriptionDefault
eventYes
frameYes
targetYes
controlNo

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.1/5.0
Behavior4/5

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

With no annotations, the description carries the burden and does disclose the critical mutating behavior: it *replaces* that frame's events rather than appending, which is exactly the kind of destructive semantics an agent needs. It also gives a fallback behavior for unknown names. It omits prerequisites such as needing a valid target VI/frame index or what happens on out-of-range frames.

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?

Three sentences, front-loaded with the core action, then the prerequisite and the fallback behavior. The telegraphic, symbol-heavy phrasing (`a.vi%GObject|EV`) is dense but each clause carries information.

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?

An output schema exists, so return values need not be described. For a 4-parameter mutation tool with zero schema descriptions, the description covers action, scope, replacement semantics, prerequisites, and error recovery — close to complete, with only `target` semantics and failure modes left implicit.

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 coverage is 0%, so the description must compensate. It conveys `frame` (index), `event` (names like "Value Change", "Mouse Down", "Timeout"), and `control` (optional, formatted as `a.vi%Control|Stop`), but `target` is only implied via the path-like examples and never explained directly. Partial compensation, not full.

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 concrete verb+resource pair: set which event a given frame of an Event Structure handles. It scopes the tool precisely (frame of an Event Structure, optional control vs. VI/app events) and is clearly distinct from generic siblings like `invoke` or `case`.

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?

Tells the agent to create frames first via `invoke(target, "Add Frame")`, and notes that passing an unknown event name lists the available ones — an effective discovery path. It does not state when *not* to use it (e.g. editing an existing frame's events vs. adding a new one), so it falls short of full when/when-not guidance.

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