corestack_ function_ run
Run a site function.
When to use it
Run one of the environment's functions (corestack_function_catalogue_list lists them): pass its inputs and confirm: true where it asks. Long functions answer a task. An admin reset, admin create or login link shows its secret once.
A queued function's own outcome is on its command (corestack_command_get). For example, magento_2fa_enable fails without changing anything when another change already holds the site (a copy, an update that stopped part-way, a migration: release that hold first), or when the site's web traffic could not be held for the recompile (try again in a minute).
Ask for it
Using the Corefinity MCP server, call corestack_function_run with site_id 4211, function flush_cache. (Run a site function.) Tell me what it returned.Inputs
Defaults to false.
Up to 64 characters.
The function's own inputs, as the catalogue lists them.
Return the secret to you instead of opening it in the person's browser. Needs exec. Defaults to false.
At least 1.
Example call
{
"name": "corestack_function_run",
"arguments": {
"site_id": 4211,
"function": "flush_cache"
}
}If it is refused
| Reason | What to do |
|---|---|
maintenance | The site is in maintenance mode; turn it off first, or wait for the maintenance to end. |
platform_plugins_off | The function needs Corefinity's platform plugins (wp_login_link, "Log in to wp-admin"), which are turned off for this WordPress site; corestack_site_platform_plugins_get shows the setting and what else stops. |
managed_elsewhere | Another control panel manages this site, so use that control panel for it. This is refused before anything else about the site, as in the Control Panel and the API. Nothing was done. |
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. |