run_gh_definition
Run an audited Grasshopper capsule in Rhino by providing inputs validated against its manifest, returning computed outputs, warnings, and analysis method.
Instructions
Runs an audited Grasshopper capsule (GH definition + typed contract) through the Rhino bridge and returns its declared outputs.
Workflow: call list_capsules() first to pick a capsule_id and see its input/ output port names. Create any geometry with execute_rhino_script, then pass the returned GUIDs here. Inputs are validated client-side against the capsule manifest before anything is sent to Rhino, so errors from this tool name the exact port at fault.
Input value forms (keyed by the exact ALMOND_IN_* port name):
Geometry ports (point/curve/mesh/brep and their [] list forms): {"guids": ["", ...]} referencing objects already in the Rhino document.
number / integer / string / bool ports: the raw JSON value.
number[] / integer[] / string[] ports: a flat JSON list. Units are declared per port in the manifest — supply values in those units; nothing is guessed or auto-converted client-side. Optional inputs may be omitted; the capsule's declared defaults then apply inside the definition.
Only audited capsules run. audited=false means the GHX has no verified ALMOND_IN_*/ALMOND_OUT_* harness params yet; this tool refuses it (see capsules/AUTHORING.md for how to harness one).
The response's "outputs" object is keyed by ALMOND_OUT_* names; interpret each value using the manifest's semantics field (e.g. max_nodal_displacement, per_element_utilization) and declared units. The response also carries analysis_method (api|template|rule_based), confidence (high|medium|low), warnings, and baked_guids — report method and confidence honestly; rule_based/low means an estimate, not FEA.
Args: capsule_id: Stable capsule identifier from list_capsules (e.g. "karamba_beam_v1"). inputs: Object mapping ALMOND_IN_* port names to values (forms above). seed: Optional integer seed for stochastic definitions; omit for deterministic ones. timeout_s: Solver budget in seconds (default 60, max 600). Returns: JSON with status, capsule_id, outputs, baked_guids, analysis_method, confidence, warnings, and error — or a validation error naming the offending input and the valid port names.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| seed | No | ||
| inputs | Yes | ||
| timeout_s | No | ||
| capsule_id | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |