Choose a connector's accounts
set_agent_connector_accountsSet 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
| Name | Required | Description | Default |
|---|---|---|---|
| accounts | No | The accounts to save, by account choice key, for example {"pages": ["123", "456"]}. Leave it out to list the choices. | |
| connector | Yes | The connected connector's slug, such as "facebook-pages". | |
| agent_guid | Yes | The deployed agent's guid, from list_my_agents. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| mode | Yes | ||
| title | Yes | ||
| applied | No | set: 1 when the choice changed, 0 when it was already this. | |
| message | Yes | ||
| pickers | No | ||
| restart | No | set: 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. | |
| accounts | No | set: the accounts saved for each account choice, by id. | |
| agentGuid | Yes | ||
| connector | Yes | ||
| connection | No | ||
| nextAction | No |