corestack_ company_ agency_ detach
Detach an agency.
When to use it
Detach one of your company's agencies, for example one you no longer work with. The agency's people lose access to your
sites, tickets and billing at once. Only your company's owners may detach an agency. Needs the write scope. The same as
Detach agency on your organisation page in the Control Panel and DELETE /.
What ends with the link: the sites the agency manages come back to you, its people's SSH keys on your environments are
removed, its firewall allowances stop applying to your sites, its people stop following your tickets, and your
environments that deploy through its deployment connections lose that repository and need a new deployment connection
before their next deployment (corestack_company_agencies_list lists them under repository_gaps). Linking the agency
again later does not bring back removed keys, repositories or subscriptions.
Detaching cannot be undone. First call without confirm_agency: nothing changes, and the confirm_mismatch refusal
lists what would end in details.effects. Show that to the person, ask them, and only once they have agreed call again
with confirm_agency set to the agency's id.
Ask for it
Using the Corefinity MCP server, call corestack_company_agency_detach with agency_id 87. (Detach an agency.) Tell me what it returned.Inputs
The agency to detach, an id from corestack_company_agencies_list. At least 1.
The same id again, sent only after the person agreed. Without it, or with another id, nothing changes. At least 1.
The answer is detached (agency_id, client_id) and effects: what ended, in the preview's shape.
Your assistant fills in a confirmation only after you agree.
Example call
{
"name": "corestack_company_agency_detach",
"arguments": {
"agency_id": 87,
"confirm_agency": 87
}
}If it is refused
| Reason | What to do |
|---|---|
confirm_mismatch | confirm_agency is missing or is not the agency's id; field names it. Nothing changed. details.effects is what the detach would end: managed_sites (count, names), repositories (count, environments, other_environments), ssh_keys, firewall (stop_applying, stay_for_review: allowances the agency's people added that belong to you, which stay for you to review), ticket_subscriptions, and summary, the same in plain sentences. |
forbidden | You are not one of your company's owners, your company is archived, or the agency is Corefinity itself (contact Corefinity support to change that link). Nothing changed. |
tenant_mismatch | Your company has no such agency, or it was already detached. |
pin_refused | A token limited to some sites cannot change company-wide links. |
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. |
scope_required | The token lacks a scope this call needs. Open the link in the answer to add it, then call again. |
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. |