# State Machine Designer — REST API endpoint `state-machine-designer`

Validate a finite state machine given as nodes and edges and return a normalized machine config plus issues. Checks for missing ids, dangling transitions, duplicate labels, missing or multiple initial states, unreachable states, and outgoing transitions from final states. The config matches the designer's "Export Code" output ({ id, initial, states: { State: { EVENT: Target } } }).

- Category: validation
- MCP server: https://mcp.findutils.com/ (Streamable HTTP, no API keys, 120 req/min per IP)
- REST endpoint: POST https://api.findutils.com/api/tools/state-machine-designer/execute (no API keys, 60 req/min per IP)
- Reference page: https://findutils.com/api/state-machine-designer/
- Same tool on the other surface: https://findutils.com/mcp/state-machine-designer/

## Call the endpoint (verified example)

```bash
curl -X POST https://api.findutils.com/api/tools/state-machine-designer/execute \
  -H "Content-Type: application/json" \
  -d '{
    "nodes": [
      {
        "id": "s1",
        "data": {
          "label": "Idle",
          "stateType": "initial"
        }
      },
      {
        "id": "s2",
        "data": {
          "label": "Done",
          "stateType": "final"
        }
      }
    ],
    "edges": [
      {
        "source": "s1",
        "target": "s2",
        "label": "FINISH"
      }
    ]
  }'

# Parameter schema
curl https://api.findutils.com/api/tools/state-machine-designer
```

## Input schema

| Argument | Type | Required | Description |
|---|---|---|---|
| `nodes` | array | yes | States: [{ id, data: { label, stateType: initial\|normal\|final, description? } }]. Flat { id, label, stateType } objects are also accepted. |
| `edges` | array | yes | Transitions: [{ source, target, label }] where label is the event name (uppercased in the config; "EVENT" when missing). |
| `machine_id` | string | no | Id written into the config. Default: "stateMachine". Default: `"stateMachine"`. |

Example arguments (verified):

```json
{
  "nodes": [
    {
      "id": "s1",
      "data": {
        "label": "Idle",
        "stateType": "initial"
      }
    },
    {
      "id": "s2",
      "data": {
        "label": "Done",
        "stateType": "final"
      }
    }
  ],
  "edges": [
    {
      "source": "s1",
      "target": "s2",
      "label": "FINISH"
    }
  ]
}
```

OpenAPI 3.1 spec: https://findutils.com/api/openapi.json · Interactive docs: https://findutils.com/api/docs/

## Also an MCP tool

```bash
claude mcp add findutils --transport http https://mcp.findutils.com/
```

Then ask the client to call `findutils:state_machine_designer`. Full MCP reference: https://findutils.com/mcp/state-machine-designer/

---
Full catalog: GET https://api.findutils.com/api/tools · https://findutils.com/api/ · https://findutils.com/llms.txt
