# Create eval

Tool: `veryfront__create_eval`

Create an eval source file in the project source or a preview branch to test an agent against a dataset and metrics; returns the eval source document. Requires project.evals.write.

## Arguments

| Name                 | Type                  | Required | Description                                                     |
| -------------------- | --------------------- | -------- | --------------------------------------------------------------- |
| `project_reference`  | string · min length 1 |          | Project identifier or slug that scopes the tool call.           |
| `name`               | string · min length 1 | Yes      | Human-readable eval name; the eval id is derived from it.       |
| `description`        | string                |          | Optional short description of what the eval checks.             |
| `target`             | string · min length 1 | Yes      | Identifier of the agent the eval runs against.                  |
| `dataset`            | object                | Yes      | The examples the eval runs: inline examples or a dataset file.  |
| `metrics`            | array of object       |          | The metrics that score each example. Defaults to none.          |
| `repetitions`        | integer · default 1   |          | How often each example runs. Defaults to 1.                     |
| `tags`               | array of string       |          | Labels for the eval. Defaults to none.                          |
| `metadata`           | object                |          | Free-form JSON object stored with the eval. Defaults to empty.  |
| `source_target_kind` | string                |          | Source to use: project or preview\_branch. Defaults to project. |
| `target_branch_id`   | string · uuid \| null |          | Preview branch to use when the target kind is preview\_branch.  |

## Responses

| Status | Description                                           |
| ------ | ----------------------------------------------------- |
| 200    | The tool ran; its output is result.structuredContent. |

## Call it

```bash
curl -X POST -N "https://api.veryfront.com/mcp" \
  -H "Authorization: Bearer $VERYFRONT_API_KEY" \
  -H "Accept: application/json, text/event-stream" \
  -H "Content-Type: application/json" \
  -d '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "veryfront__create_eval",
    "arguments": {
      "name": "string",
      "target": "string",
      "dataset": {
        "kind": "inline",
        "editable": false,
        "dynamic": false
      }
    }
  }
}'
```

## Example response

```json
{
  "jsonrpc": "2.0",
  "id": 1,
  "result": {
    "content": [
      {
        "type": "text",
        "text": "{\"id\":\"string\",\"name\":\"string\",\"description\":\"string\",\"target_kind\":\"agent\",\"target\":\"string\",\"source_path\":\"string\",\"export_name\":\"string\",\"dataset\":{\"kind\":\"inline\",\"path\":\"string\",\"examples\":[{\"id\":\"string\",\"input\":null,\"reference\":null,\"metadata\":{}}],\"editable\":false,\"dynamic\":false},\"metrics\":[{\"name\":\"string\",\"family\":\"answer\",\"severity\":\"gate\",\"threshold\":{\"min\":0,\"max\":0},\"config\":{},\"editable\":false,\"dynamic\":false}],\"repetitions\":1,\"tags\":[\"string\"],\"metadata\":{},\"editable_fields\":[\"name\"],\"dynamic_fields\":[\"name\"],\"capabilities\":[\"string\"],\"source\":\"string\",\"edit_mode\":\"structured\",\"source_only_reasons\":[\"string\"]}"
      }
    ],
    "structuredContent": {
      "id": "string",
      "name": "string",
      "description": "string",
      "target_kind": "agent",
      "target": "string",
      "source_path": "string",
      "export_name": "string",
      "dataset": {
        "kind": "inline",
        "path": "string",
        "examples": [
          {
            "id": "string",
            "input": null,
            "reference": null,
            "metadata": {}
          }
        ],
        "editable": false,
        "dynamic": false
      },
      "metrics": [
        {
          "name": "string",
          "family": "answer",
          "severity": "gate",
          "threshold": {
            "min": 0,
            "max": 0
          },
          "config": {},
          "editable": false,
          "dynamic": false
        }
      ],
      "repetitions": 1,
      "tags": [
        "string"
      ],
      "metadata": {},
      "editable_fields": [
        "name"
      ],
      "dynamic_fields": [
        "name"
      ],
      "capabilities": [
        "string"
      ],
      "source": "string",
      "edit_mode": "structured",
      "source_only_reasons": [
        "string"
      ]
    }
  }
}
```
