get_provider_status
Check Smart Account provider details including name, supported chains, and gas sponsorship status for a specific wallet.
Instructions
Get Smart Account provider status: provider name, supported chains, gas sponsorship (paymaster) status.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| wallet_id | Yes | Target wallet ID (UUID). |
Implementation Reference
- The handler function for 'get_provider_status' which fetches the wallet data from the API and processes the provider status information for smart accounts.
async (args) => { const result = await apiClient.get<Record<string, unknown>>( '/v1/wallets/' + args.wallet_id, ); if (!result.ok) return toToolResult(result); const wallet = result.data; const provider = wallet['provider'] as { name: string; supportedChains: string[]; paymasterEnabled: boolean } | null; const accountType = (wallet['accountType'] as string) ?? 'eoa'; if (accountType !== 'smart') { return { content: [{ type: 'text' as const, text: JSON.stringify({ accountType, provider: null, message: 'This is an EOA wallet. Smart Account provider is only applicable to smart account wallets.' }) }], }; } if (!provider) { return { content: [{ type: 'text' as const, text: JSON.stringify({ accountType: 'smart', provider: null, message: 'No provider configured. Use PUT /v1/wallets/:id/provider to set up a provider (pimlico, alchemy, or custom).' }) }], }; } return { content: [{ type: 'text' as const, text: JSON.stringify({ accountType: 'smart', provider: { name: provider.name, supportedChains: provider.supportedChains, paymasterEnabled: provider.paymasterEnabled, gasSponsorshipStatus: provider.paymasterEnabled ? 'Gas fees are sponsored by the paymaster on supported chains.' : 'No paymaster configured. Transactions require the wallet to hold native gas tokens.', }, }) }], }; }, - packages/mcp/src/tools/get-provider-status.ts:13-55 (registration)The registration function that registers the 'get_provider_status' tool with the McpServer.
export function registerGetProviderStatus(server: McpServer, apiClient: ApiClient, walletContext?: WalletContext): void { server.tool( 'get_provider_status', withWalletPrefix('Get Smart Account provider status: provider name, supported chains, gas sponsorship (paymaster) status.', walletContext?.walletName), { wallet_id: z.string().describe('Target wallet ID (UUID).'), }, async (args) => { const result = await apiClient.get<Record<string, unknown>>( '/v1/wallets/' + args.wallet_id, ); if (!result.ok) return toToolResult(result); const wallet = result.data; const provider = wallet['provider'] as { name: string; supportedChains: string[]; paymasterEnabled: boolean } | null; const accountType = (wallet['accountType'] as string) ?? 'eoa'; if (accountType !== 'smart') { return { content: [{ type: 'text' as const, text: JSON.stringify({ accountType, provider: null, message: 'This is an EOA wallet. Smart Account provider is only applicable to smart account wallets.' }) }], }; } if (!provider) { return { content: [{ type: 'text' as const, text: JSON.stringify({ accountType: 'smart', provider: null, message: 'No provider configured. Use PUT /v1/wallets/:id/provider to set up a provider (pimlico, alchemy, or custom).' }) }], }; } return { content: [{ type: 'text' as const, text: JSON.stringify({ accountType: 'smart', provider: { name: provider.name, supportedChains: provider.supportedChains, paymasterEnabled: provider.paymasterEnabled, gasSponsorshipStatus: provider.paymasterEnabled ? 'Gas fees are sponsored by the paymaster on supported chains.' : 'No paymaster configured. Transactions require the wallet to hold native gas tokens.', }, }) }], }; }, ); }