> ## Documentation Index
> Fetch the complete documentation index at: https://docs.gethinto.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Automation rules over MCP

> Let a coding agent build, check, rehearse and turn on automation rules through the Hinto MCP.

A coding agent connected to the Hinto MCP can do everything a person can do on the Automations canvas: create a rule, change it, check it, rehearse it on recent tickets, put rules in order, and ask before anything acts. Every change goes through the same checks as the canvas and appears in the rule's history with the name of the person it acts for.

## Connect

Use either of these:

* **Sign in with OAuth.** Add `https://api.gethinto.com/v1/mcp` to your agent and sign in when it asks. The connection acts as you.
* **A secret key.** An admin chooses **New secret key** in Settings > API keys and gives it a name. The key (`hinto_sk_…`) is shown once. Send it as `Authorization: Bearer <key>`. It reads tickets, investigations, and sessions, and it changes rules as the admin who created it, so each change is recorded under that admin's name. Tools that need a person signed in with OAuth, such as approving a reply, are not available to it. If that admin leaves the workspace, the key keeps working for everything else, but Hinto refuses its rule changes: create a new secret key. Never use the publishable key here.

## How a rule works

A rule starts on one or more **triggers**: a new ticket arrives, a customer replies, the status changes, labels, assignee or priority change, an investigation finishes, or an investigation fails. `repeat` says whether it acts once per ticket (the default) or every time.

Then come up to four **paths**. Hinto runs the first path whose conditions pass:

* A path holds up to four **groups**. The path passes when any group passes.
* A group holds up to eight **conditions**. The group passes when all of them pass.
* A path with no groups is **Otherwise**. It runs when no path above it matches, and it goes last.

Each path has up to eight **steps**, run in order. A step is an action, or a **wait** that pauses the path and, when it wakes, goes on only if its checks still hold, for example "your team didn't reply".

A condition is exact (channel, status, priority, assignee, customer, sender, labels, company, words in the subject or message, who wrote last, what changed, and Hinto's triage and investigation scores) or written in plain English and judged by Hinto. A rule has at most three plain-English conditions.

Text in an email, Slack post, note, reply or webhook body can use variables: `{{ticket.title}}`, `{{ticket.number}}`, `{{ticket.url}}`, `{{ticket.status}}`, `{{customer.name}}`, `{{company.name}}`, `{{investigation.cause}}`, `{{investigation.confidence}}` and `{{rule.name}}`. A variable Hinto doesn't know is refused when you save. A value Hinto doesn't have is left empty.

## The tools

| Tool | What it does |
| - | - |
| `get_automation_catalog` | Every trigger, condition and step with its fields, the limits, the variables, the edit operations, example rules, and your workspace's teammates, channels, labels, companies and customers. Read it first. |
| `validate_automation` | Checks a definition without saving it: the rule sentence, each issue with the path of the card it is about, and whether it is ready to turn on. |
| `create_automation` | Creates a rule, off, from a definition or an example. |
| `update_automation` | Changes a rule from the version you read, with a new definition or with edit operations addressed by card id. |
| `rehearse_automation` | Tries a saved rule or an unsaved definition on the last 30 matching events. Nothing acts. |
| `set_automation_state` | Turns a rule off, to rehearsing, or on. |
| `reorder_automations` | Sets the order rules run in, top first. A rule with a **Stop other rules** step stops the ones below it. |
| `propose_automation` | Turns a sentence into a proposed rule or change. It saves nothing. |
| `list_automations`, `get_automation`, `list_automation_runs`, `get_rehearsal`, `list_automation_versions`, `restore_automation_version`, `duplicate_automation`, `delete_automation` | Read rules, their runs and history, restore a version, copy or delete a rule. |

## Ask before anything acts

Some calls return `confirmation_required` with a summary instead of acting: turning a rule on, changing a rule that is on, and deleting a rule. Show the person the summary, then call again with `confirm: true`. A rule that replies to customers or sends a webhook includes a rendered sample of the reply and the webhook's address in that summary.

Hinto replies to a customer only from a rule step a person added. Don't add a reply unless the person asked for one.

## Webhooks

A **Send a webhook** step posts JSON to an `https://` address that is not on a private network, waits up to 5 seconds, and is never retried. Each request carries `x-hinto-timestamp`, `x-hinto-delivery-id` and `x-hinto-signature`, an HMAC-SHA256 of `v1:{timestamp}:{body}` with your workspace's webhook secret, prefixed `v1=`. An admin copies the secret from the rule's menu on the Automations page.

## The built-in investigation rule

Every workspace has a rule named **Investigate new tickets**. It starts Hinto's investigation when a new ticket arrives. You can narrow it with exact conditions or turn it off. You can't delete it, and it can't hold other steps. Re-run on a ticket always works.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.