---
name: jifto
description: Use whenever the user mentions jifto, or asks for terrain modelling, cut and fill, sunlight, daylight, wind, microclimate or stormwater analysis in Rhino. jifto is a Rhino 8 plug-in; inside Rhino (Raven, Rhino MCP run_python) it is already loaded and reached with the Python script in this skill, outside Rhino through its MCP server. It models terrain (pads, paths, ponds, cut and fill), plants trees over whole sites in one call, runs analyses as jobs, reads their numbers, captures images in jifto's report look and writes HTML reports.
---

# jifto for agents

Full guide: https://jifto.com/agents/

Inside Rhino (Raven, Rhino MCP `run_python`, a Rhino Python script), jifto is already loaded: there
is no server, token or install. Run this script first. It reaches jifto, then calls `jifto_status`
(is jifto ready? if not, `not_ready.fix` says what the person must do) and `jifto_help` (the
workflows). If neither reference finds jifto, it is not loaded or is older than 1.5: tell the person.

```python
import clr, json
try:
    clr.AddReference("jifto")
except Exception:
    import System  # not on the search path: use the jifto Rhino has already loaded
    loaded = [a for a in System.AppDomain.CurrentDomain.GetAssemblies() if a.GetName().Name == "jifto"]
    if not loaded:
        raise RuntimeError("jifto is not loaded in this Rhino, or is older than 1.5: tell the person.")
    clr.AddReference(loaded[0].Location)
from jifto.Agents import JiftoAgentApi as jifto
def call(tool, **args): return json.loads(jifto.Call(tool, json.dumps(args)))

status = call("jifto_status")  # ready, not_ready.fix, panel_shown, the document's units
print(json.dumps(status, indent=2))
guide = call("jifto_help")     # the orientation and topics; call("jifto_help", topic="terrain-loop") for one
print(guide["topics"])
```

Outside Rhino (Claude Code, Codex, Cursor), the same tools come over **MCP**: jifto's server at
`http://localhost:47110/mcp` with a bearer token. In Rhino, the command `jiftoAgents` prints the exact
settings and copies them. Both ways take the same tools and the same JSON.

## The contract

1. **Every call that changes something returns after the change is applied and readable**, with the
   state it produced. Never sleep or poll between calls: the next call sees the change.
2. **Long analyses are jobs.** `jifto_run` returns a `job_id`; `jifto_job` with `wait_seconds` returns
   as soon as the module says done or failed, with progress in the module's own units (simulated
   minutes of a rain event, solver steps of spin-up and averaging). A job still running when your
   wait ends is not stuck; its progress says how far it got.
3. **Inputs are object ids and values**, never picks. Make objects with `jifto_geometry` (or any Rhino
   tool) and pass their ids.
4. **Coordinates are model units** (`jifto_status` gives the units). Lengths, areas and volumes in
   replies are metres, m² and m³; settings are in the units the panel shows (m, degrees, mm/h, hours).
5. **Errors say what to do instead** (`{"ok": false, "error": ..., "fix": ...}`). Read the fix.

## Tools

| Tool | Use it to |
|---|---|
| `jifto_status` | See what exists: document, units, location, analyses and their jobs, terrains, vegetation. Call first. |
| `jifto_help` | Read a workflow (`topic`) or search jifto's documentation (`query`). |
| `jifto_geometry` | Make and edit Rhino objects by value: boxes, extruded footprints, curves, meshes from heights; move, update (same id), delete; show and hide layers. |
| `jifto_terrain` | Make a terrain from a mesh or closed curve; add pads, paths, ponds, streams, walls; set their settings; measure cut and fill, water held; colour the surface (cut_fill, slope, elevation). |
| `jifto_trees` | Plant a whole terrain in one call (`area`: one ecosystem that keeps off paths and follows the terrain's edits), a line of trees along a curve (`along`), or single trees (`points`). |
| `jifto_analysis` | Give an analysis its surfaces (analysis) and the objects that shade or shelter them (context); the wind domain. |
| `jifto_settings` | Read and change analysis settings, validated and read back (`sunlight.day`, `stormwater.RainIntensity` ...). |
| `jifto_run`, `jifto_job` | Start an analysis job; wait for it, see its progress, cancel it. |
| `jifto_results` | Read a finished result: legend, statistics by band, summary per object, every point to CSV. |
| `jifto_capture` | Save a PNG in jifto's report look (top plan or 3/4 view), with the legend as data. |
| `jifto_report_kit` | Get the HTML report style (CSS, legend and bar components, fonts, logo). |
| `jifto_batch` | Run many calls in one request (loops). |
| `jifto_sync` | Make jifto catch up after you changed Rhino objects some other way. |

## Workflows (jifto_help topic=...)

- `terrain-loop`: terrain, modifiers, and an optimisation loop with cut and fill after every edit.
- `compare-sunlight`: design options compared by sun hours on chosen days.
- `stormwater`: rain on a terrain, ponding, and comparing designs.
- `vegetation`: trees over a whole site, woods inside curves, avenues along paths.
- `wind`: wind around buildings, with a domain.
- `captures`: images that look like jifto's report.
- `html-reports`: an HTML report that answers the question.
- `scripts`: the same from Python inside Rhino.

## Things that trip agents up

- A **pad** follows a structure: give it the platform (a slab whose top is the pad), not the building.
  Its height is the slab's: move the slab to raise the pad.
- A **pond** follows one closed rim curve. Its `Water Level` is the height above its floor and stops
  at the brim; `Depth` is the floor below the rim's lowest point.
- **Paths** have a cross-section, not one width; their curve sets the line.
- Sunlight computes on its **analysis** surfaces. Give buildings as analysis too when facades and roofs
  matter (they still cast shadows); give them as context when only the ground matters.
- A stormwater event lasts `stormwater.SimulationDuration` hours (at least 0.5); the job ends at the
  event's end and the result is the water then.
- Wind needs a domain (`jifto_analysis module=wind domain=...`); without it the job fails and says so.
- **Trees over a site are one call**: `jifto_trees {"type": "deciduous", "area": {"terrain": "Site", "spacing_m": 8}}`,
  as the Vegetation panel's Add → Area. Never compute tree positions and plant them one by one: an
  area ecosystem keeps off paths, pads and ponds and follows the terrain's edits; single trees do neither.
  Woods inside curves: `within`; clearings: `avoid`; rows: `along`.
