chain-reader
chain-reader — 読み取り専用の Ethereum MCP サーバ
LLM に Ethereum を自然言語で読ませるための MCP サーバ。 秘密鍵を持たず、署名も送信もしない。すべての結果に「その答えがどこから来たか」が付く。
Tim Weingärtner (HSLU)『Ethereum & Smart Contracts』最終章「ブロックチェーンと AI」の図を、 そのまま動く形にした教材プロトタイプとして書いた。
LLM ← 自然言語(「このアドレスは何者?」)
↓
MCP ← src/server.js
↓ ← コード/構造化言語(ABI エンコード)
RPC ← src/rpc.js
↓
ブロックチェーン依存は @modelcontextprotocol/sdk と zod の 2 つだけ。
Keccak-256 も ABI エンコーダも自前で書いてある(後述の「なぜ自前で書いたか」)。
動かす
git clone <this repo> && cd chain-reader-mcp
npm ci --ignore-scripts
npm test # 単体 13 件(ネットワーク不要)
npm run smoke # 実チェーンに対して全ツールを 1 回ずつClaude Code に登録する。
claude mcp add chain-reader -- node "$PWD/src/server.js"このディレクトリで claude を起動するなら .mcp.json があるので登録は不要。
ただし初回だけ承認を求められる(claude mcp list に ⏸ Pending approval と出る)。
講義当日に慌てないよう、事前に一度起動して承認しておくこと。
Claude Desktop なら claude_desktop_config.json の mcpServers に同じ内容を書く。
その場合 args は絶対パスにする。
環境変数で対象ネットワークを切り替えられる。既定は mainnet。
変数 | 値 |
|
|
| 独自エンドポイント(指定するとネットワーク名より優先) |
いずれも API キー不要の公開エンドポイントを使う。local は anvil / hardhat node の
http://127.0.0.1:8545 を見る。
Related MCP server: MCP Etherscan Server
ツールと講義の対応
講義スライドそのものは別リポジトリ(私家版の日本語訳)にあるが、 節の名前だけ挙げておけば対応は追える。
ツール | 対応するスライド | 何が見えるか |
| ガスと取引手数料 / PoS | 基本手数料がブロックの混み具合で動くこと |
| 2種類のアカウント / Ethereum アドレス | コードの有無で EOA とコントラクトが分かれること |
| Etherscan でトランザクションを読む | 手数料 = ガス使用量 × 実効ガス価格 |
| ブロック |
|
| ABI / Solidity 入門 | セレクタが keccak256(署名) の先頭 4 バイトであること |
| ERC-20 / ERC-721 / クロークの引換札 | 名称も記号もコントラクトの自己申告であること |
| イベント駆動の UI |
|
| MCP を使うときの注意 | 鍵を持たない側にできることの限界 |
| ABI | ネットワークに触らずセレクタを計算する(板書用) |
| (論文側) | ハッシュのアンカリングで何が証明でき、何ができないか |
lecture_walkthrough プロンプトを選ぶと、1〜6 を順に辿る指示が入る。
講義でそのまま使える問いかけ
このネットワークはいま混んでいますか?
0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045 は EOA ですか、コントラクトですか?
USDC の総供給量は? その数字は誰が保証していますか?
transfer(address,uint256) のセレクタはなぜ 0xa9059cbb になるのですか?
私のアドレスから 0.001 ETH を送る取引を組み立ててください最後の問いには、AI は組み立てた JSON を返すが送れない。 そこで「なぜ送れないのか」を説明させると、スライド「MCP を使うときの注意」の内容が AI 自身の口から出てくる。
設計上の 2 つの約束
1. 鍵を持たない
src/rpc.js の ALLOWED_METHODS は読み取り専用メソッドの明示的なホワイトリスト。
eth_sendRawTransaction / eth_sendTransaction / eth_sign はそこに無く、
呼ぼうとするとネットワークに出る前に落ちる(単体テストで固定してある)。
署名の実装も秘密鍵の読み込みもこのリポジトリには存在しない。 LLM がどう誘導されても、ここから資金は動かない。
prepare_unsigned_transaction は、この境界を「できないこと」ではなく
動く形で見せるためにある。nonce もガス見積もりも手数料も埋めた完成品を返し、
署名だけを人間に残す。講義スライドの
「MCP が安全に行えるのは、読み取り専用の呼び出しと、署名済みトランザクションの中継の 2 つに限られる」
がそのまま実装になっている。
2. 答えの出どころを捨てない
すべての結果に _provenance が付く。
"_provenance": {
"endpoint": "https://ethereum-rpc.publicnode.com",
"network": "mainnet (Ethereum Mainnet)",
"rpc_calls": ["eth_blockNumber (1309ms)", "eth_gasPrice (1416ms)", "eth_chainId (1769ms)", "eth_getBlockByNumber (1023ms)"],
"note": "これは単一の RPC エンドポイントの応答であり、独立に検証したものではない。"
}「ブロックチェーンだから正しい」で止めないための仕掛け。
LLM は数値を自信たっぷりに言い切る癖があるので、どの主張がどの層に立っているかを
結果自体に持たせる。サーバの instructions でも、チェーンが保証した事実と
誰かが申告した内容を区別して説明するよう指示している。
帰属できることと、検証できることは違う
このサーバの出力設計は、記録管理・デジタルアーカイブの文脈から来ている。 言えることとそれが本当であることの差を、ツールの出力に埋め込んである。
read_token の self_reported_note — name() が "USD Coin" を返したという事実は
チェーンが保証する。しかしそのコントラクトが本当に Circle のものかは保証しない。
同じ名前と記号のコントラクトは誰でもデプロイできる。
チェーンが保証するのは「この住所のコードがこう答えた」ことまでで、その主張の真偽ではない。
verify_anchor の what_this_does_not_prove — アンカリングが与えるのは
「いつ・誰が・何を主張したか」であって「その主張が正しいか」ではない。
誤った測定値のハッシュも、正しい測定値のハッシュと同じように刻める。
真正性 (authenticity) は真実性 (truth) ではない、という古文書学の区別がそのまま出る。
_provenance — 記録の品質とは、その来歴グラフの形のことである、という考え方の最小実装。
どのエンドポイントが、どの RPC 呼び出しで、何ミリ秒で答えたか。
PROV-O でいう prov:wasAttributedTo を誰にするかを、後から決められる状態にしておく。
署名された申告 / 公開情報との突合 / TEE アテステーション / 機関的な認証 と層を上げていくと 検証の強度は増すが、どこまで行っても「測定器そのもの」は検証できない。 このプロトタイプが実演しているのはその最下層 —— 帰属はできるが検証はできない領域。 だからこそ、どの層に立っている数値なのかを記録の側に残す。
なぜ Keccak も ABI も自前で書いたか
viem や ethers を入れれば 3 行で済む。あえて書いた理由が 2 つある。
講義の題材だから。 ABI が魔法のままでは「なぜ 4 バイトなのか」を説明できない。
src/keccak.jsとsrc/abi.jsは合わせて 300 行ほどで、受講者が読み切れる。依存を 2 つに抑えられるから。 サプライチェーンの面積が小さいほど、 3 年後に
npm ciして動く確率が上がる。
Node の crypto にある sha3-256 は NIST SHA-3 で、Ethereum の Keccak-256 とは
パディングが違う(0x06 と 0x01)ので流用できない。ここは実装するしかない。
対応範囲は address / uintN / intN / bool / bytesN / string / bytes と
その動的配列まで。タプルと入れ子の動的配列は扱わない。プロトタイプの範囲としては十分だが、
本番で任意のコントラクトを相手にするなら viem に置き換えること。
既知の限界
単一の RPC を信じている。 複数エンドポイントに同じ問いを投げて突き合わせれば 信頼の層が 1 つ上がる。実装していない
タプル型を扱えない。 Uniswap V3 の
slot0()のような戻り値はデコードできないread_eventsの走査範囲は既定で 200 ブロック。 公開エンドポイントは 広いeth_getLogsを拒否することがあるverify_anchorは部分文字列一致で探している。 アンカー用コントラクトの ABI が分かっているなら、正しく引数をデコードして照合すべきlocalネットワーク以外は公開エンドポイント依存。講義当日に落ちている可能性を考えて、anvil --fork-urlでローカルにフォークしておくと安全
ファイル構成
src/keccak.js Keccak-256(既知ベクタで固定)
src/abi.js ABI エンコード/デコード
src/rpc.js JSON-RPC クライアント + 読み取り専用ホワイトリスト
src/tools.js ツール 10 個の実体。MCP から独立していて単体で呼べる
src/server.js MCP サーバ(stdio)
test/unit.test.js ネットワーク不要の単体テスト
test/smoke.mjs 実チェーンに対する疎通確認
test/mcp-handshake.mjs MCP プロトコルの往復確認Available Tools
10 toolsaccount_infoアカウントを調べるARead-only
アドレスの残高・送信済みトランザクション数 (nonce)・コードの有無を返す。コードの有無で EOA(秘密鍵で操作するアカウント)とコントラクトを判別する。
| Name | Required | Description | Default |
|---|---|---|---|
| block | No | ブロック番号または latest / finalized など。既定は latest | |
| address | Yes | 0x から始まる 20 バイトのアドレス | |
| network | No | 対象ネットワーク。mainnet / sepolia / holesky / local か http(s) の URL。既定は mainnet |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Annotations declare readOnlyHint=true, openWorldHint=true, and destructiveHint=false. The description adds the nuance that this also tells you whether the address is a contract by checking code presence, and implies this is a lightweight read. It doesn't mention gas costs or that contract account code may change, but it's adequate given the annotations already communicate safety.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description consists of only two sentences that pack significant meaning: the first lists the returned fields, the second explains the EOA/contract distinction. No wasted words.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the low complexity (3 flat params, no output schema needed for a simple read), the description adequately covers the tool's purpose. It could benefit from a brief note on the output shape, but since no output schema is required and params are well-documented, this is nearly complete.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 100% and the schema describes each parameter (block, address, network) with defaults. The description doesn't need to add param semantics since the schema is complete and precise. Baseline 3 is appropriate.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool returns balance, nonce, and code presence for an address, and explains how to distinguish EOA from contracts. It uses specific nouns (balance, nonce, code) beyond the tool name. It doesn't explicitly distinguish from siblings like read_transaction or call_contract, but the resource and outputs are specific enough to guess.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description implies usage for account-level queries and provides a decision rule for EOA vs contract. However, it doesn't explicitly state when NOT to use it or name alternative tools, though the 'code presence' explanation hints at contract inspection. Sibling names like chain_info and read_contract are present, so some cross-referencing guidance would improve it.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
call_contractコントラクトの読み取り関数を呼ぶARead-only
任意のコントラクトの view / pure 関数を eth_call で呼ぶ。関数署名から keccak256 でセレクタを計算し、引数を ABI エンコードして送り、戻り値をデコードして返す。状態は変わらず、ガスもかからない。
| Name | Required | Description | Default |
|---|---|---|---|
| args | No | 引数の配列。署名の型と同じ順・同じ個数 | |
| block | No | この時点の状態で呼ぶ。既定は latest | |
| address | Yes | コントラクトアドレス | |
| network | No | 対象ネットワーク。mainnet / sepolia / holesky / local か http(s) の URL。既定は mainnet | |
| outputs | No | 戻り値の型。例: ["uint256"] / ["string"]。省略すると生の 16 進のまま返す | |
| signature | Yes | 関数署名。例: "balanceOf(address)" / "totalSupply()" |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Beyond the annotations (readOnlyHint, destructiveHint false), the description adds transparency about the internal process: keccak256 selector calculation, ABI encoding, and decoding of return values. It clarifies the read-only nature and no-gas behavior, which is consistent with annotations.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is concise (two sentences) and front-loaded with the main action. It conveys the necessary information without redundancy, making it well-structured and easy to parse.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
The description covers the essential aspects: purpose, process, and outcome. It lacks explicit mention of error handling or return value details, but given the schema richness and simplicity of the tool, it is sufficiently complete for a typical use case.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The schema already provides full coverage of all parameters with descriptions. The description adds context to the overall flow but does not provide additional per-parameter semantics beyond what is in the schema. Baseline 3 is appropriate given high schema coverage.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool's purpose: calling view/pure functions via eth_call, with explicit mention of selector computation and ABI encoding. It is distinct from sibling tools that read transactions, blocks, or tokens.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description implies usage for read-only queries ('view/pure', 'no state change, no gas') but does not explicitly contrast with alternatives or state when to prefer this tool over others. Guidance is implicit rather than explicit.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
chain_infoチェーンの現況ARead-only
チェーン ID、最新ブロック、基本手数料 (base fee)、ブロックの混み具合を返す。「いまネットワークはどうなっているか」を最初に見るためのツール。
| Name | Required | Description | Default |
|---|---|---|---|
| network | No | 対象ネットワーク。mainnet / sepolia / holesky / local か http(s) の URL。既定は mainnet |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
注解已声明 readOnlyHint=true、destructiveHint=false、openWorldHint=true,安全属性覆盖充分。描述未披露额外行为(如缓存、速率限制),但也没有矛盾。由于注解已负担安全上下文,描述未添加更多行为信息,因此评为中等。
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
描述为一句紧凑的日文句子,信息完整,无冗余。开头即点出返回内容,后接使用场景,效率极高。
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
工具参数少且简单,注解已涵盖安全性,描述充分覆盖目的和返回值,虽无输出 schema 但内容已列全。与兄弟工具相比,定位清晰,虽未提及错误或分页,但就复杂度而言已足够完整。
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
参数 network 的 schema 覆盖率为100%,描述仅复述了 schema 中的默认值和可选值,没有新增语义。按规则高覆盖率时基线为3,无额外补偿。
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
描述明确“返回链 ID、最新区块、基本费用和拥堵程度”,并指明这是“查看网络当前状态的初始工具”。动词“返回”与资源“链信息”明确,与兄弟工具(如 read_block、account_info)区分清晰。
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
描述提到“第一次查看网络状态”,暗示了适用场景,但没有明确说明何时不使用,也未指出替代工具。缺乏明确的“当……时使用”或“而非……”的排除条件,指南尚可但不够完整。
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
explain_selector関数セレクタ/イベント topic を計算するARead-only
関数署名やイベント署名から keccak256 を計算し、セレクタ(先頭 4 バイト)や topic0 を示す。ネットワークには一切アクセスしない。ABI がどこから来るのかを黒板で説明するためのツール。
| Name | Required | Description | Default |
|---|---|---|---|
| signature | Yes | 例: "transfer(address,uint256)" / "Transfer(address indexed from, address indexed to, uint256 value)" |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Annotations already declare readOnlyHint=true and destructiveHint=false, and the description adds the important behavioral fact that it never accesses the network — information not present in annotations. It also clarifies it's a pure computation tool for educational use. No contradictions with annotations.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Two concise sentences: the first states the core function and outputs, the second adds the no-network constraint and purpose. Every sentence earns its place with no redundancy or filler.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a simple one-parameter tool with strong annotations and no output schema, the description is complete. It explains what the tool does, what it outputs (selector/topic0), that it's offline, and its educational purpose. There is no ambiguity about usage or behavior.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 100% (the single parameter 'signature' includes examples for both function and event signatures). The description adds no further parameter-level detail beyond what's already in the schema, so a baseline of 3 is appropriate.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states it calculates keccak256 for function/event signatures and shows the selector (first 4 bytes) or topic0. It names the specific resource (signatures) and the action (calculate/show), making it distinct from sibling tools that are all network-dependent.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description explicitly mentions 'no network access at all', which clearly distinguishes it from the network-heavy sibling tools. It also states its purpose ('to explain where ABI comes from on a whiteboard'), giving context. However, it doesn't explicitly name alternative tools or say 'use this when you need offline computation', so it's short of a 5.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
prepare_unsigned_transaction未署名トランザクションを組み立てるARead-only
nonce・ガス見積もり・手数料を埋めた EIP-1559 形式のトランザクションを組み立てて返す。【重要】このサーバは署名も送信もしない。返るのは人間が MetaMask やハードウェアウォレットで内容を確認してから署名するための JSON。LLM に鍵を渡さないという境界を、実際に動く形で示すためのツール。
| Name | Required | Description | Default |
|---|---|---|---|
| to | Yes | 宛先アドレス | |
| args | No | 関数の引数 | |
| from | Yes | 送信元アドレス(nonce とガス見積もりに使うだけで、鍵は不要) | |
| network | No | 対象ネットワーク。mainnet / sepolia / holesky / local か http(s) の URL。既定は mainnet | |
| signature | No | 呼び出す関数の署名。例: "transfer(address,uint256)" | |
| value_eth | No | 送金額を ETH 単位の文字列で。既定は "0" |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
readOnlyHint=trueとdestructiveHint=falseのアノテーションと整合し、説明では「署名も送信もしない」と明記。さらに「LLMに鍵を渡さないという境界」という重要な設計意図が追加されており、単に安全操作であるだけでなく、その目的まで伝わる。これはアノテーション以上の価値を提供している。
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
2文で構成され、最初の文でツールの機能を明確に述べ、2文目で重要な注意点と目的を説明している。冗長な情報は一切なく、必要な情報が効率的に配置されている。
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
出力スキーマがないため、返り値の詳細は説明されていないが、説明に「人間がMetaMaskやハードウェアウォレットで内容を確認してから署名するためのJSON」とあり、利用目的が明確で出力の概要は伝わる。パラメータも6つで複雑さは中程度であり、説明が十分に補完している。ただし、完全な出力形式の例があればさらに良かった。
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
パラメータのスキーマ説明は100%網羅されているが、説明はそれを超える情報を加えている。特に「from」アドレスがnonceとガス見積もりにのみ使用され鍵が不要、という重要なセマンティクスが説明文に含まれており、スキーマだけでは得られない情報がある。さらに「value_eth」の既定値や「network」の既定値などもスキーマにない補足がある(ただしスキーマにも既定値はある)。
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
説明には具体的な動詞(組み立てて返す)、具体的なリソース(EIP-1559形式のトランザクション)、そして結果が人間の確認用JSONであることが明記されている。さらに送信/署名しないと明確な境界が述べられており、read系の兄弟ツールとの差別化にもつながっている。
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
「署名も送信もしない」という明示的な使用制限があり、返り値が人間の確認用であると書かれている。ただし、いつ使うべきかに関する明確な指示や、代わりに使うべきツール(例: 署名が必要な場合は別のツール)への言及はない。
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
read_blockブロックを読むARead-only
ブロックのヘッダ情報(親ハッシュ、時刻、ガス使用量、収録トランザクション数)を返す。
| Name | Required | Description | Default |
|---|---|---|---|
| block | No | ブロック番号または latest。既定は latest | |
| network | No | 対象ネットワーク。mainnet / sepolia / holesky / local か http(s) の URL。既定は mainnet | |
| include_transactions | No | 収録トランザクションのハッシュ一覧(先頭 50 件)も返す |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Annotations already declare readOnlyHint=true and destructiveHint=false, covering safety. Description adds behavior: returns header info and optionally first 50 transaction hashes (if include_transactions=true). Still, lacks details on error cases, network handling, or whether latest is resolved dynamically. Given read-only annotation, this is acceptable but not rich.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Single sentence, efficient and front-loaded with the core information. No fluff. Would be 5 if it included a usage guideline, but given its simplicity, it's near-optimal.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Tool is simple (3 optional params, read-only, no output schema). Description covers purpose and optional behavior (50-transaction limit). Could mention that network accepts URL, but that's in schema. With good annotations and full schema coverage, it's sufficiently complete for its simplicity.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema covers 100% of parameters with descriptions. Description adds nothing beyond param names. It mentions '先頭 50 件' in include_transactions description, so schema already explains behavior. Baseline 3 is correct; the description does not need extra param info since schema is complete.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
Description clearly states: reads block header info and specifies exact fields (parent hash, time, gas used, transaction count). Differentiates from siblings like read_transaction, account_info, and call_contract by focusing on block-level data. Even without title/name details, the verb '返す' plus resource 'ブロックのヘッダ情報' makes purpose explicit.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
No explicit when-to-use or alternatives mentioned. The description implies usage for block header queries, but doesn't exclude cases like needing full transactions (which could be handled by read_transaction) or chain info (chain_info). Basic context given, but no guidance on choosing this over other sibling tools.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
read_eventsイベントログを読むARead-only
コントラクトが発火したイベントを取得してデコードする。イベント署名の keccak256 が topic0 になり、indexed の引数だけが topic に載る、という仕組みがそのまま見える。dApp の画面更新はこれを購読している。
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | デコードして返す件数。既定 20 | |
| address | No | 絞り込むコントラクトアドレス。省略すると全体から探す(重い) | |
| network | No | 対象ネットワーク。mainnet / sepolia / holesky / local か http(s) の URL。既定は mainnet | |
| to_block | No | 終了ブロック。既定は latest | |
| from_block | No | 開始ブロック。既定は最新から 200 ブロック前 | |
| event_signature | Yes | イベント署名。indexed も書く。例: "Transfer(address indexed from, address indexed to, uint256 value)" |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
The annotations already indicate read-only, open-world, and non-destructive behavior. The description adds valuable context about how events are decoded (topic0, indexed arguments) and its typical use case in dApp UIs, going beyond the annotation basics without contradicting them.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is concise, consisting of three short sentences that convey the core functionality, technical detail, and typical usage. No redundancy or unnecessary elaboration.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the absence of an output schema, the description sufficiently explains what the tool does and its technical underpinnings. It covers the purpose, the event topic mechanism, and a real-world use case, providing enough context for a user to understand its role. It does not describe return format, but that is not required without an output schema.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The input schema provides comprehensive descriptions for all parameters (coverage 100%). The tool description does not add parameter-specific meaning; it only gives general context about the event decoding process. Baseline of 3 is appropriate.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool's function: retrieving and decoding contract events. It also explains the topic structure, making the purpose precise and distinct from sibling tools like read_transaction or read_block.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description implies usage by mentioning dApp UI subscriptions and the technical topic mechanism, but it does not explicitly compare to alternatives or state when to prefer this tool over others. However, the distinct purpose and sibling names make the appropriate context clear.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
read_tokenトークンを調べるARead-only
ERC-20 / ERC-721 / ERC-1155 を判別し、名称・記号・小数桁・総供給量を読む。holder を渡せば残高、token_id を渡せば NFT の所有者と tokenURI も読む。
| Name | Required | Description | Default |
|---|---|---|---|
| holder | No | 残高を調べたいアドレス | |
| address | Yes | トークンコントラクトのアドレス | |
| network | No | 対象ネットワーク。mainnet / sepolia / holesky / local か http(s) の URL。既定は mainnet | |
| token_id | No | ERC-721 のトークン ID |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
The annotations already declare this as a read-only, non-destructive operation. The description adds behavioral context by explaining what the tool returns for different parameters, which is beyond the annotations. No contradiction with annotations.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is two concise sentences, front-loaded with the core function, then optional behavior. No redundant information, perfectly efficient.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the complexity of handling multiple token standards and optional params, the description provides adequate coverage of functionality. It doesn't describe the exact output format, but since no output schema exists, it partially compensates by listing what data is read. Minor gaps remain about error handling, but overall it is sufficient for a read tool.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The schema covers all parameters with descriptions, but the tool description adds semantics by explaining how holder and token_id affect the output (balance vs. NFT owner/URI). It also clarifies the network default, exceeding the schema's basic param descriptions.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool reads token metadata (name, symbol, decimals, total supply) and optionally balance or NFT owner/URI. It uses specific verbs ('read', 'identify') and a clear resource (token), distinguishing it from siblings like account_info or call_contract.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description explains when to use the optional parameters (holder for balance, token_id for NFT details), giving clear context for usage. However, it does not explicitly compare to alternatives or state when not to use, so it lacks exclusions.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
read_transactionトランザクションを読むBRead-only
トランザクションと領収書 (receipt) を突き合わせて、送信者・宛先・送金額・ガス・実際に払った手数料・成否・calldata の関数セレクタを人間が読める形で返す。Etherscan の画面を読むのと同じ作業。
| Name | Required | Description | Default |
|---|---|---|---|
| hash | Yes | 0x から始まる 32 バイトのトランザクションハッシュ | |
| network | No | 対象ネットワーク。mainnet / sepolia / holesky / local か http(s) の URL。既定は mainnet |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Annotations already declare readOnlyHint=true and openWorldHint=true, indicating a safe read operation. The description adds that it cross-references the receipt and returns human-readable fields, which is useful but doesn't detail any constraints like requirements for the network parameter or handling of pending transactions. With annotations providing the safety profile, a score of 3 is appropriate.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is concise, with two sentences that pack substantial information about what the tool returns and its analogy to Etherscan. It is front-loaded with the main verb and resource, and every sentence contributes value. No wasted words.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the tool's moderate complexity, the description covers the key outputs and the analogy to Etherscan. With no output schema, the description should clarify return values, and it does list the fields. However, it does not mention edge cases like pending transactions or error conditions, but for a read-only tool with good annotations, this is acceptable. A score of 3 reflects that it is adequate but not exhaustive.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 100%, so the schema already explains both parameters (hash and network). The description mentions 'network' implicitly through 'Etherscan' context but adds no extra syntax or format details beyond the schema. Baseline 3 is correct when the schema fully covers parameters.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool's purpose: to read a transaction and its receipt, returning sender, destination, amount, gas, actual fee, success/failure, and calldata function selector in human-readable form. It distinguishes from siblings by focusing on transaction-level details, though it doesn't explicitly name alternatives.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description implies the tool is for reading transaction details, similar to viewing Etherscan, but does not explicitly state when to use it versus alternatives like read_block or call_contract. It mentions it reads both transaction and receipt, providing some context, but no exclusions or alternative tool names.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
verify_anchorチェーンに刻まれたハッシュと手元のファイルを突き合わせるARead-only
手元のファイル(またはテキスト)の keccak256 を計算し、指定したトランザクションの calldata やイベントログにその値が現れるかを確認する。存在証明とタイムスタンプの検証。結果には「これで何が証明できて、何が証明できないか」を必ず併記する。
| Name | Required | Description | Default |
|---|---|---|---|
| text | No | ファイルの代わりに直接テキストを渡す | |
| network | No | 対象ネットワーク。mainnet / sepolia / holesky / local か http(s) の URL。既定は mainnet | |
| tx_hash | Yes | アンカーしたトランザクションのハッシュ | |
| file_path | No | 照合したいローカルファイルのパス | |
| expected_hash | No | 既に計算済みの keccak256 を直接渡す |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Annotations already declare readOnlyHint and openWorldHint. The description adds behavioral context by explaining that the tool checks both calldata and event logs, and that the result includes an explicit statement of what can and cannot be proven. This is valuable beyond the annotations.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is two sentences, front-loaded with the action, and ends with a note about the output's epistemic caveat. Every sentence earns its place with no redundancy or filler.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a tool with no output schema, the description gives a reasonable sense of the output by mentioning the proof-limitation note. It does not explicitly clarify that only one of text/file_path/expected_hash should be provided, nor does it describe the return structure in detail, but the core behavior is well covered.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 100%, so the schema already documents all five parameters. The description mentions file/text as input options but does not elaborate on the relationship between file_path, text, and expected_hash, nor does it add format details. It meets the baseline but does not add significant parameter meaning.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the core action: compute the keccak256 of a local file/text and verify whether that value appears in a given transaction's calldata or event logs. It also specifies the purpose as existence proof and timestamp verification, which distinguishes it from the sibling read/query tools.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description implies usage context: it is for verifying that a file's hash is anchored on-chain, useful for existence proofs and timestamp verification. However, it does not explicitly mention alternatives or state when not to use this tool, so it stops short of a 5.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
10 tool updates
v0.1.0- First observed
account_info - First observed
call_contract - First observed
chain_info - First observed
explain_selector - First observed
prepare_unsigned_transaction - First observed
read_block - First observed
read_events - First observed
read_token - First observed
read_transaction - First observed
verify_anchor
TDQS
Scored across 10 tools
Each tool addresses a distinct blockchain data aspect: network info, account info, transaction details, block details, contract calls, token data, event logs, unsigned tx preparation, anchor verification, and selector computation. Even call_contract and read_token serve different levels of abstraction, avoiding functional overlap.
Most tools follow a verb_noun pattern (read_transaction, call_contract, prepare_unsigned_transaction), but chain_info and account_info are noun_noun, creating a minor inconsistency. All names are descriptive and underscore-separated, which helps clarity.
With 10 tools, the server provides comprehensive coverage of blockchain reading and related utilities without unnecessary redundancy. The count is well-balanced for its stated purpose.
The server covers core read operations (chain, account, transactions, blocks, contracts, tokens, events) and adjacent utilities (tx preparation, hashing). Missing features like batch transaction listing or account history are minor gaps that agents can work around.
Related MCP Connectors
Self-hosted MCP server: 26 deterministic dev, security, and EVM tools.
An MCP server that provides read access to your cloud storage providers, bank accounts and more.
Read-only MCP server for The Quiet Protocol's engines, benchmarks, proof, and business data.
Ethereum MCP: Chainlink feeds, gas, ERC-20, ENS, ABI, contract calls, ERC-8004, EAS.
Related MCP Servers
- AlicenseBqualityDmaintenanceAn MCP server that provides access to Etherscan blockchain data APIs, allowing users to query Ethereum blockchain information through natural language.6218 npm18MIT
- AlicenseBqualityDmaintenanceAn MCP server providing comprehensive access to Ethereum blockchain data across 72+ networks via Etherscan's V2 API. It enables users to check balances, track transactions, analyze smart contracts, and monitor gas prices through natural language.2415 npm1MIT
- AlicenseNot gradedqualityCmaintenanceAn MCP server that bridges AI models with Ethereum blockchains via all JSON-RPC calls, enabling natural language queries for block numbers, balances, transactions, and smart contract data.12 npm21MIT
- AlicenseAqualityCmaintenanceA read-only MCP server that queries multichain EVM on-chain data through Blockscout REST API, providing tools for address info, transactions, logs, and more.1615 npmMIT