Skip to main content
Glama
matteoantoci

MCP Bitpanda Server

get_asset_info

Retrieve detailed information for cryptocurrency assets using their trading symbols like BTC or XAU. Access asset data through the Bitpanda exchange programmatically.

Instructions

Retrieves detailed information for a specific asset by its symbol.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
symbolYesThe trading symbol of the asset (e.g., BTC, XAU)

Implementation Reference

  • The main handler function for the 'get_asset_info' tool. It takes the input symbol, calls findAssetBySymbol utility, and returns the asset info or throws an error.
    const assetInfoHandler = async (input: Input): Promise<Output> => {
      try {
        const foundAsset = await findAssetBySymbol(input.symbol);
    
        // Return the found asset object
        return foundAsset;
      } catch (error: unknown) {
        console.error('Error fetching asset info:', error);
        const message = error instanceof Error ? error.message : 'An unknown error occurred while fetching asset info.';
        // Re-throwing the error to be handled by the MCP server framework
        throw new Error(`Failed to fetch asset info: ${message}`);
      }
    };
  • Zod input schema shape and TypeScript type definitions for input and output of the get_asset_info tool.
    // Define the input schema shape for the get_asset_info tool
    const assetInfoInputSchemaShape = {
      symbol: z.string().describe('The trading symbol of the asset (e.g., BTC, XAU)'),
    };
    
    type RawSchemaShape = typeof assetInfoInputSchemaShape;
    type Input = z.infer<z.ZodObject<RawSchemaShape>>;
    
    // Define the expected output structure (simplified, based on the documentation summary)
    type Output = {
      type: string;
      attributes: Record<string, any>; // Use Record<string, any> for flexibility
      id: string;
    };
  • The registration function that registers all tools, including get_asset_info (imported and added to bitpandaToolDefinitions array at lines 10 and 32), by calling server.tool() for each.
    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);
        }
      });
  • Supporting utility function findAssetBySymbol that queries the Bitpanda API currencies endpoint to find and return asset info by symbol. Called directly by the get_asset_info handler.
    export const findAssetBySymbol = async (symbol: string): Promise<BitpandaAsset> => {
      try {
        const currenciesResponse = await axios.get(`${BITPANDA_API_V3_BASE_URL}/currencies`);
        const currenciesData = currenciesResponse.data.data.attributes;
    
        const assetTypes = ['commodities', 'cryptocoins', 'etfs', 'etcs', 'fiat_earns'];
        let foundAsset: BitpandaAsset | null = null;
    
        for (const type of assetTypes) {
          if (currenciesData[type] && Array.isArray(currenciesData[type])) {
            foundAsset = currenciesData[type].find((asset: any) => asset.attributes?.symbol === symbol);
            if (foundAsset) {
              break; // Found the asset, stop searching
            }
          }
        }
    
        if (!foundAsset) {
          throw new Error(`Asset with symbol "${symbol}" not found.`);
        }
    
        return foundAsset;
      } catch (error: unknown) {
        console.error(`Error finding asset by symbol "${symbol}":`, error);
        const message = error instanceof Error ? error.message : 'An unknown error occurred while finding the asset.';
        throw new Error(`Failed to find asset by symbol: ${message}`);
      }
    };
Behavior2/5

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

With no annotations provided, the description carries full burden but offers minimal behavioral context. It implies a read-only operation ('Retrieves'), but doesn't disclose error handling, rate limits, authentication needs, or what 'detailed information' includes. This is inadequate for a tool with no annotation coverage.

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 with zero waste. It's front-loaded with the core purpose and appropriately sized for a simple lookup tool.

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 no annotations and no output schema, the description is incomplete. It doesn't explain what 'detailed information' returns, error cases, or behavioral traits. For a tool in a financial context with siblings, more context is needed to guide proper usage.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The schema description coverage is 100%, so the schema already fully documents the single 'symbol' parameter. The description adds marginal value by mentioning 'trading symbol' and examples (BTC, XAU), but this is redundant with the schema's description. Baseline 3 is appropriate when schema does the heavy lifting.

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 verb ('Retrieves') and resource ('detailed information for a specific asset'), specifying it's for a single asset identified by symbol. However, it doesn't differentiate from potential sibling tools like list_asset_wallets or list_trades, which might also retrieve asset-related information.

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?

The description provides no guidance on when to use this tool versus alternatives. It doesn't mention sibling tools like list_asset_wallets or list_trades, nor does it specify prerequisites or exclusions (e.g., when symbol lookup is needed vs. bulk listing).

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