switch_company
Switch the current session to a different company/organisation. Returns a new access token scoped to the target company. All subsequent tool calls will operate on the new company.
This record as markdown: /tools/io-favcrm-favcrm/switch-company.md
What switch_company does on FavCRM
AI agents invoke switch_company to trigger actions in FavCRM. What it does depends on the arguments the agent supplies, and its effects often reach beyond the immediate call: builds kicked off, notifications sent, workflows started.
| Parameter | Type | Required | Description |
|---|---|---|---|
companyId | string | Yes | The company ID to switch to (use list_my_companies to find available IDs) |
Parameters from the server's own tool schema.
Why switch_company is rated High
This tool changes the active security context by issuing a new access token and redirecting all subsequent operations to a different company. It doesn't merely read or write data — it executes a session/context switch that affects every future tool call. Misuse could allow an AI agent to pivot into another organization's data and perform actions on their behalf, making this a high-severity Execute-class action.
From the tool's definition 'Switch the current session to a different company/organisation. Returns a new access token scoped to the target company. All subsequent tool calls will operate on the new company.'
Attacks that exploit this kind of access
The rule that runs switch_company safely
PolicyLayer is an MCP gateway: it sits between your AI agents and FavCRM, and checks every tool call against a rule you set before the call runs. Nothing changes on the server itself. For switch_company, this is the rule to start with:
switch_company stays usable, but rate-capped: a runaway agent can't fire it dozens of times a minute. Everything else on the server is denied unless you say otherwise.
The button opens the PolicyLayer dashboard: create your workspace, connect FavCRM, apply this rule, and every switch_company call is checked against it from then on.
Questions about switch_company
Switch the current session to a different company/organisation. Returns a new access token scoped to the target company. All subsequent tool calls will operate on the new company. It is categorised as a Execute tool in the FavCRM MCP Server, which means it can trigger actions or run processes. Use rate limits and argument validation.
switch_company accepts 1 parameter: companyId. Required: companyId. The full parameter table on this page comes from the server's own tool schema.
Register the FavCRM MCP server in PolicyLayer and add a rule for switch_company: allow, deny, rate-limit, or require approval. Point your MCP client at the PolicyLayer proxy URL and the rule is enforced on every call, before it reaches FavCRM. Nothing to install.
switch_company is a Execute tool with high risk. Execute tools should be rate-limited and have argument validation enabled.
Yes. Add a rate_limit block to the switch_company rule in your PolicyLayer policy. For example, setting max: 10 and window: 60 limits the tool to 10 calls per minute. Rate limits are tracked per agent session and reset automatically.
Set action: deny in the PolicyLayer policy for switch_company. The AI agent will receive a policy violation error and cannot call the tool. You can also include a reason field to explain why the tool is blocked.
switch_company is provided by the FavCRM MCP server (https://api.favcrm.io/mcp). PolicyLayer sits as a proxy in front of this server to enforce policies before tool calls reach the server.
More on FavCRM, and thousands of servers like it.
Across the catalogue