Skip to main content
Glama

helius_get_assets_by_group

Retrieve digital assets from the Solana blockchain by specifying a group category and value, enabling targeted queries for tokens and NFTs based on shared attributes.

Instructions

Get assets by group key and value

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
groupKeyYes
groupValueYes
pageNo
limitNo

Implementation Reference

  • The handler function that executes the tool logic: validates input, calls Helius RPC getAssetsByGroup, and returns formatted success or error response.
    export const getAssetsByGroupHandler = async (input: { groupKey: string, groupValue: string, page?: number, limit?: number }): Promise<ToolResultSchema> => { try { // Fix the parameter type mismatch const params = { groupKey: input.groupKey, groupValue: input.groupValue, page: input.page || 1, // Default to page 1 if not provided limit: input.limit || 10 // Default to 10 if not provided }; const assets = await (helius as any as Helius).rpc.getAssetsByGroup(params); return createSuccessResponse(`Assets by group: ${JSON.stringify(assets, null, 2)}`); } catch (error) { return createErrorResponse(`Error getting assets by group: ${error instanceof Error ? error.message : String(error)}`); } }
  • The tool schema defining name, description, and input validation schema.
    { name: 'helius_get_assets_by_group', description: 'Get assets by group key and value', inputSchema: { type: 'object', properties: { groupKey: { type: 'string' }, groupValue: { type: 'string' }, page: { type: 'number' }, limit: { type: 'number' } }, required: ['groupKey', 'groupValue'] } },
  • src/tools.ts:576-576 (registration)
    Registration of the tool name to its handler function in the central handlers dictionary.
    "helius_get_assets_by_group": helius.getAssetsByGroupHandler,

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/dcSpark/mcp-server-helius'

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