{
  "x402Version": 2,
  "id": 37914,
  "slug": "37914",
  "resource": "https://api.teardrop.dev/tools/mcp#read_contract",
  "description": "Teardrop read_contract: Call any view/pure function on a smart contract and return the decoded result, using a supplied ABI fragment. Supports historical reads via block_identifier and caller_address context for msg.sender-dependent views. Read-only: state-changing functions are rejected.",
  "type": "http",
  "resourceType": "MCP Tool",
  "accepts": [
    {
      "scheme": "exact",
      "network": "eip155:8453",
      "payTo": "0xF2Eec9De86274913F85A8aA6427Ad65a9B0bC90a",
      "asset": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
      "amount": "5000",
      "amountUsd": 0.005,
      "maxTimeoutSeconds": 300
    }
  ],
  "outputSchema": {
    "properties": {
      "example": {
        "properties": {
          "block_identifier": {
            "type": "string"
          },
          "caller_address": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null
          },
          "chain_id": {
            "type": "integer"
          },
          "contract_address": {
            "type": "string"
          },
          "function_name": {
            "type": "string"
          },
          "result": {}
        },
        "required": [
          "contract_address",
          "function_name",
          "result",
          "block_identifier",
          "chain_id"
        ],
        "type": "object"
      },
      "type": {
        "type": "string"
      }
    },
    "required": [
      "type"
    ],
    "type": "object"
  },
  "extensions": {
    "bazaar": {
      "info": {
        "input": {
          "description": "Call any view/pure function on a smart contract and return the decoded result, using a supplied ABI fragment. Supports historical reads via block_identifier and caller_address context for msg.sender-dependent views. Read-only: state-changing functions are rejected.",
          "inputSchema": {
            "properties": {
              "abi_fragment": {
                "description": "JSON array containing the ABI for the function to call. Supports both modern (stateMutability: view/pure) and legacy (constant: true) formats. Only read-only functions are allowed.",
                "maxLength": 65536,
                "title": "Abi Fragment",
                "type": "string"
              },
              "args": {
                "description": "DEPRECATED: Positional arguments for the function call. Use 'args_json' for complex objects or Gemini compatibility.",
                "items": {
                  "type": "string"
                },
                "maxItems": 50,
                "title": "Args",
                "type": "array"
              },
              "args_json": {
                "anyOf": [
                  {
                    "maxLength": 2000,
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ],
                "default": null,
                "description": "Optional JSON array string of positional arguments for the function call. Use this instead of 'args' for complex types or when calling via Google/Gemini.",
                "title": "Args Json"
              },
              "block_identifier": {
                "default": "latest",
                "description": "Block number, block hash, or 'latest'/'earliest'/'pending'",
                "maxLength": 80,
                "title": "Block Identifier",
                "type": "string"
              },
              "caller_address": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ],
                "default": null,
                "description": "Optional EVM address to supply as msg.sender for caller-dependent view functions. This does not sign or submit a transaction.",
                "title": "Caller Address"
              },
              "chain_id": {
                "default": 1,
                "description": "Chain ID (1=Ethereum, 8453=Base)",
                "title": "Chain Id",
                "type": "integer"
              },
              "contract_address": {
                "description": "Contract address (0x…)",
                "title": "Contract Address",
                "type": "string"
              },
              "function_name": {
                "description": "Name of the function to call",
                "maxLength": 200,
                "title": "Function Name",
                "type": "string"
              }
            },
            "required": [
              "contract_address",
              "abi_fragment",
              "function_name"
            ],
            "title": "ReadContractInput",
            "type": "object"
          },
          "toolName": "read_contract",
          "transport": "streamable-http",
          "type": "mcp"
        },
        "output": {
          "example": {
            "block_identifier": "",
            "chain_id": 0,
            "contract_address": "",
            "function_name": "",
            "result": null
          },
          "type": "json"
        }
      },
      "schema": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "properties": {
          "input": {
            "additionalProperties": false,
            "properties": {
              "description": {
                "type": "string"
              },
              "inputSchema": {
                "type": "object"
              },
              "toolName": {
                "type": "string"
              },
              "transport": {
                "enum": [
                  "streamable-http",
                  "sse"
                ],
                "type": "string"
              },
              "type": {
                "const": "mcp",
                "type": "string"
              }
            },
            "required": [
              "type",
              "toolName",
              "inputSchema"
            ],
            "type": "object"
          },
          "output": {
            "properties": {
              "example": {
                "properties": {
                  "block_identifier": {
                    "type": "string"
                  },
                  "caller_address": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ],
                    "default": null
                  },
                  "chain_id": {
                    "type": "integer"
                  },
                  "contract_address": {
                    "type": "string"
                  },
                  "function_name": {
                    "type": "string"
                  },
                  "result": {}
                },
                "required": [
                  "contract_address",
                  "function_name",
                  "result",
                  "block_identifier",
                  "chain_id"
                ],
                "type": "object"
              },
              "type": {
                "type": "string"
              }
            },
            "required": [
              "type"
            ],
            "type": "object"
          }
        },
        "required": [
          "input"
        ],
        "type": "object"
      }
    }
  },
  "tags": [
    "bazaar"
  ],
  "sourceHost": "api.teardrop.dev",
  "lastUpdated": "2026-10-08T00:44:07.433Z",
  "quality": {
    "calls30d": 0,
    "uniquePayers30d": 0,
    "lastCalledAt": "2026-10-05T01:32:23.143Z"
  },
  "metadata": {
    "extensions": {
      "bazaar": {
        "info": {
          "input": {
            "description": "Call any view/pure function on a smart contract and return the decoded result, using a supplied ABI fragment. Supports historical reads via block_identifier and caller_address context for msg.sender-dependent views. Read-only: state-changing functions are rejected.",
            "inputSchema": {
              "properties": {
                "abi_fragment": {
                  "description": "JSON array containing the ABI for the function to call. Supports both modern (stateMutability: view/pure) and legacy (constant: true) formats. Only read-only functions are allowed.",
                  "maxLength": 65536,
                  "title": "Abi Fragment",
                  "type": "string"
                },
                "args": {
                  "description": "DEPRECATED: Positional arguments for the function call. Use 'args_json' for complex objects or Gemini compatibility.",
                  "items": {
                    "type": "string"
                  },
                  "maxItems": 50,
                  "title": "Args",
                  "type": "array"
                },
                "args_json": {
                  "anyOf": [
                    {
                      "maxLength": 2000,
                      "type": "string"
                    },
                    {
                      "type": "null"
                    }
                  ],
                  "default": null,
                  "description": "Optional JSON array string of positional arguments for the function call. Use this instead of 'args' for complex types or when calling via Google/Gemini.",
                  "title": "Args Json"
                },
                "block_identifier": {
                  "default": "latest",
                  "description": "Block number, block hash, or 'latest'/'earliest'/'pending'",
                  "maxLength": 80,
                  "title": "Block Identifier",
                  "type": "string"
                },
                "caller_address": {
                  "anyOf": [
                    {
                      "type": "string"
                    },
                    {
                      "type": "null"
                    }
                  ],
                  "default": null,
                  "description": "Optional EVM address to supply as msg.sender for caller-dependent view functions. This does not sign or submit a transaction.",
                  "title": "Caller Address"
                },
                "chain_id": {
                  "default": 1,
                  "description": "Chain ID (1=Ethereum, 8453=Base)",
                  "title": "Chain Id",
                  "type": "integer"
                },
                "contract_address": {
                  "description": "Contract address (0x…)",
                  "title": "Contract Address",
                  "type": "string"
                },
                "function_name": {
                  "description": "Name of the function to call",
                  "maxLength": 200,
                  "title": "Function Name",
                  "type": "string"
                }
              },
              "required": [
                "contract_address",
                "abi_fragment",
                "function_name"
              ],
              "title": "ReadContractInput",
              "type": "object"
            },
            "toolName": "read_contract",
            "transport": "streamable-http",
            "type": "mcp"
          },
          "output": {
            "example": {
              "block_identifier": "",
              "chain_id": 0,
              "contract_address": "",
              "function_name": "",
              "result": null
            },
            "type": "json"
          }
        },
        "schema": {
          "$schema": "https://json-schema.org/draft/2020-12/schema",
          "properties": {
            "input": {
              "additionalProperties": false,
              "properties": {
                "description": {
                  "type": "string"
                },
                "inputSchema": {
                  "type": "object"
                },
                "toolName": {
                  "type": "string"
                },
                "transport": {
                  "enum": [
                    "streamable-http",
                    "sse"
                  ],
                  "type": "string"
                },
                "type": {
                  "const": "mcp",
                  "type": "string"
                }
              },
              "required": [
                "type",
                "toolName",
                "inputSchema"
              ],
              "type": "object"
            },
            "output": {
              "properties": {
                "example": {
                  "properties": {
                    "block_identifier": {
                      "type": "string"
                    },
                    "caller_address": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ],
                      "default": null
                    },
                    "chain_id": {
                      "type": "integer"
                    },
                    "contract_address": {
                      "type": "string"
                    },
                    "function_name": {
                      "type": "string"
                    },
                    "result": {}
                  },
                  "required": [
                    "contract_address",
                    "function_name",
                    "result",
                    "block_identifier",
                    "chain_id"
                  ],
                  "type": "object"
                },
                "type": {
                  "type": "string"
                }
              },
              "required": [
                "type"
              ],
              "type": "object"
            }
          },
          "required": [
            "input"
          ],
          "type": "object"
        }
      }
    }
  },
  "liveness": {
    "reliability": null
  },
  "verified": false,
  "featured": false,
  "provider": {
    "host": "api.teardrop.dev",
    "manifest_name": "api.teardrop.dev",
    "source": "cdp-mirror",
    "source_manifest_url": "https://api.cdp.coinbase.com/platform/v2/x402/discovery/resources",
    "submitted_at": "2026-10-14T01:15:01.050Z"
  },
  "exampleResponse": {
    "example": {
      "block_identifier": "string",
      "caller_address": null,
      "chain_id": 0,
      "contract_address": "string",
      "function_name": "string",
      "result": null
    },
    "type": "string"
  }
}