Skip to main content
Glama

Choose a connector's accounts

set_agent_connector_accounts
DestructiveIdempotent

Set which accounts a connected connector may act on: call with the connector to list choices, then with accounts to save the user's picks so the agent acts only on those.

Instructions

Choose which accounts a connected Connector may act on, for a connector with account choices (such as the ad accounts, pages, properties, channels or apps a sign-in reaches, or the advertisers of a TikTok Ads sign-in). Call it with only connector first: it lists each account choice with the accounts the connection reaches now, as the service names them, and the ones chosen, and changes nothing. Then call it with accounts, {choice key: [ids]}, to save the ones the user picked: only ids from that list are taken, a single choice takes one id, and a choice left out keeps what it had. The agent then acts only on the chosen accounts. Saving acts on the first call, so get the user's yes first. A running agent gets most changes without a restart; a few restart it, which takes a minute or two. list_agent_connectors shows which connectors have account choices. The person who deployed the agent or a team admin of its team can choose.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "agent_guid": "<agent_guid>",
      "connector": "<connector>"
    },
    "name": "set_agent_connector_accounts"
  }
}

Input Schema

NameRequiredDescriptionDefault
accountsNoThe accounts to save, by account choice key, for example {"pages": ["123", "456"]}. Leave it out to list the choices.
connectorYesThe connected connector's slug, such as "facebook-pages".
agent_guidYesThe deployed agent's guid, from list_my_agents.

Output Schema

NameRequiredDescriptionDefault
modeYes
titleYes
appliedNoset: 1 when the choice changed, 0 when it was already this.
messageYes
pickersNo
restartNoset: live (the running agent got the accounts with no restart), scheduled (it restarts to load them), none (nothing to load, or the agent is not running) or failed.
accountsNoset: the accounts saved for each account choice, by id.
agentGuidYes
connectorYes
connectionNo
nextActionNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv2.0.0

TDQS

A4.5/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Goes well beyond the annotations by disclosing that the list call mutates nothing, that only ids from the supplied list are taken, that an omitted choice keeps its prior value, that saving takes effect on the first call, and that most changes apply without a restart while a few restart the agent for a minute or two. It also states the authorization requirement (deployer or team admin). This is a mutation tool whose annotations already flag destructive/open-world, and the description adds the concrete consequences.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The listing behavior and the save behavior are front-loaded and nothing is truly filler, but it is one dense run-on paragraph mixing purpose, mechanics, restart effects, and permissions. Sentences like "it lists each account choice with the accounts the connection reaches now, as the service names them, and the ones chosen, and changes nothing" are hard to parse on first read and would benefit from structure.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a three-parameter mutation tool with a nested accounts map, the description covers the two-phase workflow, partial-update semantics, side effects (restart), and permissions, while an output schema and full annotation set handle return values and safety profile. An agent has everything needed to call it correctly.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

With 100% schema coverage the baseline is 3, and the description adds real meaning on top: the {choice key: [ids]} shape, the rule that a single choice takes one id, and the partial-update semantics where an omitted choice retains its existing value. That last rule is not in the schema and matters for correct invocation.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb and resource — choosing which accounts a connected Connector may act on — and scopes the case precisely ("for a connector with account choices"), with examples of what a choice is. It also distinguishes this from the read-only discovery path by naming list_agent_connectors for finding connectors that have account choices.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Gives an explicit two-step operating procedure: call with only connector first to list choices without changing anything, then call with accounts to save the user's picks. It adds a prerequisite (get the user's yes first) and points to list_agent_connectors for discovery, leaving nothing to inference.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.