Skip to main content
Glama

List accounts for a connector

list_accounts
Read-only

List the accounts, destinations or connections for one connector.

For a marketing connector (facebook-ads, google-ads, …) this returns the user's accounts. When the request names an account, ALWAYS pass query: a confident name or id match comes back on its own, so you can pass one account_id downstream instead of every account the user has. When nothing matches confidently you get the full list back, ranked, plus a hint — so searching costs you nothing. BigQuery, Google Sheets and sheets-source are walked one level at a time via parent_account_id: BigQuery authorization → project → dataset → table, Google Sheets destination → spreadsheet → worksheet, sheets-source spreadsheet → worksheet (a Google Sheets SOURCE account is a worksheet, never a whole spreadsheet). For a third-party MCP it returns the user's connections. For facebook-public-data (competitor Pages) pass the page's username, numeric id or URL as query: a page nobody has queried yet comes back as an available row whose account_id query_data already accepts.

Every row says whether it is the end of that walk. is_leaf: false means it is a step, NOT an account — feed its account_id back as parent_account_id to go deeper. A row without is_leaf: false carries an id the other tools accept; passing a step id to query_data, execute_action or create_report is rejected. The exception is a DESTINATION connector (google-sheets): its walk ends in a tab you write TO. No row of it is an account for query_data or create_report; any row of it is the account_id of that connector's own write actions, and the leaf, split, goes into an export's destination params. Each page says which case it is.

Each row's account_id is the opaque reference you pass verbatim to query_data and execute_action (it binds the account's identity so it can't be misused). The row ALSO carries readable fields for you and the user to identify the account — name, native_account_id (the platform's own id, e.g. act_…), company_id and source_user_id. Use these to tell apart accounts that share a name (the same account can appear under several companies) — but always pass the account_id downstream. source_user_email is null on connected rows, so do not identify an account by it. A row that is not connected carries status_for_user: the plain wording to give the person. Never write status values or internal terms (available, materialized, licence) to them. Pass verbose=false for compact rows: company_id and source_user_id only where the same account repeats, and connector/source only when they differ from the connector you asked for.

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": {
      "connector": "<connector>"
    },
    "name": "list_accounts"
  }
}

Input Schema

NameRequiredDescriptionDefault
queryNo
cursorNo
verboseNo
connectorYes
page_sizeNo
parent_account_idNo

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.3/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=true, destructiveHint=false and openWorldHint=true, so the description must add value beyond the safety profile — and it does: query matching is confident-or-ranked with a hint, account_id is opaque and bound to identity, source_user_email is null on connected rows, and status_for_user is the only wording to show users. It does not explain pagination/cursor behavior, so it is helpful but not exhaustive for a read tool whose safety traits are already covered.

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

Conciseness4/5

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

Purpose is front-loaded, and the body is organized topically by connector family, row semantics, and identification rules. It is long (~430 words) and occasionally chatty ('so searching costs you nothing'), but nearly every sentence carries an operational rule rather than repeating the schema.

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

Completeness4/5

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

For a six-parameter, multi-connector listing tool this is unusually complete: it explains the walk model, is_leaf semantics, the destination-connector exception, and how to identify rows. An output schema exists, so the row-field enumeration is partly redundant, and pagination via cursor/page_size remains unexplained — the one substantive gap.

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?

Schema coverage is 0%, so the description carries the full burden — it explains query (confident match vs ranked list plus hint), parent_account_id (how each connector type walks one level), connector (behavior varies by family), and verbose (compact rows, company_id/source_user_id only where repeated). cursor and page_size are never described beyond a passing mention of 'each page', leaving two of six parameters undefined.

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?

Opens with a specific verb and resource, 'List the accounts, destinations or connections for one connector', and immediately qualifies it by connector family (marketing, BigQuery, Google Sheets, third-party MCP, facebook-public-data). An agent can distinguish this from siblings like query_data or list_connectors without opening the schema.

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?

Explicit when-to guidance: 'When the request names an account, ALWAYS pass query', plus the downstream alternative — pass one account_id to query_data/execute_action/create_report rather than every account. It also states the when-not case (step rows with is_leaf: false must be fed back as parent_account_id, and passing a step id is rejected) and the destination-connector exception. Nothing material is left to inference.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources