Skip to main content
Glama

get_asset_info

Retrieve detailed information about Algorand Standard Assets by providing the asset ID, enabling users to verify asset properties and metadata on the blockchain.

Instructions

Get information about an Algorand Standard Asset

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
assetIdYesAsset ID to query

Implementation Reference

  • MCP tool handler for 'get_asset_info' that parses arguments, calls algorandService.getAssetInfo, and formats the response or error.
    case 'get_asset_info': { const parsed = GetAssetInfoArgsSchema.parse(args); try { const assetInfo = await algorandService.getAssetInfo(parsed.assetId); return { content: [ { type: 'text', text: `Asset Information:\n${JSON.stringify(assetInfo, null, 2)}`, }, ], }; } catch (error) { return { content: [ { type: 'text', text: `Error getting asset info: ${error}`, }, ], isError: true, }; } }
  • Zod schema for validating input arguments to the get_asset_info tool (assetId: number).
    const GetAssetInfoArgsSchema = z.object({ assetId: z.number(), });
  • src/index.ts:295-308 (registration)
    Tool registration in the TOOLS array, defining name, description, and inputSchema for MCP server.
    { name: 'get_asset_info', description: 'Get information about an Algorand Standard Asset', inputSchema: { type: 'object', properties: { assetId: { type: 'number', description: 'Asset ID to query', }, }, required: ['assetId'], }, },
  • Core implementation in AlgorandService class that queries the algod client for asset information by ID.
    async getAssetInfo(assetId: number) { try { const assetInfo = await this.algodClient.getAssetByID(assetId).do(); return { id: assetInfo.index, params: assetInfo.params, }; } catch (error) { throw new Error(`Failed to get asset info: ${error}`); } }

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/Jake-loranger/algorand-mcp-server'

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