Read contract
read_contractCall read-only smart contract functions on bloxberg by providing a human-readable ABI signature and optional arguments. Get on-chain data from L1 mainnet or L2 testnet without sending a transaction.
Instructions
Call a read-only (view/pure) contract function. Pass the function as a human-readable ABI signature, e.g. "function balanceOf(address) view returns (uint256)" or "function name() view returns (string)". Arguments are passed as strings and coerced by type.
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": {
"address": "<address>",
"signature": "<signature>"
},
"name": "read_contract"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| args | No | Function arguments in order, each as a string | |
| address | Yes | Contract address | |
| network | No | Target network: "l1" = bloxberg mainnet (chainId 8995), "l2-testnet" = bloxberg 2.0 testnet (chainId 77888). Defaults to "l1". | l1 |
| signature | Yes | Human-readable ABI signature of the function to call, e.g. "function ownerOf(uint256) view returns (address)". The "function " prefix is optional. |