---
title: "corestack_file_read"
url: https://docs.corefinity.com/mcp/tools/corestack_file_read
type: tool
last_updated: 2026-11-13
feature: files-and-transfers
related:
  - https://docs.corefinity.com/mcp/files-and-transfers.md
---
# corestack_file_read

**Read a file.** Read a file of the environment (relative to the site root, e.g. htdocs/wp-config.php, or absolute under it), at most length bytes from offset; read a larger file in pages until eof. Links are followed, and anything outside the site root is refused. Content is UTF-8, or base64 with encoding when it is not text. Scope: read.

- Scope: `read`
- Runs as a task: no

## When to use it

Read a file of the environment (relative to the site root, e.g. htdocs/wp-config.php, or absolute under it), at most length bytes from offset; read a larger file in pages until eof. Links are followed, and anything outside the site root is refused. Content is UTF-8, or base64 with encoding when it is not text.

## Inputs

- `site_id` (integer, ≥ 1, required)
- `path` (string, 1–1024 characters, required)
- `offset` (integer, ≥ 0, default `0`)
- `length` (integer, 1–131072, default `131072`)

### Input schema

```json
{
  "additionalProperties": false,
  "properties": {
    "length": {
      "default": 131072,
      "maximum": 131072,
      "minimum": 1,
      "type": "integer"
    },
    "offset": {
      "default": 0,
      "minimum": 0,
      "type": "integer"
    },
    "path": {
      "maxLength": 1024,
      "minLength": 1,
      "type": "string"
    },
    "site_id": {
      "minimum": 1,
      "type": "integer"
    }
  },
  "required": [
    "site_id",
    "path"
  ],
  "type": "object"
}
```

## Refusals

- The refusals every tool can answer: `invalid_arguments`, `tenant_mismatch`, `scope_required`, `pin_refused`, `rate_limited`, `temporarily_unavailable`, `internal_error` (corestack://guides/how-this-server-works).

## Example

```json
{
  "name": "corestack_file_read",
  "arguments": {
    "site_id": 4211,
    "path": "/var/www/example.co.uk/htdocs/robots.txt"
  }
}
```

## Prompt

```text
Using the Corefinity MCP server, call corestack_file_read with site_id 4211, path /var/www/example.co.uk/htdocs/robots.txt. (Read a file.) Tell me what it returned.
```

## The same task elsewhere

- Guide: [Files and transfers](https://docs.corefinity.com/mcp/files-and-transfers.md)
