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
| Name | Required | Description | Default |
|---|---|---|---|
| groupKey | Yes | ||
| groupValue | Yes | ||
| page | No | ||
| limit | No |
Implementation Reference
- src/handlers/helius.ts:356-370 (handler)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)}`); } }
- src/tools.ts:319-332 (schema)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,