CorefinityCorefinityDocs
Open the Control PanelControl Panel
Logs · 8 of 20

corestack_logs_export

Export logs.

Scope readRuns as a taskNo secrets returned
On this page

When to use it

Prepare a CSV or JSON file of the log lines a query matches (up to 50,000 lines), to download once in a browser where the person is signed in to the Control Panel. The file is kept for 24 hours.

Ask for it

Prompt
Using the Corefinity MCP server, call corestack_logs_export with site_id 4211, format csv. (Export logs.) Tell me what it returned.

Inputs

environment_idinteger

A row of the same site: production or one of its environments. Omitted: the row site_id names. At least 1.

filtersobject

The filter builder's entries (level, text, fields), ANDed with the query.

formatstringRequired

csv, or json (one JSON object per line).

csvjson
fromstring

ISO 8601; with to, instead of range. Format: date-time.

querystring

LogsQL, sent as written (* when empty). Up to 4,096 characters.

rangestring

Back from now, inside the site's retention.

15m1h6h24h7d30d
scopestring

Env (the default): that one row; site: every environment of the site you may see. Defaults to env.

envsite
site_idintegerRequired

The site (any of its environments answers for its group). At least 1.

sourcestring

One log source (corestack_logs_streams_list says which this row has). Defaults to all.

allweb-accessweb-errorphpappcrondatabasecachesearchqueue
tostring

ISO 8601; defaults to now. Format: date-time.

Example call

tools/call
{
  "name": "corestack_logs_export",
  "arguments": {
    "site_id": 4211,
    "format": "csv"
  }
}

If it is refused

ReasonWhat to do
invalid_argumentsThe 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_mismatchThe object does not exist or the token may not see it. Check the id.
scope_requiredThe token lacks a scope this call needs. Open the link in the answer to add it, then call again.
pin_refusedThe 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_limitedToo many calls. Wait for the number of seconds the answer names.
temporarily_unavailableThe Control Panel could not answer just now. Nothing was started; try again shortly.
internal_errorSomething went wrong on our side. Quote the trace id to support.

The same task elsewhere

Was this helpful?
Open in ClaudeOpen in ChatGPT