---
title: "Inspect contract code"
method: GET
path: "/inspect_contract_code"
tags: ["Contracts"]
---

# Inspect contract code

`GET /inspect_contract_code`

Inspects a verified contract's source code or metadata.

## Query parameters

- `chain_id` string, required
- `address` string, required
- `file_name` string

## Response `200`

Contract source code or metadata

- ToolResponse — Standard response structure for all API endpoints
  - `data` union, required — The main data payload of the response. Structure varies by endpoint.
    - object
    - string
    - number
    - boolean
  - `data_description` string[], nullable — Optional list of strings explaining the structure or fields of the data payload
  - `notes` string[], nullable — Optional list of important warnings or contextual notes, such as data truncation alerts
  - `instructions` string[], nullable — Optional list of suggested follow-up actions for an AI agent
  - `pagination` Pagination — Pagination information for endpoints that return large datasets
    - `next_call` object, required
      - `tool_name` string, required — The tool name to use for the next request
      - `params` object, required — Parameters for the next request including the cursor
        - `cursor` string, required — Opaque cursor string containing all necessary pagination information

## Other responses

- `400` — Client-side error - validation errors, missing parameters, etc.
- `500` — Server-side error - internal server errors
- `504` — Downstream service timeout - request to external service timed out

---

[API](https://skmtc.dev/blockscout/apis/blockscout-mcp-server-rest-api.md) · [All operations](https://skmtc.dev/blockscout/apis/blockscout-mcp-server-rest-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/blockscout/blockscout-mcp-server-rest-api/revisions/4e33c6973e49/schema)
