list_user_accounts
List accounts the current user has access to, with optional name filtering.
Read account
Returns data. Calling it changes nothing, so it is safe in an unattended loop.
What it does
List accounts the current user has access to, with optional name filtering.
USE FOR: "which accounts do I have access to?", "show me my accounts", "what accounts can I manage?", "what is my account ID?", "which account am I logged into?", "what role do I have?", "show me account named X", "do you have an account called X?"
AUTH METHODS: JWT tokens (OAuth) | PAT tokens (prefix "pat-")
ARGS:
- name (optional for regular users, REQUIRED for super users unless `account_id` is given): partial account name to search for. Super users span the whole platform and would otherwise return an unbounded list, so a search term is mandatory for them. If a super user calls this with neither `name` nor `account_id`, the tool returns an error asking for one — re-call with the user's intended search term.
- account_id (optional): exact account id to look up. Use this instead of `name` when the search term is a number ("account 4368", "the 12057 account"), since account names are not ids and a numeric name search finds nothing. It satisfies the super-user search requirement on its own; supplying both narrows to accounts matching BOTH.
RESPONSE FORMAT (identical for JWT and PAT — the token format does not change the result):
Regular users: user_id, email, default_account_id, is_super_user, token_type, accounts[{account_id, name, role}]
Super users with neither argument: error response — supply `name` or `account_id` and retry.
Super users with name: matching accounts platform-wide (paged at 20).
Super users with account_id: the single matching account, or an empty list when no account carries that id.Arguments
| Argument | Type | Notes | |
|---|---|---|---|
name |
string | Partial account name to search for. Optional for regular users (acts as a filter); required for super users unless `account_id` is given (acts as the search query against the whole platform). | |
account_id |
integer | Exact account id to look up. Use instead of `name` when the search term is numeric; it satisfies the super-user search requirement on its own. |
Request
Request template, not a complete runnable example. Replace placeholders, empty objects, arrays, and zero values with valid account-specific inputs. Read required fields and nested constraints in the full schema. Confirm the account, connected channels, and referenced assets before calling a write tool.
curl
curl -s -X POST https://mcp-server.metadata.io/mcp \
-H "Authorization: $METADATA_PAT" \
-H "Content-Type: application/json" \
-H "Accept: application/json, text/event-stream" \
-H "MCP-Protocol-Version: 2025-11-25" \
-d '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"list_user_accounts","arguments":{}}}'
Response
No recorded response. This tool needs arguments that only exist inside an account, so no response is recorded here.
The request is an illustrative template. Fill required fields and check the current schema before calling it. No response is fabricated.
Related
Other account tools: