Skip to main content
Glama

press_button

Press a node's button parameter, such as Stash Input or Reload Geometry, then read its errors and warnings. Press across multiple nodes in one undoable batch, optionally cooking first.

Instructions

Press a button parameter — "Stash Input", "Reload Geometry", an asset's own Build button — and read the node's errors and warnings afterwards.

The call holds until the callback returns, with no deadline. A callback that opens a dialog blocks Houdini's main thread and this bridge with it; read the button's script first if in doubt. A Python callback that RAISES does not hang anything: the bridge runs it rather than pressButton(), and its error comes back as this call's error. callback_route says how the press ran: python, hscript or native (a built-in action). For a Save to Disk or a render use write_cache / start_render, which report a verdict.

A press usually only dirties the node, so errors/warnings are from its last cook unless cook=True; without it needs_cook says whether they are stale (a cook that failed leaves it True too). has_script_callback is False for built-in buttons that still do work (File's Reload, Stash's Stash Input).

A parm that is not a button and has no callback is refused: pressing it does nothing. The small action button beside a field ("Create spare parameters" on a VEXpression) runs with action=True; an action that opens a picker holds the bridge like a dialog does.

node_paths presses the same button on each node in turn (results[] per node), and set_first writes parameters on each node before its press, as set_parameters does: {"aovs": 0} then Add AOVs on eight File COPs is one call. Every node, button and parameter is checked before anything is written; the batch is one undo step and stops at a failing press, naming the nodes already pressed.

Args: node_path: Node that owns the button. parm_name: The button parameter's name. arguments: Optional kwargs handed to the callback script; values must be int, bool, float or str. cook: Cook the node after the press so errors describe the result. action: Run the parm's action button (script_action) instead of its callback. node_paths: Press the same button on each of these nodes instead of node_path. set_first: Parameter values written on each node before its press.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "press_button"
  }
}

Input Schema

NameRequiredDescriptionDefault
cookNo
actionNo
argumentsNo
node_pathNo
parm_nameNo
set_firstNo
node_pathsNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed9 schema fields changedv2.29.0
    • addedInput schema / properties / node_path / anyOf
      Added value: +[
      +  {
      +    "type": "string"
      +  },
      +  {
      +    "type": "null"
      +  }
      +]
    • addedInput schema / properties / node_path / default
      Added value: +null
    • removedInput schema / properties / node_path / type
      Removed value: -"string"
    • addedInput schema / properties / node_paths
      Added value: +{
      +  "anyOf": [
      +    {
      +      "items": {
      +        "type": "string"
      +      },
      +      "type": "array"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "title": "Node Paths"
      +}
    • addedInput schema / properties / parm_name / anyOf
      Added value: +[
      +  {
      +    "type": "string"
      +  },
      +  {
      +    "type": "null"
      +  }
      +]
    • addedInput schema / properties / parm_name / default
      Added value: +null
    • removedInput schema / properties / parm_name / type
      Removed value: -"string"
    • addedInput schema / properties / set_first
      Added value: +{
      +  "anyOf": [
      +    {
      +      "additionalProperties": true,
      +      "type": "object"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "title": "Set First"
      +}
    • removedInput schema / required
      Removed value: -[
      -  "node_path",
      -  "parm_name"
      -]
  2. Changed2 schema fields changedv2.24.1
    • addedInput schema / additionalProperties
      Added value: +false
    • addedInput schema / properties / action
      Added value: +{
      +  "default": false,
      +  "title": "Action",
      +  "type": "boolean"
      +}
  3. Addedv2.18.0

TDQS

A4.8/5.0
Behavior5/5

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

With no annotations, the description carries the full load and does so: it discloses the unbounded blocking wait, that a dialog-opening callback freezes Houdini's main thread and the bridge, that a raising Python callback is routed separately and surfaces as the call's error, and the dirty-node/cook staleness semantics of returned errors and needs_cook. Batch behavior is also explicit — pre-validation of every node, button and parameter, a single undo step, and stopping at a failing press while naming nodes already pressed.

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 core action and its main hazard are front-loaded, and nearly every sentence carries unique information. Some passages are dense to the point of being hard to parse on first read, notably the single sentence chaining cook, last-cook staleness, needs_cook, and the failed-cook case.

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 complex blocking tool with no annotations and no output schema, the description covers behavior, refusal cases, batch semantics, and the names of returned fields (errors, warnings, needs_cook, has_script_callback, callback_route, results[]). It stops short of describing the shape of those return fields, which an agent must infer at call time.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0% and the description compensates fully with an Args block covering all seven parameters, including value-type constraints on arguments (int, bool, float, str), the difference between action=True (script_action) and the callback, and node_paths as a per-node alternative to node_path with a results[] entry per node. The set_first example ({"aovs": 0} then Add AOVs across eight File COPs) makes the interaction between parameters concrete.

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 with concrete examples ("Stash Input", "Reload Geometry", an asset's Build button) and adds the follow-up effect of reading errors/warnings. It is immediately distinguishable from siblings like write_cache and start_render, which the description names.

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 alternative routing with conditions: "For a Save to Disk or a render use write_cache / start_render, which report a verdict," and points to set_parameters semantics for pre-writing values. It also supplies a negative case — a parm that is not a button and has no callback is refused — plus advice to read the button's script first when a dialog might block.

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