corestack_ file_ read
Read a file.
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.
Ask for it
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.Inputs
lengthinteger
Defaults to 131072. 1 to 131072.
offsetinteger
Defaults to 0. At least 0.
pathstringRequired
Up to 1,024 characters.
site_idintegerRequired
At least 1.
Example call
{
"name": "corestack_file_read",
"arguments": {
"site_id": 4211,
"path": "/var/www/example.co.uk/htdocs/robots.txt"
}
}If it is refused
| Reason | What to do |
|---|---|
invalid_arguments | The arguments do not match the tool's input schema, or the Control Panel refused a field. Fix the fields named in the answer and call again. |
tenant_mismatch | The object does not exist or the token may not see it. Check the id. |
scope_required | The token lacks a scope this call needs. Open the link in the answer to add it, then call again. |
pin_refused | The grant is limited to chosen clusters, sites or environments, and this call is outside them. Open the link in the answer to widen it. |
rate_limited | Too many calls. Wait for the number of seconds the answer names. |
temporarily_unavailable | The Control Panel could not answer just now. Nothing was started; try again shortly. |
internal_error | Something went wrong on our side. Quote the trace id to support. |
The same task elsewhere
Was this helpful?