Skip to main content
Glama

get_asset_info

Retrieve detailed information about an Algorand Standard Asset by providing its unique Asset ID. Use this tool within the Algorand MCP Server to access essential asset data for blockchain operations.

Instructions

Get information about an Algorand Standard Asset

Input Schema

NameRequiredDescriptionDefault
assetIdYesAsset ID to query

Input Schema (JSON Schema)

{ "properties": { "assetId": { "description": "Asset ID to query", "type": "number" } }, "required": [ "assetId" ], "type": "object" }

Implementation Reference

  • Handler logic in the main tool router switch statement that parses input arguments using the schema, calls the AlgorandService.getAssetInfo method, and formats the response as MCP content.
    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 the input arguments of 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, including name, description, and JSON inputSchema matching the Zod schema.
    { 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 Algorand node for asset information by ID and returns simplified asset data.
    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}`); } }

Other Tools

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

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