helius_search_assets
Search for Solana blockchain assets using filters like owner address, creator, or metadata to find specific tokens and NFTs.
Instructions
Search for assets using various filters
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| page | No | ||
| limit | No | ||
| cursor | No | ||
| before | No | ||
| after | No | ||
| creatorAddress | No | ||
| ownerAddress | No | ||
| jsonUri | No | ||
| grouping | No | ||
| burnt | No | ||
| frozen | No | ||
| supplyMint | No | ||
| supply | No | ||
| delegate | No | ||
| compressed | No |
Implementation Reference
- src/handlers/helius.ts:417-427 (handler)The handler function that executes the tool logic by calling the Helius SDK's rpc.searchAssets method with the input parameters.
export const searchAssetsHandler = async (input: SearchAssetsInput): Promise<ToolResultSchema> => { try { const assets = await (helius as any as Helius).rpc.searchAssets(input); if (!assets || assets.items.length === 0) { return createErrorResponse(`No assets found for search: ${JSON.stringify(input, null, 2)}`); } return createSuccessResponse(`Search results: ${JSON.stringify(assets, null, 2)}`); } catch (error) { return createErrorResponse(`Error searching assets: ${error instanceof Error ? error.message : String(error)}`); } } - src/tools.ts:372-409 (schema)The input schema definition for the helius_search_assets tool, defining all possible search filters and validation rules.
{ name: 'helius_search_assets', description: 'Search for assets using various filters', inputSchema: { type: 'object', properties: { page: { type: 'number' }, limit: { type: 'number' }, cursor: { type: 'string' }, before: { type: 'string' }, after: { type: 'string' }, creatorAddress: { type: 'string' }, ownerAddress: { type: 'string' }, jsonUri: { type: 'string' }, grouping: { type: 'array', items: { type: 'string' } }, burnt: { type: 'boolean' }, frozen: { type: 'boolean' }, supplyMint: { type: 'string' }, supply: { type: 'number' }, delegate: { type: 'string' }, compressed: { type: 'boolean' } }, // At least one filter parameter should be provided anyOf: [ { required: ['ownerAddress'] }, { required: ['creatorAddress'] }, { required: ['jsonUri'] }, { required: ['supplyMint'] }, { required: ['delegate'] }, { required: ['burnt'] }, { required: ['frozen'] }, { required: ['compressed'] } ] } }, - src/tools.ts:580-580 (registration)Registration of the tool name mapping to its handler function in the handlers dictionary.
"helius_search_assets": helius.searchAssetsHandler, - src/handlers/helius.types.ts:208-224 (schema)TypeScript type definition for the SearchAssetsInput used in the handler.
export type SearchAssetsInput = { page?: number; limit?: number; cursor?: string; before?: string; after?: string; creatorAddress?: string; ownerAddress?: string; jsonUri?: string; grouping?: string[]; burnt?: boolean; frozen?: boolean; supplyMint?: string; supply?: number; delegate?: string; compressed?: boolean; } - src/tools.ts:1-1 (registration)Import of the helius module containing the searchAssetsHandler.
import * as helius from './handlers/helius.js';