# lg_evals_add: Add an eval case

Add an eval case to an agent: an input and what a good result looks like.

- **Changes data:** yes
- **Credential scope:** `settings:write` (an API key's scopes, or what you allowed when connecting with OAuth)
- **Assistant level:** an assistant at Read and draft or above

## Inputs

| Field | Type | Required | Notes |
|---|---|---|---|
| `id` | string | yes |  |
| `body` | object (name, input, expect) | yes |  |
| `body.name` | string | yes |  |
| `body.input` | object | no |  |
| `body.expect` | object (status, waits_for_approval, steps) | no |  |
| `body.expect.status` | "succeeded" \\| "failed" \\| "waiting_approval" | no |  |
| `body.expect.waits_for_approval` | boolean | no |  |
| `body.expect.steps` | object | no |  |

## Example MCP call

A `tools/call` request to `https://manage.restolayer.com/mcp`:

```json
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "lg_evals_add",
    "arguments": {
      "id": "agt_01HZXEXAMPLE",
      "body": {
        "name": "Brief is sent",
        "input": {},
        "expect": {}
      }
    }
  }
}
```

## Example REST call

The same thing over REST (`POST /v1/agents/:id/evals`):

```bash
curl -s -X POST "https://manage.restolayer.com/v1/agents/agt_01HZXEXAMPLE/evals" \
  -H "Authorization: Bearer $LG_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"name":"Brief is sent","input":{},"expect":{}}'
```

All tools: [MCP tools](https://www.restolayer.com/docs/mcp/tools). Connecting: [connect your assistant](https://www.restolayer.com/docs/connect).
