Skip to main content
Glama

contract source

contract_source
Read-only

Verified source code of a smart contract (follows EIP-1967 proxies to the implementation): every source file, ABI, contract name, compiler, optimizer settings, EVM version and SPDX licenses, from Sourcify. Costs $0.003 USDC per call (x402).

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>"
    },
    "name": "contract_source"
  }
}

Input Schema

NameRequiredDescriptionDefault
chainNo
addressYes
contentNoInclude file contents (default true)
follow_proxyNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A3.7/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations cover the safety profile (readOnlyHint, openWorldHint), and the description adds genuinely non-structured context: the data source (Sourcify), EIP-1967 proxy traversal, the paid x402 cost of $0.003 USDC per call, and the implicit constraint that unverified contracts will not return source. Rate limits and failure behavior are still unstated.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

A single front-loaded sentence whose parenthetical carries the payload details, followed by the pricing note. No filler, though the artifact enumeration is dense enough that it slightly crowds out routing guidance.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

With no output schema, the description usefully enumerates what is returned, and it discloses the payment model and data source - the two things an agent most needs before spending money on a call. Missing chain/address semantics and sibling routing keep it short of complete.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is only 25%, so the description must carry weight. It does explain proxy behavior ('follows EIP-1967 proxies to the implementation'), which maps onto the undocumented follow_proxy flag and gives the default-by-implication context the schema lacks. It says nothing about chain or address format expectations, so the coverage gap is only partly closed.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

Names a specific verb+resource ('verified source code of a smart contract') and enumerates the returned artifacts (files, ABI, compiler, optimizer settings, EVM version, SPDX), so the agent knows exactly what it gets. It does not differentiate itself from close siblings such as contract_inspect or contracts, leaving that comparison to inference.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Implied usage only: 'from Sourcify' and 'Verified source code' tell the agent this applies to contracts with verified Sourcify entries, and the proxy note hints at when proxy traversal matters. There is no explicit when-to-use, when-not-to-use, or named alternative versus contract_inspect/contracts.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources