Blockscout MCP
read_contract
Calls a smart contract function (view/pure, or non-view/pure simulated via eth_call) and returns the decoded result. This tool provides a direct way to query the state of a smart contract. Example: To check the USDT balance of an address on Ethereum Mainnet, you would use the following arguments: { "tool_name": "read_contract", "params": { "chain_id": "1", "address": "0xdAC17F958D2ee523a2206206994597C13D831ec7", "abi": { "constant": true, "inputs": [{"name": "_owner", "type": "address"}], "name": "balanceOf", "outputs": [{"name": "balance", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function" }, "function_name": "balanceOf", "args": "["0xF977814e90dA44bFA03b6295A0616a897441aceC"]" } }
Other tools also called read_contract?
See providers with this name
Input Schema
{
"type": "object",
"properties": {
"abi": {
"type": "object",
"title": "Abi",
"description": "The JSON ABI for the specific function being called. This should be a dictionary that defines the function's name, inputs, and outputs. The function ABI can be obtained using the `get_contract_abi` tool.",
"additionalProperties": true
},
"args": {
"type": "string",
"title": "Args",
"default": "[]",
"description": "A JSON string containing an array of arguments. Example: \"[\"0xabc...\"]\" for a single address argument, or \"[]\" for no arguments. Order and types must match ABI inputs. Addresses: use 0x-prefixed strings; Numbers: prefer integers (not quoted); numeric strings like \"1\" are also accepted and coerced to integers. Bytes: keep as 0x-hex strings."
},
"block": {
"anyOf": [
{
"type": "string"
},
{
"type": "integer"
}
],
"title": "Block",
"default": "latest",
"description": "The block identifier to read the contract state from. Can be a block number (e.g., 19000000) or a string tag (e.g., 'latest'). Defaults to 'latest'."
},
"address": {
"type": "string",
"title": "Address",
"description": "Smart contract address"
},
"chain_id": {
"type": "string",
"title": "Chain Id",
"description": "The ID of the blockchain"
},
"function_name": {
"type": "string",
"title": "Function Name",
"description": "The symbolic name of the function to be called. This must match the `name` field in the provided ABI."
}
}
}