Skip to main content
Glama
matteoantoci

MCP Bitpanda Server

list_crypto_wallets

Retrieve all cryptocurrency wallet details from your Bitpanda account to view balances and holdings.

Instructions

Lists all user's crypto wallets from the Bitpanda API.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • Handler function that executes the tool logic: fetches user's crypto wallets from Bitpanda API endpoint /wallets using API key and axios.
    const listCryptoWalletsHandler = async (_input: Input): Promise<Output> => {
      try {
        const apiKey = getBitpandaApiKey();
        const url = `${BITPANDA_API_BASE_URL}/wallets`; // Note: API uses /wallets for crypto
    
        const response = await axios.get<Output>(url, {
          headers: {
            'X-Api-Key': apiKey,
            'Content-Type': 'application/json',
          },
        });
    
        // Return the data received from the Bitpanda API
        return response.data;
      } catch (error: unknown) {
        console.error('Error fetching Bitpanda crypto wallets:', error);
        const message = error instanceof Error ? error.message : 'An unknown error occurred while fetching crypto wallets.';
        // Re-throwing the error to be handled by the MCP server framework
        throw new Error(`Failed to fetch Bitpanda crypto wallets: ${message}`);
      }
    };
  • Input schema (empty object, no parameters) and Zod-inferred Input type, plus Output type matching Bitpanda API response structure.
    // Define the input schema shape for the list_crypto_wallets tool (no parameters)
    const listCryptoWalletsInputSchemaShape = {};
    
    type RawSchemaShape = typeof listCryptoWalletsInputSchemaShape;
    type Input = z.infer<z.ZodObject<RawSchemaShape>>;
    // Define the expected output structure based on the API documentation
    type Output = {
      data: Array<{
        type: string;
        attributes: {
          cryptocoin_id: string;
          cryptocoin_symbol: string;
          balance: string;
          is_default: boolean;
          name: string;
          pending_transactions_count: number;
          deleted: boolean;
        };
        id: string;
      }>;
    };
  • Tool definition object that bundles the name 'list_crypto_wallets', description, schema, and handler for export.
    // Export the tool definition for list_crypto_wallets
    export const listCryptoWalletsTool: BitpandaToolDefinition = {
      name: 'list_crypto_wallets',
      description: "Lists all user's crypto wallets from the Bitpanda API.",
      inputSchemaShape: listCryptoWalletsInputSchemaShape,
      handler: listCryptoWalletsHandler,
    };
  • Inclusion of listCryptoWalletsTool in the array of all Bitpanda tool definitions.
    const bitpandaToolDefinitions: BitpandaToolDefinition[] = [
      listTradesTool, // Add the listTradesTool to the array
      listAssetWalletsTool, // Add the listAssetWalletsTool to the array
      listFiatWalletsTool, // Add the listFiatWalletsTool to the array
      listFiatTransactionsTool, // Add the listFiatTransactionsTool to the array
      listCryptoWalletsTool, // Add the listCryptoWalletsTool to the array
      listCryptoTransactionsTool, // Add the listCryptoTransactionsTool to the array
      listCommodityTransactionsTool, // Add the listCommodityTransactionsTool to the array
      assetInfoTool, // Add the assetInfoTool to the array
      // ohlcTool, // Add the ohlcTool to the array
      // Other tools will be added here as they are implemented
    ];
  • Function that registers all tools, including list_crypto_wallets, with the MCP server using server.tool() for each.
    /**
     * Registers all Bitpanda tools with the MCP server.
     * @param server The McpServer instance.
     */
    export const registerBitpandaTools = (server: McpServer): void => {
      bitpandaToolDefinitions.forEach((toolDef) => {
        try {
          // Pass the raw shape to the inputSchema parameter, assuming SDK handles z.object()
          server.tool(toolDef.name, toolDef.description, toolDef.inputSchemaShape, async (input) => {
            const result = await toolDef.handler(input);
            // Assuming the handler returns the data directly, wrap it in the MCP content format
            return {
              content: [{ type: 'text', text: JSON.stringify(result, null, 2) }],
            };
          });
          console.log(`Registered Bitpanda tool: ${toolDef.name}`);
        } catch (error) {
          console.error(`Failed to register tool ${toolDef.name}:`, error);
        }
      });
    };
Behavior2/5

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

No annotations are provided, so the description carries the full burden of behavioral disclosure. It states it 'Lists all user's crypto wallets' but doesn't mention authentication requirements, rate limits, pagination behavior, or what data is returned. For a read operation with zero annotation coverage, this leaves significant gaps.

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

Conciseness5/5

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

The description is a single, efficient sentence that directly states the tool's purpose with no wasted words. It's appropriately sized and front-loaded, making it easy to parse.

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

Completeness2/5

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

Given the lack of annotations and output schema, the description is incomplete for a tool that presumably returns wallet data. It doesn't explain what information is included in the listing (e.g., balances, addresses) or any behavioral aspects like authentication needs. For a tool with no structured metadata, more context is needed.

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?

The tool has 0 parameters with 100% schema description coverage, so the schema fully documents the lack of inputs. The description doesn't need to add parameter information, and it correctly implies no parameters are required by not mentioning any.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the action ('Lists') and resource ('all user's crypto wallets from the Bitpanda API'), making the purpose immediately understandable. It doesn't explicitly distinguish from sibling tools like 'list_fiat_wallets' or 'list_asset_wallets', but the specificity of 'crypto wallets' provides some implicit differentiation.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No guidance is provided on when to use this tool versus alternatives like 'list_fiat_wallets' or 'list_asset_wallets'. The description simply states what it does without indicating context, prerequisites, or exclusions.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/matteoantoci/mcp-bitpanda'

If you have feedback or need assistance with the MCP directory API, please join our Discord server