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

# Context7

> Access up-to-date Coval documentation directly inside AI coding agents via Context7.

[Context7](https://context7.com) indexes library documentation and serves it to AI coding agents through an MCP server. Instead of relying on training data that may be outdated, your agent pulls live Coval docs on demand.

## Why Use Context7

AI coding agents often hallucinate API details or reference outdated patterns. Context7 solves this by fetching current documentation at query time:

* **Always current** — pulls from the latest published docs, not stale training data
* **Code-first** — returns relevant code snippets and examples, not walls of text
* **Zero config** — works out of the box with any MCP-compatible agent

## Coval on Context7

Coval's full documentation is indexed and available:

<Card title="Coval on Context7" icon="book-open" href="https://context7.com/llmstxt/coval_dev_llms_txt">
  Browse the Coval library on Context7 — includes CLI commands, API examples, metric configuration, and more.
</Card>

## Install the Context7 MCP Server

Add Context7 to your agent's MCP configuration:

<Tabs>
  <Tab title="Claude Code">
    ```bash theme={null}
    claude mcp add context7 -- npx -y @upstash/context7-mcp@latest
    ```
  </Tab>

  <Tab title="Cursor">
    Add to `.cursor/mcp.json`:

    ```json theme={null}
    {
      "mcpServers": {
        "context7": {
          "command": "npx",
          "args": ["-y", "@upstash/context7-mcp@latest"]
        }
      }
    }
    ```
  </Tab>

  <Tab title="Windsurf">
    Add to your MCP config file:

    ```json theme={null}
    {
      "mcpServers": {
        "context7": {
          "command": "npx",
          "args": ["-y", "@upstash/context7-mcp@latest"]
        }
      }
    }
    ```
  </Tab>
</Tabs>

## Usage

Once installed, your agent has two tools available:

### 1. Resolve Library ID

Find Coval's library ID by searching for it:

```
resolve-library-id("Coval")
→ /llmstxt/coval_dev_llms_txt
```

### 2. Query Documentation

Ask questions and get back relevant code snippets and docs:

```
query-docs("/llmstxt/coval_dev_llms_txt", "how to create a metric with the CLI")
```

Your agent calls these tools automatically when it needs Coval context. You can also prompt it explicitly:

> "Use Context7 to look up how Coval metrics work"

## Example Workflow

Here's what happens when your agent uses Context7 with Coval:

<Steps>
  <Step title="You ask a question">
    "How do I launch an evaluation run with the Coval CLI?"
  </Step>

  <Step title="Agent resolves the library">
    The agent calls `resolve-library-id("Coval")` and gets `/llmstxt/coval_dev_llms_txt`.
  </Step>

  <Step title="Agent queries the docs">
    It calls `query-docs` with your question and gets back current CLI examples and flags.
  </Step>

  <Step title="Agent responds with accurate info">
    You get a response grounded in the latest Coval documentation, not training data.
  </Step>
</Steps>

## Context7 vs Other Approaches

| Approach             | Freshness          | Setup              | Best For                      |
| -------------------- | ------------------ | ------------------ | ----------------------------- |
| **Context7 MCP**     | Live (latest docs) | One command        | Quick lookups, any MCP agent  |
| **Agent Skills**     | Updated on install | `npx skills add`   | Deep evaluation workflows     |
| **Coval MCP Server** | Live (API calls)   | `npx coval-mcp`    | Executing operations directly |
| **llms.txt**         | Live (latest docs) | Point agent at URL | Manual context loading        |

Context7 complements Skills and the Coval MCP server. Use Context7 when your agent needs to **look something up**. Use Skills when it needs to **know how to evaluate well**. Use the Coval MCP server when it needs to **execute operations**.
