Skip to main content
Glama

cook

Destructive

Run Houdini node evaluations and simulations over frames, write parameters, manage caches, and rerun failing nodes to return errors, warnings, counts, bounds, and per-frame timing.

Instructions

Force work to happen, and report what the work said and what it cost.

Modes: cook, cache_write, cache_clear, sim_step, sim_reset, recook.

Use it to run a test: write a few parameters, cook a range of frames, and
read the seconds for each frame. That is one call, and it is the loop that
every look iteration needs.

Do not use it to read the result: geometry_inspect does that, and it cooks
the node as well.

mode:
    "cook"        — cook the nodes and return the errors, the warnings and
                    the time. `frames` or `frame_range` cooks over more
                    than one frame; the playbar goes back to where it was.
    "cache_write" — write the file cache of the node. frame_range is
                    [start, end]; without it the node writes its own range.
    "cache_clear" — remove the cached files of the node.
    "sim_step"    — step a DOP network num_steps frames.
    "sim_reset"   — clear the cache of a simulation, so that the next cook
                    runs it again. It accepts a DOP network and a solver
                    SOP such as a Pyro, FLIP, Vellum or RBD solver. After
                    you change anything inside a solver, reset it: the node
                    gives its old result back with no error and no warning.
                    On a solver SOP it cooks the sources first, cooks the
                    start frame after the reset, and reports the
                    primitives there. It fails when the result is empty
                    while the sources are not: that simulation stays
                    empty on every frame.
    "recook"      — cook again each node at or under `paths` that holds
                    an error or a warning, the deepest first, and say
                    which messages were stale (gone) and which are
                    current. Use it when an error names a cause that the
                    network does not have, such as "Infinite recursion"
                    with no cycle.

Cook frames here, not in an execute loop of hou.setFrame and geometry():
the viewport cooks the same nodes during the loop, and that can leave
false errors on the nodes inside a solver.

Returns JSON: the seconds in total, for each frame, and the slowest frame,
with the errors and the warnings of every node. Each frame also gives the
point count, the primitive count and the bounds of each SOP: one call
checks that a result moves or grows over a range. `ok` is false when a
node failed to cook, and `failed` then names each node upstream of it or
inside it that holds an error, with the text: the node that broke is
often another node than the one you cooked. A cook, a cache or a
simulation can take hours, and the call waits for it: a client that reads
MCP tasks gets a task at once and polls it. Houdini answers no other call
until the cook ends; session action='interrupt' stops it.

Input Schema

NameRequiredDescriptionDefault
modeNoOne of "cook", "cache_write", "cache_clear", "sim_step", "sim_reset", "recook". The description says what each one does.cook
forceNoCook even when Houdini thinks the node is up to date.
pathsYesThe node to cook, or a list of nodes.
framesNoOne frame, a list of frames, or {"start": 1001, "end": 1010, "step": 2}. For cook. The playbar goes back after.
num_stepsNoHow many frames sim_step steps the DOP network.
parametersNoValues to write before the cook, as {"/obj/geo1/pyro": {"divsize": 0.05}}. The result says which writes changed nothing.
frame_rangeNo[start, end]: every frame between. For cook and cache_write.

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv0.8.0
    • changedInput schema / properties / mode / description
      Previous value: -"One of \"cook\", \"cache_write\", \"cache_clear\", \"sim_step\", \"sim_reset\". The description says what each one does."New value: +"One of \"cook\", \"cache_write\", \"cache_clear\", \"sim_step\", \"sim_reset\", \"recook\". The description says what each one does."
  2. Changed31 schema fields changedv0.7.3
    • removedInput schema / properties / force / anyOf
      Removed value: -[
      -  {
      -    "type": "boolean"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • addedInput schema / properties / force / description
      Added value: +"Cook even when Houdini thinks the node is up to date."
    • removedInput schema / properties / force / title
      Removed value: -"Force"
    • addedInput schema / properties / force / type
      Added value: +"boolean"
    • removedInput schema / properties / frame_range / anyOf
      Removed value: -[
      -  {
      -    "items": {
      -      "type": "number"
      -    },
      -    "type": "array"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • removedInput schema / properties / frame_range / default
      Removed value: -null
    • addedInput schema / properties / frame_range / description
      Added value: +"[start, end]: every frame between. For cook and cache_write."
    • addedInput schema / properties / frame_range / items
      Added value: +{
      +  "type": "number"
      +}
    • removedInput schema / properties / frame_range / title
      Removed value: -"Frame Range"
    • addedInput schema / properties / frame_range / type
      Added value: +"array"
    • changedInput schema / properties / frames / anyOf
      Previous value: -[
      -  {
      -    "type": "number"
      -  },
      -  {
      -    "items": {
      -      "type": "number"
      -    },
      -    "type": "array"
      -  },
      -  {
      -    "additionalProperties": {
      -      "type": "number"
      -    },
      -    "type": "object"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]New value: +[
      +  {
      +    "type": "number"
      +  },
      +  {
      +    "items": {
      +      "type": "number"
      +    },
      +    "type": "array"
      +  },
      +  {
      +    "additionalProperties": {
      +      "type": "number"
      +    },
      +    "type": "object"
      +  }
      +]
    • removedInput schema / properties / frames / default
      Removed value: -null
    • addedInput schema / properties / frames / description
      Added value: +"One frame, a list of frames, or {\"start\": 1001, \"end\": 1010, \"step\": 2}. For cook. The playbar goes back after."
    • removedInput schema / properties / frames / title
      Removed value: -"Frames"
    • removedInput schema / properties / mode / anyOf
      Removed value: -[
      -  {
      -    "type": "string"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • addedInput schema / properties / mode / description
      Added value: +"One of \"cook\", \"cache_write\", \"cache_clear\", \"sim_step\", \"sim_reset\". The description says what each one does."
    • removedInput schema / properties / mode / title
      Removed value: -"Mode"
    • addedInput schema / properties / mode / type
      Added value: +"string"
    • removedInput schema / properties / num_steps / anyOf
      Removed value: -[
      -  {
      -    "type": "integer"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • addedInput schema / properties / num_steps / description
      Added value: +"How many frames sim_step steps the DOP network."
    • removedInput schema / properties / num_steps / title
      Removed value: -"Num Steps"
    • addedInput schema / properties / num_steps / type
      Added value: +"integer"
    • addedInput schema / properties / parameters / additionalProperties
      Added value: +{
      +  "additionalProperties": true,
      +  "type": "object"
      +}
    • removedInput schema / properties / parameters / anyOf
      Removed value: -[
      -  {
      -    "additionalProperties": {
      -      "additionalProperties": true,
      -      "type": "object"
      -    },
      -    "type": "object"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • removedInput schema / properties / parameters / default
      Removed value: -null
    • addedInput schema / properties / parameters / description
      Added value: +"Values to write before the cook, as {\"/obj/geo1/pyro\": {\"divsize\": 0.05}}. The result says which writes changed nothing."
    • removedInput schema / properties / parameters / title
      Removed value: -"Parameters"
    • addedInput schema / properties / parameters / type
      Added value: +"object"
    • addedInput schema / properties / paths / description
      Added value: +"The node to cook, or a list of nodes."
    • removedInput schema / properties / paths / title
      Removed value: -"Paths"
    • removedInput schema / title
      Removed value: -"toolArguments"
  3. Addedv0.1.1

TDQS

A4.4/5.0
Behavior3/5

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

Annotations already declare destructiveHint=true, readOnlyHint=false and idempotentHint=false, and the description is consistent with them: cache_clear removes cached files, sim_reset discards simulation state. It also adds genuinely valuable behavior that annotations cannot express: cooks can take hours, the call blocks, Houdini answers no other call until the cook ends, MCP task clients get a task immediately, and session action='interrupt' stops it. That blocking/interrupt information is non-obvious operational behavior beyond the schema.

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?

Front-loaded with modes, then usage, then returns; each mode entry is a tight line. It runs long, and the 'Returns JSON' paragraph partly duplicates the output schema that already exists, which is the only real waste. The opening metaphor costs a sentence before the concrete content arrives.

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

Completeness5/5

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

For a 7-parameter, six-mode, destructive and potentially hours-long blocking tool, the description covers everything an agent needs: mode semantics, the stale-error/recook case, sim_reset's silent-stale-result trap, failure reporting through 'failed', and how to interrupt. Output shape is covered by the output schema, so the description need not carry it.

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 coverage is 100%, so the baseline is 3. The description earns a step above by explaining what each mode value actually does (schema only lists the strings), what frames/frame_range do across modes and that the playbar is restored, and that parameter writes report which ones changed nothing. It adds real semantics rather than restating field descriptions.

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?

The opening sentence is stylized, but the mode list immediately pins down concrete verbs and resources: cook nodes, write/clear file caches, step/reset DOP simulations, recook errored nodes. It explicitly contrasts itself with geometry_inspect ('Do not use it to read the result'), so an agent can separate it from siblings without opening the schema.

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?

It gives an explicit positive recipe ('write a few parameters, cook a range of frames, and read the seconds'), an explicit exclusion with the named alternative (geometry_inspect for reading results), and an explicit anti-pattern ('Cook frames here, not in an execute loop of hou.setFrame and geometry()') with the reason. When-not guidance is as strong as when guidance.

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