---
title: "corestack_company_agencies_list"
url: https://docs.corefinity.com/mcp/tools/corestack_company_agencies_list
type: tool
last_updated: 2026-11-13
feature: agency-links
related:
  - https://docs.corefinity.com/guides/agencies/client-organisations-and-the-switcher.md
---
# corestack_company_agencies_list

**Your company's agencies.** List the agencies your company is a client of, by name: how many of your sites each manages and how many of your environments deploy through its deployment connections, and your environments that still need a new deployment connection after an agency was detached. Scope: read.

- Scope: `read`
- Runs as a task: no

## When to use it

List the agencies your company is a client of: the companies whose people can work on your sites, tickets and billing
through their link to your company. Use it to see who has access through an agency, before detaching one with
`corestack_company_agency_detach`, or to find the environments that need a new deployment connection after an agency was
detached. Needs the `read` scope. The same as the Agencies section of your organisation page in the Control Panel and
`GET /api/company/agencies`.

Each agency is listed by name only, with its `type` (`agency` or `partner`), `manages_sites` (how many of your sites it
manages) and `deploys_through` (how many of your environments deploy through one of its deployment connections). An
agency that no longer exists is listed as "Removed agency" and can still be detached.

`repository_gaps` lists your environments that lost their repository when an agency was detached and still need a new
deployment connection before their next deployment: each one's `environment_id`, `environment_name`, `website_id`, the
agency it deployed through (`agency_id`, `agency_name`) and `detached_at`. A gap closes on its own once the environment
has a repository again, and stays closed if that repository is removed later.

`can_detach` is true when you may detach an agency: you are one of your company's owners and the company is not
archived. A company that is nobody's client lists no agencies.

## Inputs

None.

### Input schema

```json
{
  "additionalProperties": false,
  "properties": {},
  "type": "object"
}
```

## Refusals

- `pin_refused`: a token limited to some sites cannot read company-wide links; ask the token's creator or a company owner
  to let it work everywhere in your company.
- The refusals every tool can answer: `invalid_arguments`, `tenant_mismatch`, `scope_required`, `pin_refused`, `rate_limited`, `temporarily_unavailable`, `internal_error` (corestack://guides/how-this-server-works).

## Example

```json
{
  "name": "corestack_company_agencies_list",
  "arguments": {}
}
```

## Prompt

```text
Using the Corefinity MCP server, call corestack_company_agencies_list. (Your company's agencies.) Tell me what it returned.
```

## The same task elsewhere

- Guide: [Client organisations and the switcher](https://docs.corefinity.com/guides/agencies/client-organisations-and-the-switcher.md)
