You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
split 'resolve' into multiple tools and add more descriptive information for LLMs (#19)
* split 'resolve' into multiple tools and add more descriptive information
for LLMs
* decode "data" and remove "logs_bloom"
* correct description for resolve using ens/wallets
* remove data if it's encoded
description="Retrieve blockchain events with flexible filtering options. Use this to search for specific events or to analyze event patterns across multiple blocks."
15
+
description="Retrieve blockchain events with flexible filtering options. Use this to search for specific events or to analyze event patterns across multiple blocks. Do not use this tool to simply look up a single transaction."
16
16
)
17
17
defget_all_events(
18
18
self,
19
19
chain: Annotated[
20
20
list[int|str] |int|str|None,
21
21
"Chain ID(s) to query (e.g., 1 for Ethereum Mainnet, 137 for Polygon). Specify multiple IDs as a list [1, 137] for cross-chain queries (max 5).",
22
22
] =None,
23
-
address: Annotated[
23
+
contract_address: Annotated[
24
24
str|None,
25
25
"Contract address to filter events by (e.g., '0x1234...'). Only return events emitted by this contract.",
description="Get contract ABI and metadata about a smart contract, including name, symbol, decimals, and other contract-specific information. This tool also retrieve the Application Binary Interface (ABI) for a smart contract. Essential for decoding contract data and interacting with the contract"
297
+
description="Get contract ABI and metadata about a smart contract, including name, symbol, decimals, and other contract-specific information. Use this when asked about a contract's functions, interface, or capabilities. This tool specifically retrieves details about deployed smart contracts (NOT regular wallet addresses or transaction hashes)."
298
298
)
299
299
defget_contract_metadata(
300
300
self,
301
301
contract_address: Annotated[
302
302
str,
303
-
"The contract address to get metadata for (e.g., '0x1234...'). Works for tokens and other contract types.",
303
+
"The contract address to get metadata for (e.g., '0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2' for WETH). Must be a deployed smart contract address (not a regular wallet). Use this for queries like 'what functions does this contract have' or 'get the ABI for contract 0x1234...'.",
description="Search and analyze blockchain input data: block number, transaction or block hash, wallet or contract address, event signature or function selector. It returns a detailed analyzed information about the input data."
428
+
description="Get detailed information about a specific block by its number or hash. Use this when asked about blockchain blocks (e.g., 'What's in block 12345678?' or 'Tell me about this block: 0xabc123...'). This tool is specifically for block data, NOT transactions, addresses, or contracts."
429
+
)
430
+
defget_block_details(
431
+
self,
432
+
block_identifier: Annotated[
433
+
str,
434
+
"Block number or block hash to look up. Can be either a simple number (e.g., '12345678') or a block hash (e.g., '0xd4e56740f876aef8c010b86a40d5f56745a118d0906a34e69aec8c0db1cb8fa3' for Ethereum block 0). Use for queries like 'what happened in block 14000000' or 'show me block 0xd4e56...'.",
435
+
],
436
+
chain: Annotated[
437
+
list[int|str] |int|str|None,
438
+
"Chain ID(s) to query (e.g., 1 for Ethereum). Specify the blockchain network where the block exists.",
description="Look up transactions for a wallet or contract address. Use this when asked about a specific Ethereum address (e.g., '0x1234...') to get account details including balance, transaction count, and contract verification status. This tool is specifically for addresses (accounts and contracts), NOT transaction hashes or ENS names."
450
+
)
451
+
defget_address_transactions(
452
+
self,
453
+
address: Annotated[
454
+
str,
455
+
"Wallet or contract address to look up (e.g., '0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045' for Vitalik's address). Must be a valid blockchain address starting with 0x and 42 characters long.",
456
+
],
457
+
chain: Annotated[
458
+
list[int|str] |int|str|None,
459
+
"Chain ID(s) to query (e.g., 1 for Ethereum). Specify the blockchain network for the address.",
description="Look up transactions associated with an ENS domain name (anything ending in .eth like 'vitalik.eth'). This tool is specifically for ENS domains, NOT addresses, transaction hashes, or contract queries."
429
471
)
430
-
defresolve(
472
+
defget_ens_transactions(
431
473
self,
432
-
input_data: Annotated[
474
+
ens_name: Annotated[
433
475
str,
434
-
"Any blockchain input data: block number, transaction or block hash, address, event signature or function selector",
476
+
"ENS name to resolve (e.g., 'vitalik.eth', 'thirdweb.eth'). Must be a valid ENS domain ending with .eth.",
description="Get detailed information about a specific transaction by its hash. Use this when asked to analyze, look up, check, or get details about a transaction hash (e.g., 'What can you tell me about this transaction: 0x5407ea41...'). This tool specifically deals with transaction hashes (txid/txhash), NOT addresses, contracts, or ENS names."
492
+
)
493
+
defget_transaction_details(
494
+
self,
495
+
transaction_hash: Annotated[
496
+
str,
497
+
"Transaction hash to look up (e.g., '0x5407ea41de24b7353d70eab42d72c92b42a44e140f930e349973cfc7b8c9c1d7'). Must be a valid transaction hash beginning with 0x and typically 66 characters long. Use this for queries like 'tell me about this transaction' or 'what happened in transaction 0x1234...'.",
498
+
],
499
+
chain: Annotated[
500
+
list[int|str] |int|str|None,
501
+
"Chain ID(s) to query (e.g., 1 for Ethereum). Specify the blockchain network where the transaction exists.",
description="Decode a function or event signature. Use this when you need to understand what a specific function selector or event signature does and what parameters it accepts."
513
+
)
514
+
defdecode_signature(
515
+
self,
516
+
signature: Annotated[
517
+
str,
518
+
"Function or event signature to decode (e.g., '0x095ea7b3' for the approve function). Usually begins with 0x.",
519
+
],
520
+
chain: Annotated[
521
+
list[int|str] |int|str|None,
522
+
"Chain ID(s) to query (e.g., 1 for Ethereum). Specify to improve signature lookup accuracy.",
0 commit comments