get_contract_source_files
Fetch a verified contract's source files from Sourcify. Returns either a single file (when `filePath` is set, e.g. `contracts/Foo.sol`) or the full sources map (when `filePath` is omitted). The contract must already be verified on Sourcify; gate the call with `is_contract_verified` first — a 404 here means the contract is not on Sourcify and there are no files to return. The tool does not return the ABI or the compiler metadata; pull those with a Sourcify-specific call when a future caller needs them.
Fetch a verified contract's source files from Sourcify. Returns either a single file (when filePath is set, e.g. contracts/Foo.sol) or the full sources map (when filePath is omitted).
Input
The tool takes a single JSON object. Every field, its type, and an example are on the generated reference at GET /mcp/tools, under this tool's name.
Calling it
{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": { "name": "get_contract_source_files", "arguments": {} }
}Put your arguments in place of the empty object. A call that fails comes back as a normal result carrying isError: true and a message naming what went wrong, not as a JSON-RPC protocol error.
Notes
The contract must already be verified on Sourcify; gate the call with is_contract_verified first — a 404 here means the contract is not on Sourcify and there are no files to return. The tool does not return the ABI or the compiler metadata; pull those with a Sourcify-specific call when a future caller needs them.
The full request and response shape, and a live playground, live on the generated reference at GET /mcp/tools.
is_contract_verified
Check whether a contract address is verified on Sourcify, and report the match status (full match, exact byte-for-byte match, or unverified). Returns the minimal record — match type, runtime/creation match, and the verification timestamp — without pulling sources or ABI. Use this as a gate before calling `get_contract_source_files`; a 404 here means the contract is not on Sourcify and the file-fetch tool will not have anything to return.
DeFi
The nine Uniswap API tools: a quote, an approval check, the swappable-token