helius_get_assets_by_group
Retrieve assets from Solana blockchain using a specific group key and value via MCP Helius, enabling targeted data access for wallets, tokens, and NFTs with pagination support.
Instructions
Get assets by group key and value
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| groupKey | Yes | ||
| groupValue | Yes | ||
| limit | No | ||
| page | No |
Input Schema (JSON Schema)
{
"properties": {
"groupKey": {
"type": "string"
},
"groupValue": {
"type": "string"
},
"limit": {
"type": "number"
},
"page": {
"type": "number"
}
},
"required": [
"groupKey",
"groupValue"
],
"type": "object"
}
Implementation Reference
- src/handlers/helius.ts:356-370 (handler)The main handler function that executes the tool logic: prepares parameters, calls Helius RPC getAssetsByGroup, and returns formatted 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:320-332 (schema)Input schema and metadata definition for the tool.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)Maps the tool name to its handler function in the central handlers dictionary."helius_get_assets_by_group": helius.getAssetsByGroupHandler,