-
Notifications
You must be signed in to change notification settings - Fork 0
feat: Added example environment variable files and test tool scriptsEssential tools #1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
- Added a `.env.example` file with Etherscan API configuration instructions - Updated `README.md` to provide the necessary tools for building the agent - Added a `test_all_tools.py` script to thoroughly test all Etherscan MCP tools and generate reports
- Added a `.env.example` file with Etherscan API configuration instructions - Updated `README.md` to provide the necessary tools for building the agent - Added a `test_all_tools.py` script to thoroughly test all Etherscan MCP tools and generate reports
WalkthroughAdds Changes
Sequence Diagram(s)sequenceDiagram
autonumber
actor User
participant Main as main()
participant Env as load_env()
participant TT as ToolTester
participant Cat as Category Tests
participant Call as api_call()
participant API as Etherscan API
participant Report as tool_test_results.json
User->>Main: Run test_all_tools.py
Main->>Env: Load .env / validate ETHERSCAN_API_KEY
Env-->>Main: API key (or error)
Main->>TT: Initialize ToolTester
Main->>TT: run_all_tests()
activate TT
TT->>Cat: Start category test loop
loop For each tool/test_config
Cat->>TT: _run_single_test(test_config)
TT->>Call: test_tool(tool_name, params)
Call->>API: HTTP request
API-->>Call: Response or Error
Call-->>TT: Result + latency + output
TT->>TT: _check_pro_requirement(result)
TT->>TT: _categorize_tool(result)
end
deactivate TT
Main->>TT: generate_report()
TT->>Report: Write `tool_test_results.json`
TT-->>Main: Report path
Main-->>User: Print summary + report saved
Estimated code review effort🎯 4 (Complex) | ⏱️ ~60 minutes Poem
Tip 🔌 Remote MCP (Model Context Protocol) integration is now available!Pro plan users can now connect to remote MCP servers from the Integrations page. Connect with popular remote MCPs such as Notion and Linear to add more context to your reviews and chats. ✨ Finishing Touches
🧪 Generate unit tests
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. CodeRabbit Commands (Invoked using PR/Issue comments)Type Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 6
🧹 Nitpick comments (8)
.env.example (1)
1-3: Add trailing newline to satisfy dotenv linters.Fixes EndingBlankLine warning and keeps tooling happy.
Apply this diff:
ETHERSCAN_API_KEY=your_api_key_here +README.md (4)
60-65: Fix example command path for MCPTools.The example likely runs from repo root; the current path will fail unless nested. Prefer a relative command to server.py.
Proposed change:
- command="python etherscan-mcp-python/server.py", + command="python server.py",Please confirm the intended working directory and adjust accordingly.
43-47: Mention quoting in .env to avoid parsing pitfalls.Users often add quotes; your loader currently doesn’t strip them. Add a note here to avoid confusion until the loader is hardened.
Suggested text to append after the code block: Use plain KEY=value without quotes, e.g., ETHERSCAN_API_KEY=abc123 (no quotes).
175-235: Convert emphasized section titles to proper headings (MD036).Multiple bold lines are used as headings. Switch to H4 headings for lint compliance and cleaner TOC.
Apply representative changes:
-**Account Tools (7/13)** +#### Account Tools (7/13) ... -**Block Tools (3/4)** +#### Block Tools (3/4) ... -**Contract Tools (1/4)** +#### Contract Tools (1/4) ... -**Transaction Tools (2/2)** +#### Transaction Tools (2/2) ... -**Token Tools (2/2)** +#### Token Tools (2/2) ... -**Gas Tools (2/3)** +#### Gas Tools (2/3) ... -**Statistics Tools (2/6)** +#### Statistics Tools (2/6) ... -**RPC Tools (4/5)** +#### RPC Tools (4/5)Also convert “Large Output Tools” and “Slower Response Tools” to headings.
151-157: Add missing Logs tool to tests or remove from list.README lists logs_getLogsByAddressAndTopics, but test_all_tools.py doesn’t exercise it. Add a test case or drop it from the list.
I’ve proposed a test addition in a comment on test_all_tools.py.
test_all_tools.py (3)
733-733: Remove unused local variable (Ruff F841).
resultsisn’t used.Apply this diff:
- results = tester.run_all_tests() + tester.run_all_tests()
751-751: Drop unnecessary f-string (Ruff F541).No placeholders present.
Apply this diff:
-print(f"\n📁 Detailed results saved to: tool_test_results.json") +print("\n📁 Detailed results saved to: tool_test_results.json")
557-584: Add missing Logs test: address + topics.README documents logs_getLogsByAddressAndTopics; include it here for parity.
Apply this diff to insert after the existing two logs tests:
logs_tests = [ { 'name': 'logs_getLogsByAddress', 'params': { 'module': 'logs', 'action': 'getLogs', 'address': self.test_data['usdt_contract'], - 'fromBlock': self.test_data['older_block'], - 'toBlock': self.test_data['recent_block'], + 'fromBlock': str(int(self.test_data['recent_block']) - 50000), + 'toBlock': self.test_data['recent_block'], 'page': '1', 'offset': '10', 'chainid': '1' } }, { 'name': 'logs_getLogsByTopics', 'params': { 'module': 'logs', 'action': 'getLogs', - 'fromBlock': self.test_data['older_block'], - 'toBlock': self.test_data['recent_block'], + 'fromBlock': str(int(self.test_data['recent_block']) - 50000), + 'toBlock': self.test_data['recent_block'], 'topic0': '0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef', # Transfer event 'page': '1', 'offset': '10', 'chainid': '1' } - } + }, + { + 'name': 'logs_getLogsByAddressAndTopics', + 'params': { + 'module': 'logs', + 'action': 'getLogs', + 'address': self.test_data['usdt_contract'], + 'fromBlock': str(int(self.test_data['recent_block']) - 50000), + 'toBlock': self.test_data['recent_block'], + 'topic0': '0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef', + 'page': '1', + 'offset': '10', + 'chainid': '1' + } + } ]
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
💡 Knowledge Base configuration:
- MCP integration is disabled by default for public repositories
- Jira integration is disabled by default for public repositories
- Linear integration is disabled by default for public repositories
You can enable these sources in your CodeRabbit configuration.
📒 Files selected for processing (3)
.env.example(1 hunks)README.md(3 hunks)test_all_tools.py(1 hunks)
🧰 Additional context used
🪛 dotenv-linter (3.3.0)
.env.example
[warning] 3-3: [EndingBlankLine] No blank line at the end of the file
(EndingBlankLine)
🪛 Ruff (0.12.2)
test_all_tools.py
733-733: Local variable results is assigned to but never used
Remove assignment to unused variable results
(F841)
751-751: f-string without any placeholders
Remove extraneous f prefix
(F541)
🪛 LanguageTool
README.md
[grammar] ~175-~175: There might be a mistake here.
Context: ...# 🤖 Essential Tools for Building Agents *Based on comprehensive testing of all to...
(QB_NEW_EN)
[grammar] ~181-~181: There might be a mistake here.
Context: ... | 🟡 Situational | 🔴 Not Recommended | |----------|-------------|--------------...
(QB_NEW_EN)
[grammar] ~182-~182: There might be a mistake here.
Context: ...--|----------------|-------------------| | Account | 7 tools | 5 tools | 1 to...
(QB_NEW_EN)
[grammar] ~183-~183: There might be a mistake here.
Context: ...Account** | 7 tools | 5 tools | 1 tool | | Block | 3 tools | 0 tools | 1 tool...
(QB_NEW_EN)
[grammar] ~184-~184: There might be a mistake here.
Context: ...Block | 3 tools | 0 tools | 1 tool | | Contract | 1 tool | 2 tools | 0 to...
(QB_NEW_EN)
[grammar] ~185-~185: There might be a mistake here.
Context: ...ontract** | 1 tool | 2 tools | 0 tools | | Transaction | 2 tools | 0 tools | ...
(QB_NEW_EN)
[grammar] ~186-~186: There might be a mistake here.
Context: ...action** | 2 tools | 0 tools | 0 tools | | Token | 2 tools | 0 tools | 0 tool...
(QB_NEW_EN)
[grammar] ~187-~187: There might be a mistake here.
Context: ...Token* | 2 tools | 0 tools | 0 tools | | Gas | 2 tools | 0 tools | 1 tool |...
(QB_NEW_EN)
[grammar] ~188-~188: There might be a mistake here.
Context: ...| Gas | 2 tools | 0 tools | 1 tool | | Statistics | 2 tools | 0 tools | 4...
(QB_NEW_EN)
[grammar] ~189-~189: There might be a mistake here.
Context: ...istics** | 2 tools | 0 tools | 4 tools | | Logs | 0 tools | 2 tools | 0 tools...
(QB_NEW_EN)
[grammar] ~190-~190: There might be a mistake here.
Context: ...Logs | 0 tools | 2 tools | 0 tools | | RPC | 4 tools | 1 tool | 0 tools |...
(QB_NEW_EN)
[grammar] ~191-~191: There might be a mistake here.
Context: ...| RPC | 4 tools | 1 tool | 0 tools | | TOTAL | 24 tools | 7 tools...
(QB_NEW_EN)
[grammar] ~192-~192: There might be a mistake here.
Context: ...24 tools** | 7 tools | 8 tools | #### Complete Essential Tools List **Account...
(QB_NEW_EN)
[grammar] ~196-~196: There might be a mistake here.
Context: ...ntial Tools List Account Tools (7/13) - ✅ account_balance - ETH balance - ✅ `a...
(QB_NEW_EN)
[grammar] ~197-~197: There might be a mistake here.
Context: ...3)** - ✅ account_balance - ETH balance - ✅ account_balancemulti - Multiple bala...
(QB_NEW_EN)
[grammar] ~198-~198: There might be a mistake here.
Context: ...ccount_balancemulti- Multiple balances - ✅account_txlistinternal` - Internal tr...
(QB_NEW_EN)
[grammar] ~199-~199: There might be a mistake here.
Context: ..._txlistinternal- Internal transactions - ✅account_txlistinternal_byhash` - Inte...
(QB_NEW_EN)
[grammar] ~200-~200: There might be a mistake here.
Context: ...stinternal_byhash- Internal tx by hash - ✅account_fundedby` - Funding source - ...
(QB_NEW_EN)
[grammar] ~201-~201: There might be a mistake here.
Context: ... - ✅ account_fundedby - Funding source - ✅ account_getminedblocks - Mined block...
(QB_NEW_EN)
[grammar] ~202-~202: There might be a mistake here.
Context: ... account_getminedblocks - Mined blocks - ✅ account_txsBeaconWithdrawal - Beacon...
(QB_NEW_EN)
[grammar] ~205-~205: There might be a mistake here.
Context: ... Beacon withdrawals Block Tools (3/4) - ✅ block_getblockreward - Block rewards...
(QB_NEW_EN)
[grammar] ~206-~206: There might be a mistake here.
Context: ...✅ block_getblockreward - Block rewards - ✅ block_getblocknobytime - Block by ti...
(QB_NEW_EN)
[grammar] ~207-~207: There might be a mistake here.
Context: ...k_getblocknobytime- Block by timestamp - ✅block_getblocktxnscount` - Transactio...
(QB_NEW_EN)
[grammar] ~210-~210: There might be a mistake here.
Context: ...ransaction count Contract Tools (1/4) - ✅ contract_getcontractcreation - Contr...
(QB_NEW_EN)
[grammar] ~213-~213: There might be a mistake here.
Context: ...creation info Transaction Tools (2/2) - ✅ transaction_getstatus - Contract exe...
(QB_NEW_EN)
[grammar] ~214-~214: There might be a mistake here.
Context: ...n_getstatus- Contract execution status - ✅transaction_gettxreceiptstatus` - Rec...
(QB_NEW_EN)
[grammar] ~217-~217: There might be a mistake here.
Context: ...s- Receipt status **Token Tools (2/2)** - ✅stats_tokensupply` - Token total supp...
(QB_NEW_EN)
[grammar] ~218-~218: There might be a mistake here.
Context: ...stats_tokensupply - Token total supply - ✅ account_tokenbalance - Token balance...
(QB_NEW_EN)
[grammar] ~221-~221: There might be a mistake here.
Context: ...ance- Token balance **Gas Tools (2/3)** - ✅gas_gasoracle` - Current gas prices -...
(QB_NEW_EN)
[grammar] ~222-~222: There might be a mistake here.
Context: ...- ✅ gas_gasoracle - Current gas prices - ✅ gas_gasestimate - Gas time estimate ...
(QB_NEW_EN)
[grammar] ~225-~225: There might be a mistake here.
Context: ... time estimate Statistics Tools (2/6) - ✅ stats_ethprice - ETH price - ✅ `stat...
(QB_NEW_EN)
[grammar] ~226-~226: There might be a mistake here.
Context: ...(2/6)** - ✅ stats_ethprice - ETH price - ✅ stats_nodecount - Network node count...
(QB_NEW_EN)
[grammar] ~229-~229: There might be a mistake here.
Context: ... - Network node count RPC Tools (4/5) - ✅ proxy_eth_blockNumber - Latest block...
(QB_NEW_EN)
[grammar] ~230-~230: There might be a mistake here.
Context: ...✅ proxy_eth_blockNumber - Latest block - ✅ proxy_eth_gasPrice - Gas price - ✅ `...
(QB_NEW_EN)
[grammar] ~231-~231: There might be a mistake here.
Context: ...ock - ✅ proxy_eth_gasPrice - Gas price - ✅ proxy_eth_getTransactionByHash - Tra...
(QB_NEW_EN)
[grammar] ~232-~232: There might be a mistake here.
Context: ...TransactionByHash- Transaction details - ✅proxy_eth_getTransactionCount` - Addr...
(QB_NEW_EN)
[grammar] ~236-~236: There might be a mistake here.
Context: ...uts or specific use cases, use carefully* **Large Output Tools (require careful cont...
(QB_NEW_EN)
[grammar] ~238-~238: There might be a mistake here.
Context: ...ols (require careful context management)** - account_txlist - Normal transaction...
(QB_NEW_EN)
[grammar] ~239-~239: There might be a mistake here.
Context: ...- Normal transactions - Use pagination - ⚠️account_tokentx` - ERC20 transfers -...
(QB_NEW_EN)
[grammar] ~240-~240: There might be a mistake here.
Context: ...entx- ERC20 transfers - Use pagination - ⚠️account_tokennfttx` - NFT transfers ...
(QB_NEW_EN)
[grammar] ~241-~241: There might be a mistake here.
Context: ...nnfttx- NFT transfers - Use pagination - ⚠️account_token1155tx` - ERC1155 trans...
(QB_NEW_EN)
[grammar] ~242-~242: There might be a mistake here.
Context: ...tx- ERC1155 transfers - Use pagination - ⚠️contract_getabi` - Contract ABI - Ve...
(QB_NEW_EN)
[grammar] ~243-~243: There might be a mistake here.
Context: ..._getabi- Contract ABI - Very technical - ⚠️contract_getsourcecode` - Source cod...
(QB_NEW_EN)
[style] ~244-~244: As an alternative to the over-used intensifier ‘extremely’, consider replacing this phrase.
Context: ...contract_getsourcecode- Source code - Extremely large **Slower Response Tools** - ⚠️accoun...
(EN_WEAK_ADJECTIVE)
[grammar] ~246-~246: There might be a mistake here.
Context: ...Extremely large Slower Response Tools - account_txlistinternal_byblock - In...
(QB_NEW_EN)
[grammar] ~247-~247: There might be a mistake here.
Context: ...internal_byblock- Internal tx by block - ⚠️logs_getLogsByAddress` - Event logs ...
(QB_NEW_EN)
[grammar] ~248-~248: There might be a mistake here.
Context: ...Address- Event logs - Use small ranges - ⚠️logs_getLogsByTopics` - Event logs -...
(QB_NEW_EN)
🪛 markdownlint-cli2 (0.17.2)
README.md
177-177: Emphasis used instead of a heading
(MD036, no-emphasis-as-heading)
196-196: Emphasis used instead of a heading
(MD036, no-emphasis-as-heading)
205-205: Emphasis used instead of a heading
(MD036, no-emphasis-as-heading)
210-210: Emphasis used instead of a heading
(MD036, no-emphasis-as-heading)
213-213: Emphasis used instead of a heading
(MD036, no-emphasis-as-heading)
221-221: Emphasis used instead of a heading
(MD036, no-emphasis-as-heading)
225-225: Emphasis used instead of a heading
(MD036, no-emphasis-as-heading)
229-229: Emphasis used instead of a heading
(MD036, no-emphasis-as-heading)
236-236: Emphasis used instead of a heading
(MD036, no-emphasis-as-heading)
238-238: Emphasis used instead of a heading
(MD036, no-emphasis-as-heading)
246-246: Emphasis used instead of a heading
(MD036, no-emphasis-as-heading)
🔇 Additional comments (1)
README.md (1)
181-193: Update Quick Reference totals
README.md (lines 181–193): the table’s totals no longer align with the report. Ensure the correct path totool_test_results.json, run:jq -r '[.recommendations.essential|length, .recommendations.situational|length, .recommendations.not_recommended|length] | @tsv' tool_test_results.jsonand update the table to match the output.
… number of tools to 56, and added detailed tool analysis and usage suggestions. Updated the test scripts to ensure the correctness and performance evaluation of all tools.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 4
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
README.md (1)
146-148: Fix count: “Statistics Tools (13 tools)” lists 12 tools.Update the heading to 12.
Apply this diff:
-### 📊 Statistics Tools (13 tools) +### 📊 Statistics Tools (12 tools)
♻️ Duplicate comments (5)
test_all_tools.py (5)
25-31: Harden .env parsing; support export/quotes and ignore comments.Current parsing breaks on common patterns and may leak malformed values into env.
Apply this diff:
- with open(env_path, 'r') as f: - for line in f: - line = line.strip() - if line and not line.startswith('#') and '=' in line: - key, value = line.split('=', 1) - os.environ[key] = value + with open(env_path, 'r') as f: + for line in f: + line = line.strip() + if not line or line.startswith('#'): + continue + if line.startswith('export '): + line = line[7:].strip() + if '=' not in line: + continue + key, value = line.split('=', 1) + # strip inline comments and surrounding quotes + value = value.split('#', 1)[0].strip().strip('"').strip("'") + os.environ[key.strip()] = value
136-141: Don’t print any part of the API key.Avoid leaking secrets in logs.
Apply this diff:
- api_key = os.environ.get('ETHERSCAN_API_KEY', 'NOT_SET') - if api_key != 'NOT_SET': - print(f"Using API Key: {api_key[:10]}...") + if os.environ.get('ETHERSCAN_API_KEY'): + print("Using ETHERSCAN_API_KEY from environment.")
344-351: Proxy tag must be hex for eth_getBlockTransactionCountByNumber.Apply this diff:
- 'module': 'proxy', - 'action': 'eth_getBlockTransactionCountByNumber', - 'tag': self.test_data['recent_block'], + 'module': 'proxy', + 'action': 'eth_getBlockTransactionCountByNumber', + 'tag': self.test_data['recent_block_hex'],
710-718: Use hex block tag for all RPC-by-number calls.Decimal tags will fail on Etherscan’s proxy methods.
Apply this diff:
- 'tag': self.test_data['recent_block'], + 'tag': self.test_data['recent_block_hex'],(Apply to: proxy_eth_getBlockByNumber, proxy_eth_getUncleByBlockNumberAndIndex, proxy_eth_getBlockTransactionCountByNumber, proxy_eth_getTransactionByBlockNumberAndIndex.)
Also applies to: 730-737, 740-746, 749-756
637-645: Narrow logs query ranges to avoid “result window too large” and timeouts.Use a smaller recent window and set order asc; topic-only queries should also bound by block range.
Apply this diff:
- 'fromBlock': self.test_data['older_block'], - 'toBlock': self.test_data['recent_block'], + 'fromBlock': str(int(self.test_data['recent_block']) - 50000), + 'toBlock': self.test_data['recent_block'], + 'order': 'asc',(Apply to all three logs tests; keep topic/address filters as-is.)
Also applies to: 649-658, 661-672
🧹 Nitpick comments (5)
README.md (1)
354-359: Update testnet list: mark Goerli deprecated and add Holesky.Goerli (5) is deprecated; Holesky (17000) is active alongside Sepolia. Please verify with current Etherscan docs and adjust.
Proposed patch:
- - "5" - Goerli Testnet - - "11155111" - Sepolia Testnet + - "17000" - Holesky Testnet + - "11155111" - Sepolia Testnet + - "5" - Goerli Testnet (deprecated)test_all_tools.py (4)
906-906: Remove unused variableresults(Ruff F841).Apply this diff:
- results = tester.run_all_tests() + tester.run_all_tests()
924-924: Fix f-string without placeholders (Ruff F541).Apply this diff:
- print(f"\n📁 Detailed results saved to: tool_test_results.json") + print("\n📁 Detailed results saved to: tool_test_results.json")
122-131: Broaden Pro detection phrases.Make detection more robust to Etherscan wording variants.
Apply this diff:
pro_indicators = [ 'Max rate limit reached', 'upgrade to premium', 'rate limit exceeded', 'premium account', - 'pro api' + 'pro api', + 'pro endpoint', + 'requires pro', + 'premium plan', + 'this endpoint is available to pro' ]
71-79: Remove unused test datumrecent_txor use it.Keeps the test matrix lean.
Apply this diff:
- 'recent_tx': '0xa1e8d6d9d1f1b1c1e1f1a1b1c1d1e1f1a1b1c1d1e1f1a1b1c1d1e1f1a1b1c1d1',
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
💡 Knowledge Base configuration:
- MCP integration is disabled by default for public repositories
- Jira integration is disabled by default for public repositories
- Linear integration is disabled by default for public repositories
You can enable these sources in your CodeRabbit configuration.
📒 Files selected for processing (2)
README.md(4 hunks)test_all_tools.py(1 hunks)
🧰 Additional context used
🧬 Code graph analysis (1)
test_all_tools.py (1)
src/tools/utils.py (1)
api_call(61-120)
🪛 LanguageTool
README.md
[grammar] ~80-~80: There might be a mistake here.
Context: ...his will test all 56 tools and generate: - tool_test_results.json: Raw test resul...
(QB_NEW_EN)
[grammar] ~81-~81: There might be a mistake here.
Context: ...aw test results with performance metrics - AGENT_TOOL_ANALYSIS.md: Comprehensive ...
(QB_NEW_EN)
[grammar] ~84-~84: There might be a mistake here.
Context: ...tions ### 📊 Agent Development Analysis For detailed agent development guidance,...
(QB_NEW_EN)
[grammar] ~88-~88: There might be a mistake here.
Context: ...ponse times, output sizes, success rates - Agent Implementation Strategies: Tool ...
(QB_NEW_EN)
[grammar] ~89-~89: There might be a mistake here.
Context: ...ions, error handling, context management - Recommended Tool Suites: Pre-configure...
(QB_NEW_EN)
[grammar] ~90-~90: There might be a mistake here.
Context: ...figured toolsets for different use cases - Best Practices: Rate limiting, caching...
(QB_NEW_EN)
[grammar] ~186-~186: There might be a mistake here.
Context: ...# 🤖 Essential Tools for Building Agents *Based on comprehensive testing of all 56...
(QB_NEW_EN)
[grammar] ~207-~207: There might be a mistake here.
Context: ...ntial Tools List Account Tools (9/12) - ✅ account_balance - Single ETH balance...
(QB_NEW_EN)
[grammar] ~208-~208: There might be a mistake here.
Context: ...e- Single ETH balance (0.6s, 21 chars) - ✅account_balancemulti` - Multiple ETH ...
(QB_NEW_EN)
[grammar] ~209-~209: There might be a mistake here.
Context: ...Multiple ETH balances (0.62s, 198 chars) - ✅ account_txlistinternal - Internal tr...
(QB_NEW_EN)
[grammar] ~210-~210: There might be a mistake here.
Context: ...- Internal transactions (0.62s, 4.6KB) - ✅account_txlistinternal_byhash` - Inte...
(QB_NEW_EN)
[grammar] ~211-~211: There might be a mistake here.
Context: ...- Internal tx by hash (0.58s, 2 chars) - ✅account_txlistinternal_byblock` - Int...
(QB_NEW_EN)
[grammar] ~212-~212: There might be a mistake here.
Context: ...k- Internal tx by block (2.29s, 4.7KB) - ✅account_tokentx` - ERC-20 transfers (...
(QB_NEW_EN)
[grammar] ~213-~213: There might be a mistake here.
Context: ...kentx- ERC-20 transfers (0.65s, 8.1KB) - ✅account_tokennfttx` - NFT transfers (...
(QB_NEW_EN)
[grammar] ~214-~214: There might be a mistake here.
Context: ...kennfttx- NFT transfers (0.78s, 8.7KB) - ✅account_token1155tx` - ERC-1155 trans...
(QB_NEW_EN)
[grammar] ~215-~215: There might be a mistake here.
Context: ...155tx- ERC-1155 transfers (0.65s, 9KB) - ✅account_fundedby` - Funding source (0...
(QB_NEW_EN)
[grammar] ~218-~218: There might be a mistake here.
Context: ... (0.62s, 235 chars) Block Tools (3/4) - ✅ block_getblockreward - Block rewards...
(QB_NEW_EN)
[grammar] ~219-~219: There might be a mistake here.
Context: ...ward- Block rewards (0.59s, 207 chars) - ✅block_getblocknobytime` - Block by ti...
(QB_NEW_EN)
[grammar] ~220-~220: There might be a mistake here.
Context: ...- Block by timestamp (0.58s, 10 chars) - ✅block_getblocktxnscount` - Transactio...
(QB_NEW_EN)
[grammar] ~223-~223: There might be a mistake here.
Context: ...(0.58s, 4 chars) Contract Tools (3/4) - ✅ contract_getabi - Contract ABI (0.61...
(QB_NEW_EN)
[grammar] ~224-~224: There might be a mistake here.
Context: ...ct_getabi- Contract ABI (0.61s, 8.4KB) - ✅contract_getsourcecode` - Source code...
(QB_NEW_EN)
[grammar] ~225-~225: There might be a mistake here.
Context: ...tsourcecode- Source code (0.62s, 25KB) - ✅contract_getcontractcreation` - Creat...
(QB_NEW_EN)
[grammar] ~228-~228: There might be a mistake here.
Context: ...(0.62s, 24KB) Transaction Tools (2/2) - ✅ transaction_getstatus - Execution st...
(QB_NEW_EN)
[grammar] ~229-~229: There might be a mistake here.
Context: ...us- Execution status (0.61s, 44 chars) - ✅transaction_gettxreceiptstatus` - Rec...
(QB_NEW_EN)
[grammar] ~232-~232: There might be a mistake here.
Context: ...s (0.62s, 18 chars) Token Tools (2/2) - ✅ stats_tokensupply - Token total supp...
(QB_NEW_EN)
[grammar] ~233-~233: There might be a mistake here.
Context: ...- Token total supply (0.59s, 19 chars) - ✅account_tokenbalance` - Token balance...
(QB_NEW_EN)
[grammar] ~236-~236: There might be a mistake here.
Context: ...ance (0.6s, 11 chars) Gas Tools (2/3) - ✅ gas_gasoracle - Current gas prices (...
(QB_NEW_EN)
[grammar] ~237-~237: There might be a mistake here.
Context: ... - Current gas prices (0.59s, 277 chars) - ✅ gas_gasestimate - Gas time estimate ...
(QB_NEW_EN)
[grammar] ~240-~240: There might be a mistake here.
Context: ...61s, 4 chars) Statistics Tools (3/12) - ✅ stats_ethprice - ETH price (0.58s, 1...
(QB_NEW_EN)
[grammar] ~241-~241: There might be a mistake here.
Context: ...ethprice- ETH price (0.58s, 140 chars) - ✅stats_chainsize` - Blockchain size (0...
(QB_NEW_EN)
[grammar] ~242-~242: There might be a mistake here.
Context: ...ize- Blockchain size (0.6s, 488 chars) - ✅stats_nodecount` - Network nodes (0.6...
(QB_NEW_EN)
[grammar] ~259-~259: There might be a mistake here.
Context: ...ars) ### 🟡 Situational Tools (8 tools) *Larger outputs, slower responses, or spe...
(QB_NEW_EN)
[grammar] ~260-~260: There might be a mistake here.
Context: ...s, or specific use cases - use carefully* **Large Output Tools (require pagination a...
(QB_NEW_EN)
[grammar] ~262-~262: There might be a mistake here.
Context: ...quire pagination and context management)** - account_txlist - Normal transaction...
(QB_NEW_EN)
[grammar] ~263-~263: There might be a mistake here.
Context: ...sactions (0.62s, 9.6KB) - Use pagination - account_getminedblocks - Mined bloc...
(QB_NEW_EN)
[grammar] ~264-~264: There might be a mistake here.
Context: ...blocks (0.61s, empty for most addresses) - account_txsBeaconWithdrawal - Beaco...
(QB_NEW_EN)
[grammar] ~267-~267: There might be a mistake here.
Context: ...t Log Analysis Tools (powerful but slow)** - logs_getLogsByAddress - Event logs ...
(QB_NEW_EN)
[grammar] ~268-~268: There might be a mistake here.
Context: ...- Event logs by address (0.82s, 7.6KB) - ⚠️logs_getLogsByTopics` - Event logs b...
(QB_NEW_EN)
[grammar] ~269-~269: There might be a mistake here.
Context: ...s- Event logs by topics (1.28s, 7.6KB) - ⚠️logs_getLogsByAddressAndTopics` - Co...
(QB_NEW_EN)
[grammar] ~272-~272: There might be a mistake here.
Context: ...(3.08s, 7.6KB) Large Block Data Tools - proxy_eth_getBlockByNumber - Comple...
(QB_NEW_EN)
[style] ~273-~273: As an alternative to the over-used intensifier ‘very’, consider replacing this phrase.
Context: ...r` - Complete block data (0.58s, can be very large) Variable Size RPC Tools -
(EN_WEAK_ADJECTIVE)
[grammar] ~275-~275: There might be a mistake here.
Context: ...e very large) Variable Size RPC Tools -
(QB_NEW_EN)
[grammar] ~278-~278: There might be a mistake here.
Context: ...eful parameter management Usage Tips: - Use small block ranges for logs tools (1...
(QB_NEW_EN)
[grammar] ~284-~284: There might be a mistake here.
Context: ...put sizes ### 🔴 Other Tools (15 tools) *These tools failed during testing or req...
(QB_NEW_EN)
[grammar] ~285-~285: There might be a mistake here.
Context: ...d during testing or require Pro accounts* API Errors & Limitations (3 tools) - ❌...
(QB_NEW_EN)
[grammar] ~287-~287: There might be a mistake here.
Context: ...s* API Errors & Limitations (3 tools) - ❌ block_getblockcountdown - API Error ...
(QB_NEW_EN)
[grammar] ~288-~288: There might be a mistake here.
Context: ... API Error (invalid future block number) - ❌ contract_checkverifystatus - API Err...
(QB_NEW_EN)
[grammar] ~289-~289: There might be a mistake here.
Context: ...Error (requires valid verification GUID) - ❌ stats_dailyavggaslimit - API Error (...
(QB_NEW_EN)
[grammar] ~292-~292: There might be a mistake here.
Context: ...nt) Pro Account Required (12 tools) Most daily statistics tools require Ethe...
(QB_NEW_EN)
[grammar] ~293-~293: There might be a mistake here.
Context: ...cs tools require Etherscan Pro accounts: - ❌ stats_ethsupply / stats_ethsupply2...
(QB_NEW_EN)
[grammar] ~294-~294: There might be a mistake here.
Context: .../stats_ethsupply2- ETH supply data - ❌stats_dailytxnfee` - Daily transactio...
(QB_NEW_EN)
[grammar] ~295-~295: There might be a mistake here.
Context: ...ts_dailytxnfee- Daily transaction fees - ❌stats_dailynewaddress` - Daily new ad...
(QB_NEW_EN)
[grammar] ~296-~296: There might be a mistake here.
Context: ...s_dailynewaddress- Daily new addresses - ❌stats_dailynetutilization` - Daily ne...
(QB_NEW_EN)
[grammar] ~297-~297: There might be a mistake here.
Context: ...utilization- Daily network utilization - ❌stats_dailyavghashrate` - Daily avera...
(QB_NEW_EN)
[grammar] ~298-~298: There might be a mistake here.
Context: ...ilyavghashrate- Daily average hashrate - ❌stats_dailytx` - Daily transaction co...
(QB_NEW_EN)
[grammar] ~299-~299: There might be a mistake here.
Context: ...stats_dailytx- Daily transaction count - ❌stats_dailyavgnetdifficulty` - Daily ...
(QB_NEW_EN)
[grammar] ~300-~300: There might be a mistake here.
Context: ...netdifficulty- Daily mining difficulty - ❌stats_ethdailyprice` - Historical ETH...
(QB_NEW_EN)
🪛 markdownlint-cli2 (0.17.2)
README.md
188-188: Emphasis used instead of a heading
(MD036, no-emphasis-as-heading)
207-207: Emphasis used instead of a heading
(MD036, no-emphasis-as-heading)
218-218: Emphasis used instead of a heading
(MD036, no-emphasis-as-heading)
223-223: Emphasis used instead of a heading
(MD036, no-emphasis-as-heading)
228-228: Emphasis used instead of a heading
(MD036, no-emphasis-as-heading)
236-236: Emphasis used instead of a heading
(MD036, no-emphasis-as-heading)
240-240: Emphasis used instead of a heading
(MD036, no-emphasis-as-heading)
245-245: Emphasis used instead of a heading
(MD036, no-emphasis-as-heading)
260-260: Emphasis used instead of a heading
(MD036, no-emphasis-as-heading)
262-262: Emphasis used instead of a heading
(MD036, no-emphasis-as-heading)
267-267: Emphasis used instead of a heading
(MD036, no-emphasis-as-heading)
272-272: Emphasis used instead of a heading
(MD036, no-emphasis-as-heading)
275-275: Emphasis used instead of a heading
(MD036, no-emphasis-as-heading)
285-285: Emphasis used instead of a heading
(MD036, no-emphasis-as-heading)
287-287: Emphasis used instead of a heading
(MD036, no-emphasis-as-heading)
🪛 Ruff (0.12.2)
test_all_tools.py
906-906: Local variable results is assigned to but never used
Remove assignment to unused variable results
(F841)
924-924: f-string without any placeholders
Remove extraneous f prefix
(F541)
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 2
♻️ Duplicate comments (4)
test_all_tools.py (4)
72-75: Precompute hex block tags to reduce repetition.Small reuse win across RPC calls.
# Recent block numbers (approximate) 'recent_block': '19000000', + 'recent_block_hex': hex(int('19000000')), 'older_block': '18000000', + 'older_block_hex': hex(int('18000000')),Then prefer recent_block_hex where applicable.
913-918: Also emit a lightweight AGENT_TOOL_ANALYSIS.md summary.Convenient human-readable overview alongside JSON.
# Save results to file with open('tool_test_results.json', 'w') as f: json.dump(report, f, indent=2) + # Optional: generate a brief Markdown summary + with open('AGENT_TOOL_ANALYSIS.md', 'w') as f: + f.write("# Agent Tool Analysis\n\n") + f.write(f"- Generated: {datetime.now().isoformat()}\n") + f.write(f"- Total tools tested: {report['total_tools_tested']}\n\n") + f.write("## Summary\n") + f.write(f"- Essential: {report['summary']['essential_count']}\n") + f.write(f"- Situational: {report['summary']['situational_count']}\n") + f.write(f"- Not Recommended: {report['summary']['not_recommended_count']}\n")
734-761: Proxy RPC requires hex block tags; three calls still send decimal.These will fail with invalid params.
'name': 'proxy_eth_getUncleByBlockNumberAndIndex', 'params': { 'module': 'proxy', 'action': 'eth_getUncleByBlockNumberAndIndex', - 'tag': self.test_data['recent_block'], + 'tag': hex(int(self.test_data['recent_block'])), 'index': '0x0', 'chainid': '1' } }, { 'name': 'proxy_eth_getBlockTransactionCountByNumber', 'params': { 'module': 'proxy', 'action': 'eth_getBlockTransactionCountByNumber', - 'tag': self.test_data['recent_block'], + 'tag': hex(int(self.test_data['recent_block'])), 'chainid': '1' } }, { 'name': 'proxy_eth_getTransactionByBlockNumberAndIndex', 'params': { 'module': 'proxy', 'action': 'eth_getTransactionByBlockNumberAndIndex', - 'tag': self.test_data['recent_block'], + 'tag': hex(int(self.test_data['recent_block'])), 'index': '0x0', 'chainid': '1' } },
640-649: Narrow logs queries to avoid “result window too large” and timeouts.Use smaller windows and order asc.
'name': 'logs_getLogsByAddress', 'params': { 'module': 'logs', 'action': 'getLogs', 'address': self.test_data['usdt_contract'], - 'fromBlock': self.test_data['older_block'], + 'fromBlock': str(int(self.test_data['recent_block']) - 50000), 'toBlock': self.test_data['recent_block'], 'page': '1', 'offset': '10', + 'order': 'asc', 'chainid': '1' } }, { 'name': 'logs_getLogsByTopics', 'params': { 'module': 'logs', 'action': 'getLogs', - 'fromBlock': self.test_data['older_block'], + 'fromBlock': str(int(self.test_data['recent_block']) - 50000), 'toBlock': self.test_data['recent_block'], 'topic0': '0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef', # Transfer event 'page': '1', 'offset': '10', + 'order': 'asc', 'chainid': '1' } }, { 'name': 'logs_getLogsByAddressAndTopics', 'params': { 'module': 'logs', 'action': 'getLogs', 'address': self.test_data['usdt_contract'], - 'fromBlock': self.test_data['older_block'], + 'fromBlock': str(int(self.test_data['recent_block']) - 50000), 'toBlock': self.test_data['recent_block'], 'topic0': '0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef', # Transfer event 'page': '1', 'offset': '10', + 'order': 'asc', 'chainid': '1' } }Also applies to: 654-662, 667-676
🧹 Nitpick comments (4)
test_all_tools.py (4)
47-51: Clarify missing key message (env vs .env).Message incorrectly implies it must be in .env; allow either environment or .env.
-if not os.getenv("ETHERSCAN_API_KEY") or os.getenv("ETHERSCAN_API_KEY") == "your_api_key_here": - print("❌ ETHERSCAN_API_KEY not set in .env file") - print(" Please add your API key to the .env file:") - print(" ETHERSCAN_API_KEY=your_actual_api_key_here") +if not os.getenv("ETHERSCAN_API_KEY") or os.getenv("ETHERSCAN_API_KEY") == "your_api_key_here": + print("❌ ETHERSCAN_API_KEY is missing.") + print(" Set it in your environment or in .env, e.g.:") + print(" ETHERSCAN_API_KEY=your_actual_api_key_here") sys.exit(1)
909-911: Clean up: remove unused variable and static f-string.Addresses Ruff F841 and F541.
- results = tester.run_all_tests() + tester.run_all_tests() @@ - print(f"\n📁 Detailed results saved to: tool_test_results.json") + print("\n📁 Detailed results saved to: tool_test_results.json")Also applies to: 928-928
821-843: Add tiny pacing to reduce rate-limit hits.A short sleep after each call helps avoid 429s on free keys.
# Print quick result status = "✅" if result['success'] else "❌" print(f" {status} {tool_name} - {result.get('output_length', 0)} chars, {result.get('response_time', 0)}s") + # Brief pause to avoid Etherscan rate limits on free tiers + time.sleep(0.25)
76-84: Unused test datum ‘recent_tx’.Either use it in a test or drop it.
- 'recent_tx': '0xa1e8d6d9d1f1b1c1e1f1a1b1c1d1e1f1a1b1c1d1e1f1a1b1c1d1e1f1a1b1c1d1',
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
💡 Knowledge Base configuration:
- MCP integration is disabled by default for public repositories
- Jira integration is disabled by default for public repositories
- Linear integration is disabled by default for public repositories
You can enable these sources in your CodeRabbit configuration.
📒 Files selected for processing (1)
test_all_tools.py(1 hunks)
🧰 Additional context used
🧬 Code graph analysis (1)
test_all_tools.py (1)
src/tools/utils.py (1)
api_call(61-120)
🪛 Ruff (0.12.2)
test_all_tools.py
910-910: Local variable results is assigned to but never used
Remove assignment to unused variable results
(F841)
928-928: f-string without any placeholders
Remove extraneous f prefix
(F541)
🔇 Additional comments (2)
test_all_tools.py (2)
4-5: No action needed: the header’s “56 tools” matches the 56 entries intest_all_tools.py.
864-866: Fix total_tools_tested: summing string lengths instead of tool counts.Current code sums len(category_name).
- 'total_tools_tested': sum(len(category) for category in self.results.values()), + 'total_tools_tested': sum(len(tools) for tools in self.results.values()),Likely an incorrect or invalid review comment.
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 4
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
README.md (1)
23-33: Document python-dotenv requirement or add fallback.test_all_tools.py imports dotenv; without it, users hit ImportError. Either add to install steps or add code fallback.
Apply:
## Requirements - Python 3.8+ - Etherscan API Key +- python-dotenv (for loading .env; optional if you export env vars manually) ## Installation ```bash cd etherscan-mcp-python pip install -e . +pip install python-dotenv # needed by test_all_tools.py</blockquote></details> </blockquote></details>♻️ Duplicate comments (3)
README.md (2)
195-251: Use proper headings instead of bold-only lines (MD036).Convert emphasis-as-heading lines to real headings for consistency and lint compliance.
Apply:
-#### Complete Essential Tools List - -**Account Tools (11/12)** +#### Complete Essential Tools List + +#### Account Tools (11/12) ... -**Block Tools (4/4)** +#### Block Tools (4/4) ... -**Contract Tools (3/4)** +#### Contract Tools (3/4) ... -**Transaction Tools (2/2)** +#### Transaction Tools (2/2) ... -**Token Tools (2/2)** +#### Token Tools (2/2) ... -**Gas Tools (2/3)** +#### Gas Tools (2/3) ... -**Statistics Tools (3/12)** +#### Statistics Tools (3/12) ... -**RPC Tools (12/13)** +#### RPC Tools (12/13)
252-291: Use headings for subcategories under Situational/Other Tools (MD036).Replace bold-only subcategory labels with headings.
Apply:
-### 🟡 Situational Tools (5 tools) +### 🟡 Situational Tools (5 tools) *Larger outputs, slower responses, or specific use cases - use carefully* -**Large Output Tools** +#### Large Output Tools ... -**Contract Analysis Tools** +#### Contract Analysis Tools ... -**Event Log Analysis Tools** +#### Event Log Analysis Tools ... -**Usage Tips:** +#### Usage Tips ... -### 🔴 Other Tools (11 tools) +### 🔴 Other Tools (11 tools) *These tools failed during testing or require Pro accounts* -**Pro Account Required** +#### Pro Account Required ... -**Large Output Tools** +#### Large Output Tools ... -**Recommendation**: Use essential tools for reliable agent performance. Pro tools may work with upgraded Etherscan accounts. +#### Recommendation +Use essential tools for reliable agent performance. Pro tools may work with upgraded Etherscan accounts.test_all_tools.py (1)
630-635: Logs queries too broad; likely “result window too large” or timeouts. Narrow block range.Use a recent-window delta to stabilize tests.
Apply:
'address': self.test_data['usdt_contract'], - 'fromBlock': self.test_data['older_block'], - 'toBlock': self.test_data['recent_block'], + 'fromBlock': str(int(self.test_data['recent_block']) - 50000), + 'toBlock': self.test_data['recent_block'], 'page': '1', 'offset': '10', 'chainid': '1' } }, { 'name': 'logs_getLogsByTopics', 'params': { 'module': 'logs', 'action': 'getLogs', - 'fromBlock': self.test_data['older_block'], - 'toBlock': self.test_data['recent_block'], + 'fromBlock': str(int(self.test_data['recent_block']) - 50000), + 'toBlock': self.test_data['recent_block'], 'topic0': '0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef', # Transfer event 'page': '1', 'offset': '10', 'chainid': '1' } }, { 'name': 'logs_getLogsByAddressAndTopics', 'params': { 'module': 'logs', 'action': 'getLogs', 'address': self.test_data['usdt_contract'], - 'fromBlock': self.test_data['older_block'], - 'toBlock': self.test_data['recent_block'], + 'fromBlock': str(int(self.test_data['recent_block']) - 50000), + 'toBlock': self.test_data['recent_block'], 'topic0': '0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef', # Transfer event 'page': '1', 'offset': '10', 'chainid': '1' } }Also applies to: 642-648, 655-662
🧹 Nitpick comments (3)
test_all_tools.py (3)
21-22: Gracefully handle missing python-dotenv.Allow running with system env vars even if dotenv isn’t installed.
Apply:
-from dotenv import load_dotenv +try: + from dotenv import load_dotenv +except ImportError: + load_dotenv = lambda *args, **kwargs: False
380-387: Test will always fail without a real verification GUID. Gate or skip.Running checkverifystatus with a placeholder skews results.
Option A (preferred): include this test only when ETHERSCAN_VERIFY_GUID is set.
# Place after other contract tests are added: guid = os.getenv('ETHERSCAN_VERIFY_GUID') if guid: contract_tests.append({ 'name': 'contract_checkverifystatus', 'params': { 'module': 'contract', 'action': 'checkverifystatus', 'guid': guid, 'chainid': '1' } })Option B: mark as expected-to-fail and exclude from categorization.
58-61: Optional: precompute hex block tags to avoid repeated conversions.Minor readability/DRY gain when used across tests.
Apply:
# Recent block numbers (approximate) 'recent_block': '19000000', + 'recent_block_hex': hex(int('19000000')), 'older_block': '18000000',Then replace hex(int(self.test_data['recent_block'])) call sites with self.test_data['recent_block_hex'].
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
💡 Knowledge Base configuration:
- MCP integration is disabled by default for public repositories
- Jira integration is disabled by default for public repositories
- Linear integration is disabled by default for public repositories
You can enable these sources in your CodeRabbit configuration.
📒 Files selected for processing (2)
README.md(4 hunks)test_all_tools.py(1 hunks)🧰 Additional context used
🧬 Code graph analysis (1)
test_all_tools.py (1)
src/tools/utils.py (1)
api_call(61-120)🪛 LanguageTool
README.md
[grammar] ~176-~176: There might be a mistake here.
Context: ...# 🤖 Essential Tools for Building Agents *Based on comprehensive testing of all 55...(QB_NEW_EN)
[grammar] ~197-~197: There might be a mistake here.
Context: ...tial Tools List Account Tools (11/12) - ✅account_balance- Single ETH balance...(QB_NEW_EN)
[grammar] ~198-~198: There might be a mistake here.
Context: ...✅account_balance- Single ETH balance - ✅account_balancemulti- Multiple ETH ...(QB_NEW_EN)
[grammar] ~199-~199: There might be a mistake here.
Context: ...nt_balancemulti- Multiple ETH balances - ✅account_fundedby` - Funding source an...(QB_NEW_EN)
[grammar] ~200-~200: There might be a mistake here.
Context: ...ount_fundedby- Funding source analysis - ✅account_getminedblocks` - Blocks mine...(QB_NEW_EN)
[grammar] ~201-~201: There might be a mistake here.
Context: ...etminedblocks- Blocks mined by address - ✅account_token1155tx` - ERC-1155 token...(QB_NEW_EN)
[grammar] ~202-~202: There might be a mistake here.
Context: ..._token1155tx- ERC-1155 token transfers - ✅account_tokennfttx` - NFT transfers -...(QB_NEW_EN)
[grammar] ~203-~203: There might be a mistake here.
Context: ...- ✅account_tokennfttx- NFT transfers - ✅account_txlist- Normal transactions...(QB_NEW_EN)
[grammar] ~204-~204: There might be a mistake here.
Context: ...✅account_txlist- Normal transactions - ✅account_txlistinternal- Internal tr...(QB_NEW_EN)
[grammar] ~205-~205: There might be a mistake here.
Context: ..._txlistinternal- Internal transactions - ✅account_txlistinternal_byblock` - Int...(QB_NEW_EN)
[grammar] ~206-~206: There might be a mistake here.
Context: ...al_byblock- Internal tx by block range - ✅account_txlistinternal_byhash` - Inte...(QB_NEW_EN)
[grammar] ~207-~207: There might be a mistake here.
Context: ...stinternal_byhash- Internal tx by hash - ✅account_txsBeaconWithdrawal` - Beacon...(QB_NEW_EN)
[grammar] ~210-~210: There might be a mistake here.
Context: ...n chain withdrawals Block Tools (4/4) - ✅block_getblocknobytime- Block numbe...(QB_NEW_EN)
[grammar] ~211-~211: There might be a mistake here.
Context: ...ocknobytime- Block number by timestamp - ✅block_getblockreward` - Block mining ...(QB_NEW_EN)
[grammar] ~212-~212: There might be a mistake here.
Context: ...k_getblockreward- Block mining rewards - ✅block_getblocktxnscount` - Transactio...(QB_NEW_EN)
[grammar] ~213-~213: There might be a mistake here.
Context: ...ktxnscount- Transaction count in block - ✅block_getblockcountdown` - Block coun...(QB_NEW_EN)
[grammar] ~216-~216: There might be a mistake here.
Context: ... Block countdown Contract Tools (3/4) - ✅contract_getcontractcreation- Contr...(QB_NEW_EN)
[grammar] ~217-~217: There might be a mistake here.
Context: ...ntractcreation- Contract creation info - ✅contract_getsourcecode` - Verified so...(QB_NEW_EN)
[grammar] ~218-~218: There might be a mistake here.
Context: ...ct_getsourcecode- Verified source code - ✅contract_checkverifystatus` - Contrac...(QB_NEW_EN)
[grammar] ~221-~221: There might be a mistake here.
Context: ...cation status Transaction Tools (2/2) - ✅transaction_getstatus- Execution st...(QB_NEW_EN)
[grammar] ~222-~222: There might be a mistake here.
Context: ...ransaction_getstatus- Execution status - ✅transaction_gettxreceiptstatus` - Rec...(QB_NEW_EN)
[grammar] ~225-~225: There might be a mistake here.
Context: ...s- Receipt status **Token Tools (2/2)** - ✅account_tokenbalance` - ERC-20 token ...(QB_NEW_EN)
[grammar] ~226-~226: There might be a mistake here.
Context: ...unt_tokenbalance- ERC-20 token balance - ✅stats_tokensupply` - Total token supp...(QB_NEW_EN)
[grammar] ~229-~229: There might be a mistake here.
Context: ... - Total token supply Gas Tools (2/3) - ✅gas_gasestimate- Gas time estimates...(QB_NEW_EN)
[grammar] ~230-~230: There might be a mistake here.
Context: ...✅gas_gasestimate- Gas time estimates - ✅gas_gasoracle- Current gas prices ...(QB_NEW_EN)
[grammar] ~233-~233: There might be a mistake here.
Context: ...nt gas prices Statistics Tools (3/12) - ✅stats_chainsize- Blockchain databas...(QB_NEW_EN)
[grammar] ~234-~234: There might be a mistake here.
Context: ...ts_chainsize- Blockchain database size - ✅stats_ethprice` - Current ETH price -...(QB_NEW_EN)
[grammar] ~235-~235: There might be a mistake here.
Context: ...- ✅stats_ethprice- Current ETH price - ✅stats_nodecount- Network node count...(QB_NEW_EN)
[grammar] ~238-~238: There might be a mistake here.
Context: ... Network node count RPC Tools (12/13) - ✅proxy_eth_blockNumber- Latest block...(QB_NEW_EN)
[grammar] ~239-~239: There might be a mistake here.
Context: ...y_eth_blockNumber- Latest block number - ✅proxy_eth_call` - Contract function c...(QB_NEW_EN)
[grammar] ~240-~240: There might be a mistake here.
Context: ...proxy_eth_call- Contract function call - ✅proxy_eth_estimateGas` - Gas estimati...(QB_NEW_EN)
[grammar] ~241-~241: There might be a mistake here.
Context: ...proxy_eth_estimateGas- Gas estimation - ✅proxy_eth_gasPrice- Current gas pri...(QB_NEW_EN)
[grammar] ~242-~242: There might be a mistake here.
Context: ...proxy_eth_gasPrice- Current gas price - ✅proxy_eth_getBlockByNumber- Block d...(QB_NEW_EN)
[grammar] ~243-~243: There might be a mistake here.
Context: ...xy_eth_getBlockByNumber- Block details - ✅proxy_eth_getBlockTransactionCountByN...(QB_NEW_EN)
[grammar] ~244-~244: There might be a mistake here.
Context: ...ansactionCountByNumber- Block tx count - ✅proxy_eth_getStorageAt` - Contract st...(QB_NEW_EN)
[grammar] ~245-~245: There might be a mistake here.
Context: ...th_getStorageAt- Contract storage slot - ✅proxy_eth_getTransactionByBlockNumber...(QB_NEW_EN)
[grammar] ~246-~246: There might be a mistake here.
Context: ...ckNumberAndIndex- Transaction by index - ✅proxy_eth_getTransactionByHash` - Tra...(QB_NEW_EN)
[grammar] ~247-~247: There might be a mistake here.
Context: ...TransactionByHash- Transaction details - ✅proxy_eth_getTransactionCount` - Addr...(QB_NEW_EN)
[grammar] ~248-~248: There might be a mistake here.
Context: ...eth_getTransactionCount- Address nonce - ✅proxy_eth_getTransactionReceipt` - Tr...(QB_NEW_EN)
[grammar] ~249-~249: There might be a mistake here.
Context: ...ransactionReceipt- Transaction receipt - ✅proxy_eth_getUncleByBlockNumberAndInd...(QB_NEW_EN)
[grammar] ~252-~252: There might be a mistake here.
Context: ...data ### 🟡 Situational Tools (5 tools) *Larger outputs, slower responses, or spe...(QB_NEW_EN)
[grammar] ~253-~253: There might be a mistake here.
Context: ...s, or specific use cases - use carefully* Large Output Tools -⚠️ `account_token...(QB_NEW_EN)
[grammar] ~255-~255: There might be a mistake here.
Context: ...s - use carefully* Large Output Tools -⚠️ account_tokentx- ERC-20 token tran...(QB_NEW_EN)
[grammar] ~258-~258: There might be a mistake here.
Context: ...rge datasets) Contract Analysis Tools -⚠️ contract_getabi- Contract ABI (can...(QB_NEW_EN)
[style] ~259-~259: As an alternative to the over-used intensifier ‘very’, consider replacing this phrase.
Context: ...contract_getabi` - Contract ABI (can be very large for complex contracts) **Event Log Ana...(EN_WEAK_ADJECTIVE)
[grammar] ~261-~261: There might be a mistake here.
Context: ...x contracts) Event Log Analysis Tools -⚠️ logs_getLogsByAddress- Event logs ...(QB_NEW_EN)
[grammar] ~262-~262: There might be a mistake here.
Context: ...etLogsByAddress- Event logs by address - ⚠️logs_getLogsByTopics` - Event logs b...(QB_NEW_EN)
[grammar] ~263-~263: There might be a mistake here.
Context: ..._getLogsByTopics- Event logs by topics - ⚠️logs_getLogsByAddressAndTopics` - Co...(QB_NEW_EN)
[grammar] ~266-~266: There might be a mistake here.
Context: ...ics` - Combined filtering Usage Tips: - Use small block ranges for logs tools (1...(QB_NEW_EN)
[grammar] ~272-~272: There might be a mistake here.
Context: ...put sizes ### 🔴 Other Tools (11 tools) *These tools failed during testing or req...(QB_NEW_EN)
[grammar] ~273-~273: There might be a mistake here.
Context: ...d during testing or require Pro accounts* Pro Account Required Most daily statis...(QB_NEW_EN)
[grammar] ~275-~275: There might be a mistake here.
Context: ... Pro accounts* Pro Account Required Most daily statistics tools require Ethe...(QB_NEW_EN)
[grammar] ~276-~276: There might be a mistake here.
Context: ...cs tools require Etherscan Pro accounts: - ❌stats_dailyavghashrate- Daily avera...(QB_NEW_EN)
[grammar] ~277-~277: There might be a mistake here.
Context: ...ilyavghashrate- Daily average hashrate - ❌stats_dailyavgnetdifficulty` - Daily ...(QB_NEW_EN)
[grammar] ~278-~278: There might be a mistake here.
Context: ...netdifficulty- Daily mining difficulty - ❌stats_dailynetutilization` - Daily ne...(QB_NEW_EN)
[grammar] ~279-~279: There might be a mistake here.
Context: ...utilization- Daily network utilization - ❌stats_dailynewaddress` - Daily new ad...(QB_NEW_EN)
[grammar] ~280-~280: There might be a mistake here.
Context: ...s_dailynewaddress- Daily new addresses - ❌stats_dailytx` - Daily transaction co...(QB_NEW_EN)
[grammar] ~281-~281: There might be a mistake here.
Context: ...stats_dailytx- Daily transaction count - ❌stats_dailytxnfee` - Daily transactio...(QB_NEW_EN)
[grammar] ~282-~282: There might be a mistake here.
Context: ...ts_dailytxnfee- Daily transaction fees - ❌stats_ethdailyprice` - Historical ETH...(QB_NEW_EN)
[grammar] ~283-~283: There might be a mistake here.
Context: ...s_ethdailyprice- Historical ETH prices - ❌stats_ethsupply` - ETH supply data - ...(QB_NEW_EN)
[grammar] ~284-~284: There might be a mistake here.
Context: ... - ❌stats_ethsupply- ETH supply data - ❌stats_ethsupply2- ETH supply data v...(QB_NEW_EN)
[grammar] ~285-~285: There might be a mistake here.
Context: ...stats_ethsupply2- ETH supply data v2 - ❌stats_dailyavggaslimit- Daily avera...(QB_NEW_EN)
[grammar] ~288-~288: There might be a mistake here.
Context: ... average gas limit Large Output Tools - ❌proxy_eth_getCode- Contract bytecod...(QB_NEW_EN)
[style] ~289-~289: As an alternative to the over-used intensifier ‘extremely’, consider replacing this phrase.
Context: ...th_getCode` - Contract bytecode (can be extremely large) Recommendation: Use essential too...(EN_WEAK_ADJECTIVE)
🪛 markdownlint-cli2 (0.17.2)
README.md
178-178: Emphasis used instead of a heading
(MD036, no-emphasis-as-heading)
197-197: Emphasis used instead of a heading
(MD036, no-emphasis-as-heading)
210-210: Emphasis used instead of a heading
(MD036, no-emphasis-as-heading)
216-216: Emphasis used instead of a heading
(MD036, no-emphasis-as-heading)
221-221: Emphasis used instead of a heading
(MD036, no-emphasis-as-heading)
229-229: Emphasis used instead of a heading
(MD036, no-emphasis-as-heading)
233-233: Emphasis used instead of a heading
(MD036, no-emphasis-as-heading)
238-238: Emphasis used instead of a heading
(MD036, no-emphasis-as-heading)
253-253: Emphasis used instead of a heading
(MD036, no-emphasis-as-heading)
255-255: Emphasis used instead of a heading
(MD036, no-emphasis-as-heading)
258-258: Emphasis used instead of a heading
(MD036, no-emphasis-as-heading)
261-261: Emphasis used instead of a heading
(MD036, no-emphasis-as-heading)
273-273: Emphasis used instead of a heading
(MD036, no-emphasis-as-heading)
288-288: Emphasis used instead of a heading
(MD036, no-emphasis-as-heading)
🪛 Ruff (0.12.2)
test_all_tools.py
801-802: SyntaxError: Expected '}', found NonLogicalNewline
🔇 Additional comments (1)
README.md (1)
67-82: No update needed: docs correctly reference 56 tools, matching the test configuration.Likely an incorrect or invalid review comment.
| ## Overview | ||
|
|
||
| This server provides 53+ tools for accessing Ethereum blockchain data, including: | ||
| This server provides 56 comprehensive tools for accessing Ethereum blockchain data, including: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fix tool count: 56 → 55 to match tests and tables.
The README claims 56 tools, but the suite and tables enumerate 55. Align the count.
Apply:
-This server provides 56 comprehensive tools for accessing Ethereum blockchain data, including:
+This server provides 55 comprehensive tools for accessing Ethereum blockchain data, including:📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| This server provides 56 comprehensive tools for accessing Ethereum blockchain data, including: | |
| This server provides 55 comprehensive tools for accessing Ethereum blockchain data, including: |
🤖 Prompt for AI Agents
In README.md around line 11, the tool count is incorrect: it says "56" but the
suite and tables list 55. Update that sentence to read "55 comprehensive tools"
so the README matches the tests and tables; ensure any other occurrences of "56
tools" in the file are changed to "55" to keep consistency.
| #!/usr/bin/env python3 | ||
| """ | ||
| Comprehensive test script for all Etherscan MCP tools. | ||
| Tests all 56 tools to determine which are essential for building Agents. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Docstring accuracy: says 56 tools; suite config contains 55.
Update to avoid confusion.
Apply:
-Tests all 56 tools to determine which are essential for building Agents.
+Tests all 55 tools to determine which are essential for building Agents.📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| Tests all 56 tools to determine which are essential for building Agents. | |
| Tests all 55 tools to determine which are essential for building Agents. |
🤖 Prompt for AI Agents
In test_all_tools.py around line 4, the module docstring incorrectly states "56
tools" while the test suite contains 55; update the docstring to state "55
tools" (or rephrase to a non-numeric description like "tests all tools" if you
prefer to avoid future drift) so the comment matches the actual suite
configuration.
| 'tag': self.test_data['recent_block'], | ||
| 'index': '0x0', | ||
| 'chainid': '1' | ||
| } | ||
| }, | ||
| { | ||
| 'name': 'proxy_eth_getBlockTransactionCountByNumber', | ||
| 'params': { | ||
| 'module': 'proxy', | ||
| 'action': 'eth_getBlockTransactionCountByNumber', | ||
| 'tag': self.test_data['recent_block'], | ||
| 'chainid': '1' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💡 Verification agent
🧩 Analysis chain
RPC block tag must be hex (0x-prefixed).
Decimal block numbers break eth_get*ByNumber/Count calls.
Apply:
'action': 'eth_getUncleByBlockNumberAndIndex',
- 'tag': self.test_data['recent_block'],
+ 'tag': hex(int(self.test_data['recent_block'])),
'index': '0x0',
'chainid': '1'
}
},
{
'name': 'proxy_eth_getBlockTransactionCountByNumber',
'params': {
'module': 'proxy',
'action': 'eth_getBlockTransactionCountByNumber',
- 'tag': self.test_data['recent_block'],
+ 'tag': hex(int(self.test_data['recent_block'])),
'chainid': '1'
}
},
{
'name': 'proxy_eth_getTransactionByBlockNumberAndIndex',
'params': {
'module': 'proxy',
'action': 'eth_getTransactionByBlockNumberAndIndex',
- 'tag': self.test_data['recent_block'],
+ 'tag': hex(int(self.test_data['recent_block'])),
'index': '0x0',
'chainid': '1'
}
},Confirm no remaining decimal tags:
Also applies to: 739-747
🏁 Script executed:
#!/bin/bash
rg -n "eth_get(BlockByNumber|BlockTransactionCountByNumber|UncleByBlockNumberAndIndex).*tag':\s*'(?!(0x|latest))" -n -C2 test_all_tools.py || trueLength of output: 552
🏁 Script executed:
#!/bin/bash
# Check for any 'tag' values that are purely decimal (missing 0x or 'latest' prefix)
rg -n "'tag':\s*'[0-9]+'" -n -C2 test_all_tools.py || trueLength of output: 71
🏁 Script executed:
#!/bin/bash
# Locate usage of recent_block in test_all_tools.py for context
rg -n "recent_block" -n -C5 test_all_tools.py
# Find where test_data is initialized to see the format of 'recent_block'
rg -n "test_data\s*=" -n -C5 test_all_tools.pyLength of output: 6076
Convert remaining RPC block tags to hex
RPC tag in eth_getUncleByBlockNumberAndIndex, eth_getBlockTransactionCountByNumber and eth_getTransactionByBlockNumberAndIndex calls must be 0x-prefixed. Apply:
'action': 'eth_getUncleByBlockNumberAndIndex',
- 'tag': self.test_data['recent_block'],
+ 'tag': hex(int(self.test_data['recent_block'])),
'index': '0x0',
'chainid': '1'
}
},
{
'name': 'proxy_eth_getBlockTransactionCountByNumber',
'params': {
'module': 'proxy',
'action': 'eth_getBlockTransactionCountByNumber',
- 'tag': self.test_data['recent_block'],
+ 'tag': hex(int(self.test_data['recent_block'])),
'chainid': '1'
}
},
{
'name': 'proxy_eth_getTransactionByBlockNumberAndIndex',
'params': {
'module': 'proxy',
'action': 'eth_getTransactionByBlockNumberAndIndex',
- 'tag': self.test_data['recent_block'],
+ 'tag': hex(int(self.test_data['recent_block'])),
'index': '0x0',
'chainid': '1'
}
},📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| 'tag': self.test_data['recent_block'], | |
| 'index': '0x0', | |
| 'chainid': '1' | |
| } | |
| }, | |
| { | |
| 'name': 'proxy_eth_getBlockTransactionCountByNumber', | |
| 'params': { | |
| 'module': 'proxy', | |
| 'action': 'eth_getBlockTransactionCountByNumber', | |
| 'tag': self.test_data['recent_block'], | |
| 'chainid': '1' | |
| { | |
| 'name': 'proxy_eth_getUncleByBlockNumberAndIndex', | |
| 'params': { | |
| 'module': 'proxy', | |
| 'action': 'eth_getUncleByBlockNumberAndIndex', | |
| 'tag': hex(int(self.test_data['recent_block'])), | |
| 'index': '0x0', | |
| 'chainid': '1' | |
| } | |
| }, | |
| { | |
| 'name': 'proxy_eth_getBlockTransactionCountByNumber', | |
| 'params': { | |
| 'module': 'proxy', | |
| 'action': 'eth_getBlockTransactionCountByNumber', | |
| 'tag': hex(int(self.test_data['recent_block'])), | |
| 'chainid': '1' | |
| } | |
| }, | |
| { | |
| 'name': 'proxy_eth_getTransactionByBlockNumberAndIndex', | |
| 'params': { | |
| 'module': 'proxy', | |
| 'action': 'eth_getTransactionByBlockNumberAndIndex', | |
| 'tag': hex(int(self.test_data['recent_block'])), | |
| 'index': '0x0', | |
| 'chainid': '1' | |
| } | |
| }, |
🤖 Prompt for AI Agents
In test_all_tools.py around lines 724 to 735, several RPC calls
(eth_getUncleByBlockNumberAndIndex, eth_getBlockTransactionCountByNumber,
eth_getTransactionByBlockNumberAndIndex) are using non-hex block tags; update
the 'tag' values to be 0x-prefixed hex strings (e.g., replace plain
decimal/string tags with '0x...' or use the existing helper that formats block
numbers to hex) so each RPC payload sends a 0x-prefixed tag for block
identifiers.
| } | ||
| ] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
SyntaxError: missing closing brace for last rpc_tests entry.
You close params (}) but not the enclosing test dict before the list ends.
Apply:
'chainid': '1'
}
+ }
]This resolves Ruff’s “Expected '}', found NonLogicalNewline” at Lines 801–802.
📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| } | |
| ] | |
| 'chainid': '1' | |
| } | |
| } | |
| ] |
🧰 Tools
🪛 Ruff (0.12.2)
801-802: SyntaxError: Expected '}', found NonLogicalNewline
🤖 Prompt for AI Agents
In test_all_tools.py around lines 801 to 802, the last rpc_tests list entry
closes the params object with '})' but fails to close the enclosing test
dictionary before the list ends; add the missing closing brace '}' (so the dict
ends) before the list closing bracket and ensure commas/indentation remain
correct to eliminate the syntax error.
Added a .env.example file with Etherscan API configuration instructions
Updated README.md to provide the necessary tools for building the agent
Added a test_all_tools.py script to thoroughly test all Etherscan MCP tools and generate reports
Summary by CodeRabbit
Documentation
Tests
Chores