CorefinityCorefinityDocs
Open the Control PanelControl Panel
Integrations · 38 of 39

corestack_company_performance_audit_gtmetrix_generate

Generate GTmetrix reports for an audit.

Scope writeAsks you to confirmRuns as a taskNo secrets returned
On this page

When to use it

Generate GTmetrix reports for a performance audit, as the Control Panel's Generate Reports does: one GTmetrix test for each environment × page of the audit (the environment's URL with the page's path). Each test uses GTmetrix credits, so ask the person first and tell them how many tests it buys. The tests are started in the background: the call answers a task to poll (corestack_task_get), and each test id is kept as GTmetrix gives it. When every test has started, the new reports replace the audit's earlier ones; read them with corestack_company_performance_audit_gtmetrix_reports_list (its generation follows this task too).

If a generation does not finish (GTmetrix refuses some tests, for example out of credits), the tests it started are kept, and the next generation at the same location buys only the rest: confirm_count is then that rest, and the refusal message says the number.

Ask for it

Prompt
Using the Corefinity MCP server, call corestack_company_performance_audit_gtmetrix_generate with audit_id 276, location_id 2. (Generate GTmetrix reports for an audit.) Tell me what it returned.

Inputs

audit_idintegerRequired

At least 1.

confirm_countintegerRequiredConfirmation

The number of tests this buys, the audit's environments × its pages (corestack_company_performance_audit_get), or the rest after a generation that did not finish at the same location. At least 1.

location_idstringRequired

An id from corestack_company_performance_audit_gtmetrix_locations. Up to 64 characters.

Answers a task. It ends with {audit_id, id, status, location_id, resumed, tests, started, requested_at, finished_at, error, reports: [{name, test_id}], failures: [{name, error}]}, each report named "environment page"; or work_failed, its message saying how many tests were not started and details.generation listing the ids started and each test GTmetrix refused.

Your assistant fills in a confirmation only after you agree.

Example call

tools/call
{
  "name": "corestack_company_performance_audit_gtmetrix_generate",
  "arguments": {
    "audit_id": 276,
    "location_id": "2",
    "confirm_count": 4
  }
}

If it is refused

ReasonWhat to do
tenant_mismatchNo such audit, or it belongs to a company you may not access.
confirm_mismatchconfirm_count is not the number of tests; the message says the number. Nothing was started.
run_in_progressA generation of this audit's reports is already queued or running. Wait for its task to end.
nothing_to_runThe audit has no domains or pages to report on.
too_largeThe audit has more than 200 environment and page pairs (the audit form's 10 × 20). Nothing was started.
conflictTwo environment and page pairs have the same report name ("environment page"), by which reports are kept; the message names it. Rename an environment or a page first. Nothing was started.
invalid_argumentslocation_id is not one of GTmetrix's locations, or an argument is missing.
temporarily_unavailableGTmetrix is not set up on the Control Panel just now. Nothing was sent.
upstream_unavailableGTmetrix did not answer when its locations were checked. Nothing was started.
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.
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