# evaluate

URL: /business/nouns/action/evaluate · Id: `verb:Action.evaluate` · Call: `await $.Action.evaluate({ … })` (SDK) or the `do` tool at `https://api.sb/mcp`. Inputs says what to pass, Outputs what returns, When it waits who approves.

> Evaluate grades an Action’s output against a rubric and records the verdict as an Event.

Evaluate grades an [Action](/business/nouns/action)’s output against a rubric and records the verdict as an [Event](/business/nouns/event).

## Inputs
| Input | Type | Required | Description |
| --- | --- | --- | --- |
| `action` | [Action](/business/nouns/action) | Yes | The Action whose output is graded. |
| `evaluator` | `string` | Yes | The Evaluator to run. |

## Outputs
| Output | Type | Required | Description |
| --- | --- | --- | --- |
| `verdict` | `json` | Yes | The score and the reasons for it. |
| `action` | [Action](/business/nouns/action) | Yes | The Action graded, with the verdict attached. |

## Effects
- Emits [`Action.evaluated`](/business/events/Action.evaluated).
- Performed by the [Quality Lead](/agents/quality/quality-lead).

## Refuses when
| Check | Error | Fix | Then call |
| --- | --- | --- | --- |
| The input does not match the schema of the operation. | [`invalid-input`](/code/api/errors/invalid-input) | Read the schema of the operation, then send every required field with the right type. | [Action.evaluate](/business/nouns/action/evaluate) |
| The key is valid, but its scopes do not allow this operation. | [`forbidden`](/code/api/errors/forbidden) | Use a key whose scopes cover the operation, or ask an owner of the namespace to grant them. | [Action.evaluate](/business/nouns/action/evaluate) |

## When it waits
| Gate | Default |
| --- | --- |
| Decision class | Low: two-way, nothing at stake |
| [Delay window](/systems/trust-and-governance/controls/one-way-windows) | None: it runs once review passes. |
| Limit | The call [Limit](/business/nouns/limit) of the [Permission](/business/nouns/permission) it runs under. |
| Over the Limit | It waits `pending` for an [Approval](/business/nouns/approval) from the [Founder](/agents/founding/founder). Approved, it runs; refused, it ends `refused` with [`limit-exceeded`](/code/api/errors/limit-exceeded); unanswered by its deadline, it ends `canceled`. |

## Example

**Ask**

```text
Evaluate the latest action.
```

**API**

```bash
curl -X POST https://api.sb/routewise.dev/actions/action_1/evaluate \
  -H "Authorization: Bearer $STARTUP_BUILDER_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"evaluator":"Example evaluator"}'
```

```json
{
  "api": "https://api.sb/routewise.dev",
  "verdict": {},
  "action": {
    "$id": "https://api.sb/routewise.dev/actions/action_1",
    "$type": "Action",
    "status": "done",
    "mode": "try",
    "operation": "Action.evaluate"
  },
  "links": {
    "self": "https://api.sb/routewise.dev/actions/action_1"
  }
}
```

**SDK**

```ts
import { $ } from 'startup-builder'

const { verdict, action } = await $.Action.evaluate({ action: 'action_1', evaluator: 'Example evaluator' })
```

**CLI**

```bash
npx startup-builder do Action.evaluate --json '{"action":"action_1","evaluator":"Example evaluator"}'
```

**MCP**

```json
{
  "name": "do",
  "arguments": {
    "code": "return await $.Action.evaluate({ action: 'action_1', evaluator: 'Example evaluator' })"
  }
}
```