> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.doc-detective.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.doc-detective.com/_mcp/server.

# screenshot

> Reference for the `screenshot` schema.

## Referenced In

* [Markup definition](/reference/schemas/markup-definition)
* [test](/reference/schemas/test)
* [Resolved context](/reference/schemas/resolved-context)

## Fields

| Field      | Type                                                                                                                 | Description                                 | Default |
| :--------- | :------------------------------------------------------------------------------------------------------------------- | :------------------------------------------ | :------ |
| screenshot | one of: - string - object([Capture screenshot (detailed)](/reference/schemas/capture-screenshot-detailed)) - boolean | Required. Takes a screenshot in PNG format. | —       |

## Examples

```json
{
  "screenshot": true
}
```

```json
{
  "screenshot": "image.png"
}
```

```json
{
  "screenshot": "static/images/image.png"
}
```

```json
{
  "screenshot": "/User/manny/projects/doc-detective/static/images/image.png"
}
```

```json
{
  "screenshot": "/Users/jane doe/projects/my docs (v2)/static/images/image.png"
}
```

```json
{
  "screenshot": "https://example.com/static/images/image.png"
}
```

```json
{
  "screenshot": {
    "path": "https://promptless-customer-doc-assets.s3.amazonaws.com/docs-images/request-changes-button-0c851bb3.png",
    "maxVariation": 0.05,
    "overwrite": "aboveVariation"
  }
}
```

```json
{
  "screenshot": {
    "path": "image.png",
    "directory": "static/images",
    "maxVariation": 0.1,
    "overwrite": "aboveVariation",
    "crop": "#elementToScreenshot"
  }
}
```

```json
{
  "screenshot": {
    "path": "image.png",
    "directory": "static/images",
    "maxVariation": 0.1,
    "overwrite": "aboveVariation"
  }
}
```

```json
{
  "screenshot": {
    "path": "image.png",
    "directory": "static/images",
    "maxVariation": 0.1,
    "overwrite": "aboveVariation",
    "crop": {
      "selector": "#elementToScreenshot",
      "elementText": "Element text",
      "padding": {
        "top": 0,
        "right": 0,
        "bottom": 0,
        "left": 0
      }
    }
  }
}
```

```json
{
  "screenshot": {
    "path": "login.png",
    "directory": "static/images",
    "annotations": [
      {
        "badge": "#username",
        "label": "1"
      },
      {
        "callout": {
          "elementTestId": "submit"
        },
        "label": "Sends a one-time code",
        "position": "right"
      },
      {
        "blur": {
          "selector": ".account-id"
        },
        "all": true
      }
    ]
  }
}
```