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

# Read eval source

> Read the editable source behind one eval before changing it; returns the eval source document with its source text, edit mode and the reasons it can only be edited as source.

`veryfront__read_eval_source`

Requires project.evals.read.

## Access

No external-service connection is required. Use a Veryfront credential with access to the requested resources.

**Call type:** Read-only.

## Arguments

| Field | Type | Required | Description and constraints |
| - | - | - | - |
| `project_reference` | `string` | No | Project identifier or slug that scopes the tool call. Minimum length: `1`. |
| `eval_id` | `string` | Yes | Provide the eval id. Minimum length: `1`. |
| `source_target_kind` | `string` | No | Source to use: project or `preview_branch`. Defaults to project. |
| `target_branch_id` | `string or null` | No | Preview branch to use when the target kind is `preview_branch`. |

## Example request

Send this JSON-RPC request through an initialized MCP client. Replace sample identifiers and values before calling the tool. See [MCP client setup](https://veryfront.com/docs/cloud/getting-started/connect-mcp.md).

```json title="request.json" theme={null}
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "veryfront__read_eval_source",
    "arguments": {
      "eval_id": "example"
    }
  }
}
```

## Result

The published output shape is summarized below. Inspect both the MCP response content and `isError` when handling a call.

| Field | Type | Required | Description and constraints |
| - | - | - | - |
| `id` | `string` | Yes | Eval identifier. |
| `name` | `string` | Yes | Human-readable eval name. |
| `description` | `string or null` | Yes | Short description of what the eval checks, or null. |
| `target_kind` | `string` | Yes | What the eval runs against: always agent. Value: `"agent"`. |
| `target` | `string` | Yes | Identifier of the agent the eval runs against. |
| `source_path` | `string` | Yes | Source file path where the eval definition lives. |
| `export_name` | `string` | Yes | Name of the export that declares the eval in its source file. |
| `dataset` | `object` | Yes | The examples the eval runs. |
| `metrics` | `object[]` | Yes | The metrics that score each example. |
| `repetitions` | `integer` | Yes | How often each example runs. |
| `tags` | `string[]` | Yes | Labels of the eval. |
| `metadata` | `object` | Yes | Free-form JSON object stored with the eval. |
| `editable_fields` | `string[]` | Yes | Fields that [`update_eval`](https://veryfront.com/docs/cloud/mcp/tools/update-eval) can change. |
| `dynamic_fields` | `string[]` | Yes | Fields computed in source, which [`update_eval`](https://veryfront.com/docs/cloud/mcp/tools/update-eval) cannot change. |
| `capabilities` | `string[]` | Yes | Eval capabilities the caller holds on the project. |
| `source` | `string` | Yes | Source text of the eval file. |
| `edit_mode` | `string` | Yes | Editing mode of the eval: structured for field updates, `source_only` for source edits. Values: `"structured"`, `"source_only"`. |
| `source_only_reasons` | `string[]` | Yes | Reasons why the eval can only be edited as source; empty for a structured eval. |

## Full schemas

```json title="input-schema.json" theme={null}
{
  "type": "object",
  "properties": {
    "project_reference": {
      "type": "string",
      "minLength": 1,
      "description": "Project identifier or slug that scopes the tool call."
    },
    "eval_id": {
      "type": "string",
      "minLength": 1,
      "description": "Provide the eval id."
    },
    "source_target_kind": {
      "type": "string",
      "description": "Source to use: project or preview_branch. Defaults to project."
    },
    "target_branch_id": {
      "anyOf": [
        {
          "type": "string",
          "format": "uuid",
          "description": "Provide the target branch id."
        },
        {
          "type": "null",
          "description": "Provide the target branch id."
        }
      ],
      "description": "Preview branch to use when the target kind is preview_branch."
    }
  },
  "required": [
    "eval_id"
  ],
  "additionalProperties": false,
  "$schema": "http://json-schema.org/draft-07/schema#",
  "description": "Arguments for the read_eval_source tool."
}
```

```json title="output-schema.json" theme={null}
{
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "description": "Eval identifier."
    },
    "name": {
      "type": "string",
      "description": "Human-readable eval name."
    },
    "description": {
      "type": [
        "string",
        "null"
      ],
      "description": "Short description of what the eval checks, or null."
    },
    "target_kind": {
      "type": "string",
      "const": "agent",
      "description": "What the eval runs against: always agent."
    },
    "target": {
      "type": "string",
      "description": "Identifier of the agent the eval runs against."
    },
    "source_path": {
      "type": "string",
      "description": "Source file path where the eval definition lives."
    },
    "export_name": {
      "type": "string",
      "description": "Name of the export that declares the eval in its source file."
    },
    "dataset": {
      "type": "object",
      "properties": {
        "kind": {
          "type": "string",
          "enum": [
            "inline",
            "json",
            "jsonl",
            "dynamic"
          ],
          "description": "The kind returned by the tool."
        },
        "path": {
          "type": "string",
          "description": "The path returned by the tool."
        },
        "examples": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "minLength": 1,
                "description": "Unique identifier for the returned record."
              },
              "input": {
                "description": "The input returned by the tool."
              },
              "reference": {
                "description": "The reference returned by the tool."
              },
              "metadata": {
                "type": "object",
                "additionalProperties": {
                  "description": "Additional structured values returned by the tool."
                },
                "description": "Additional structured metadata returned by the tool."
              }
            },
            "required": [
              "id"
            ],
            "additionalProperties": false,
            "description": "One example item returned by the tool."
          },
          "description": "List of examples returned by the tool."
        },
        "editable": {
          "type": "boolean",
          "description": "The editable returned by the tool."
        },
        "dynamic": {
          "type": "boolean",
          "description": "The dynamic returned by the tool."
        }
      },
      "required": [
        "kind",
        "editable",
        "dynamic"
      ],
      "additionalProperties": false,
      "description": "The examples the eval runs."
    },
    "metrics": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "minLength": 1,
            "description": "Human-readable name for the returned record."
          },
          "family": {
            "type": "string",
            "enum": [
              "answer",
              "agent",
              "ops",
              "judge",
              "knowledge",
              "check"
            ],
            "description": "The family returned by the tool."
          },
          "severity": {
            "type": "string",
            "enum": [
              "gate",
              "soft",
              "budget"
            ],
            "description": "The severity returned by the tool."
          },
          "threshold": {
            "type": "object",
            "properties": {
              "min": {
                "type": "number",
                "description": "The min returned by the tool."
              },
              "max": {
                "type": "number",
                "description": "The max returned by the tool."
              }
            },
            "additionalProperties": false,
            "description": "Structured threshold details returned by the tool."
          },
          "config": {
            "type": "object",
            "additionalProperties": {
              "description": "Additional structured values returned by the tool."
            },
            "description": "Structured config details returned by the tool."
          },
          "editable": {
            "type": "boolean",
            "description": "The editable returned by the tool."
          },
          "dynamic": {
            "type": "boolean",
            "description": "The dynamic returned by the tool."
          }
        },
        "required": [
          "name",
          "family",
          "severity",
          "editable",
          "dynamic"
        ],
        "additionalProperties": false,
        "description": "One metric item returned by the tool."
      },
      "description": "The metrics that score each example."
    },
    "repetitions": {
      "type": "integer",
      "exclusiveMinimum": 0,
      "description": "How often each example runs."
    },
    "tags": {
      "type": "array",
      "items": {
        "type": "string",
        "description": "One tag item returned by the tool."
      },
      "description": "Labels of the eval."
    },
    "metadata": {
      "type": "object",
      "additionalProperties": {
        "description": "Additional structured values returned by the tool."
      },
      "description": "Free-form JSON object stored with the eval."
    },
    "editable_fields": {
      "type": "array",
      "items": {
        "type": "string",
        "enum": [
          "name",
          "description",
          "target",
          "dataset",
          "repetitions",
          "tags",
          "metadata",
          "metrics",
          "check"
        ],
        "description": "One editable field item returned by the tool."
      },
      "description": "Fields that update_eval can change."
    },
    "dynamic_fields": {
      "type": "array",
      "items": {
        "$ref": "#/properties/editable_fields/items",
        "description": "One dynamic field item returned by the tool."
      },
      "description": "Fields computed in source, which update_eval cannot change."
    },
    "capabilities": {
      "type": "array",
      "items": {
        "type": "string",
        "description": "One capability item returned by the tool."
      },
      "description": "Eval capabilities the caller holds on the project."
    },
    "source": {
      "type": "string",
      "description": "Source text of the eval file."
    },
    "edit_mode": {
      "type": "string",
      "enum": [
        "structured",
        "source_only"
      ],
      "description": "Editing mode of the eval: structured for field updates, source_only for source edits."
    },
    "source_only_reasons": {
      "type": "array",
      "items": {
        "type": "string",
        "description": "One source only reason item returned by the tool."
      },
      "description": "Reasons why the eval can only be edited as source; empty for a structured eval."
    }
  },
  "required": [
    "id",
    "name",
    "description",
    "target_kind",
    "target",
    "source_path",
    "export_name",
    "dataset",
    "metrics",
    "repetitions",
    "tags",
    "metadata",
    "editable_fields",
    "dynamic_fields",
    "capabilities",
    "source",
    "edit_mode",
    "source_only_reasons"
  ],
  "additionalProperties": false,
  "description": "Eval definition including editable source content.",
  "$schema": "http://json-schema.org/draft-07/schema#"
}
```

<details>
  <summary>Try this tool</summary>

  Replace sample arguments with values for your project or connected account. Calls run only when you select Run tool.

  MCP tool call

  Call `veryfront__read_eval_source` against the Veryfront MCP endpoint.

  Bearer token or API key

  Arguments (JSON)

  Run tool

  Output JSON

  <pre />
</details>


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