get_single_plaid_account
Retrieve detailed information for a specific Plaid-synced account using its ID. Requires prior discovery of account IDs via the list accounts tool.
Instructions
Get details of a single Plaid (synced) account by ID.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| accountId | Yes | Id of the Plaid account to query. Call get_all_plaid_accounts first to discover ids. |
Implementation Reference
- src/tools/plaid-accounts.ts:39-71 (registration)Registration of the 'get_single_plaid_account' tool with its schema and handler logic. The handler accepts an 'accountId' parameter, calls GET /plaid_accounts/{accountId}, and returns the response.
server.registerTool( "get_single_plaid_account", { description: "Get details of a single Plaid (synced) account by ID.", inputSchema: { accountId: z.coerce .number() .describe( "Id of the Plaid account to query. Call get_all_plaid_accounts first to discover ids.", ), }, annotations: { readOnlyHint: true, }, }, async ({ accountId }) => { try { const response = await api.get(`/plaid_accounts/${accountId}`); if (!response.ok) { return handleApiError( response, "Failed to get Plaid account", ); } return dataResponse(await response.json()); } catch (error) { return catchError(error, "Failed to get Plaid account"); } }, ); - src/tools/plaid-accounts.ts:55-70 (handler)The handler function that executes the tool logic: takes accountId, makes a GET request to /plaid_accounts/{accountId}, and returns the account data.
async ({ accountId }) => { try { const response = await api.get(`/plaid_accounts/${accountId}`); if (!response.ok) { return handleApiError( response, "Failed to get Plaid account", ); } return dataResponse(await response.json()); } catch (error) { return catchError(error, "Failed to get Plaid account"); } }, - src/tools/plaid-accounts.ts:44-50 (schema)Input schema defining the 'accountId' parameter as a coerced number.
inputSchema: { accountId: z.coerce .number() .describe( "Id of the Plaid account to query. Call get_all_plaid_accounts first to discover ids.", ), },