onchain_search_tokens
Multi-chain token search across 200+ chains. Pass either a free-text phrase (token name / symbol — "PEPE", "wrapped bitcoin", "shiba inu") OR a raw token address; both work through the same query field. Optionally scope to specific chains via networkIds (e.g. [1, 137, 8453] for Ethereum + Polygon + Base). Returns { count, results } where each result has the token (id, address, name, symbol, decimals, networkId, logo, description, blueCheckmark) plus live stats (priceUSD, volume24, change24, liquidity, marketCap). Use this BEFORE any other onchain tool when the user gives a token by name and you need the address+chain — e.g. "what's SHIB doing", "find PEPE", "is wrapped BTC at the right price". Avoid when the user already gave you {address, chainId} — go straight to onchain_get_token_metadata / onchain_get_token_usd_price.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"query": "<query>"
},
"name": "onchain_search_tokens"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | Max results (default 25, max 100). | |
| query | Yes | Phrase (name/symbol) or raw token address. The wrapper passes it as Codex's `phrase` field which handles both forms. | |
| offset | No | Pagination offset. | |
| networkIds | No | Scope to specific chain IDs (e.g. [1, 137, 8453]). Omit for global search across every chain Codex covers. |