Skip to main content
Glama

add_style_class_to_component

Add a style class to a specified component in an Ignition Perspective view, with optional dry-run preview and confirmation before writing changes.

Instructions

Add a style class to a component.

Args: view_path: View containing the component. component_name: Component meta.name. style_class: Style class to add. project: Project name; defaults to the active project. confirm: Must be True to write. dry_run: Preview the change without writing.

Returns: The updated component or a preview payload.

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_name": "<component_name>",
      "style_class": "<style_class>"
    },
    "name": "add_style_class_to_component"
  }
}

Input Schema

NameRequiredDescriptionDefault
confirmNo
dry_runNo
projectNo
view_pathYes
style_classYes
component_nameYes

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, the description carries the full burden, and it does disclose two meaningful traits: a write gate ('confirm must be True to write') and a non-writing preview mode (dry_run). It omits what happens if the class already exists, whether the change is reversible, permission requirements, and error behavior for a mutation tool.

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?

The docstring form is front-loaded with the one-line purpose, then compact Args and Returns blocks. Every line carries information and none is redundant with the schema titles.

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?

All parameters and the return payload are addressed, and an output schema exists so return detail is not required. For a six-parameter mutation with zero annotations, though, it should also cover preconditions (does the style class need to exist?), idempotency, and failure behavior.

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 documents all six parameters including the semantics the schema cannot express: component_name maps to ``meta.name``, project defaults to the active project, confirm gates the write, and dry_run previews. It adds real meaning, though view_path's expected format remains underspecified.

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: 'Add a style class to a component.' An agent immediately knows the operation and target object. It does not, however, contrast itself with near-siblings like add_custom_property or add_icon, so it stops short of full differentiation.

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 when-to-use or when-not-to-use guidance, and no alternatives are named. The only workflow hints are the parameter-level notes that confirm must be True to write and dry_run previews, which is implied usage rather than guidance.

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