Skip to main content
Glama
kukapay

tornado-cash-mcp

query_latest_deposits

Fetch recent Tornado Cash deposit records in a structured table format, including details like amount, timestamp, and origin, to track asset trails and wallet interactions.

Instructions

Query the most recent deposits from Tornado Cash Subgraph and return results as a formatted table.

Parameters:
    limits (int): The maximum number of deposit records to return. Must be positive. Default is 10.

Returns:
    A string containing a tabulated representation of deposit records with columns: id, amount, timestamp, commitment, blockNumber, from.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
limitsNo

Implementation Reference

  • main.py:41-86 (handler)
    The handler function for the 'query_latest_deposits' MCP tool, including the @mcp.tool() decorator for registration. It validates input, executes a GraphQL query on the Tornado Cash subgraph for the latest deposits, processes the data, formats it into a tabulated string using tabulate, and returns it.
    async def query_latest_deposits(limits: int = 10, ctx: Context = None) -> str:
        """
        Query the most recent deposits from Tornado Cash Subgraph and return results as a formatted table.
    
        Parameters:
            limits (int): The maximum number of deposit records to return. Must be positive. Default is 10.
    
        Returns:
            A string containing a tabulated representation of deposit records with columns: id, amount, timestamp, commitment, blockNumber, from.
        """
        if limits <= 0:
            raise ValueError("limits must be positive")
            
        query = """
        query LatestDeposits($first: Int, $orderBy: String, $orderDirection: String) {
          deposits(first: $first, orderBy: $orderBy, orderDirection: $orderDirection) {
            from
            amount
            blockNumber
            timestamp
            commitment
          }
        }
        """
        variables = {
            "first": limits,
            "orderBy": "timestamp",
            "orderDirection": "desc"
        }
        result = await query_subgraph(query, variables)
        deposits = result["data"]["deposits"]
        
        table_data = [
            [
                deposit["from"],
                deposit["amount"],
                deposit["blockNumber"],
                datetime.fromtimestamp(int(deposit["timestamp"])),
                deposit["commitment"][:10] + "...",
            ]
            for deposit in deposits
        ]    
        headers = ["from", "amount", "blockNumber", "time", "commitment"]
        table = tabulate(table_data, headers=headers, tablefmt="grid")
        
        return table
  • main.py:24-38 (helper)
    Supporting helper function 'query_subgraph' used by the tool to perform authenticated GraphQL queries to the Tornado Cash subgraph endpoint.
    async def query_subgraph(query: str, variables: Dict = None) -> Dict:
        """Helper function to query the Tornado Cash Subgraph with API key."""
        headers = {
            "Authorization": f"Bearer {THEGRAPH_API_KEY}",
            "Content-Type": "application/json"
        }
        async with httpx.AsyncClient() as client:
            response = await client.post(
                SUBGRAPH_URL,
                json={"query": query, "variables": variables or {}},
                headers=headers
            )
            response.raise_for_status()
            return response.json()
  • main.py:41-41 (registration)
    The @mcp.tool() decorator registers the query_latest_deposits function as an MCP tool.
    async def query_latest_deposits(limits: int = 10, ctx: Context = None) -> str:
Behavior3/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It describes the query operation and output format, but lacks details about potential rate limits, authentication requirements, data freshness, error conditions, or whether this is a read-only operation. The description doesn't contradict any annotations since none exist.

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

Conciseness5/5

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

The description is well-structured and appropriately sized. It begins with a clear purpose statement, then provides parameter details in a labeled section, followed by return value information. Every sentence adds value without redundancy, making it easy to scan and understand.

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

Completeness3/5

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

For a query tool with no annotations, no output schema, and minimal parameters, the description provides adequate coverage of the basic operation and parameters. However, it lacks details about the Tornado Cash Subgraph source, potential limitations, error handling, or the specific format of the returned table beyond column names, leaving some contextual gaps.

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

Parameters4/5

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

The description adds significant value beyond the input schema, which has 0% description coverage. It explains the 'limits' parameter's purpose (maximum number of deposit records), constraints (must be positive), and default value (10), while the schema only provides the title and type. For a single parameter tool with poor schema coverage, this is good compensation.

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

Purpose4/5

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

The description clearly states the tool's purpose: querying recent deposits from Tornado Cash Subgraph and returning them as a formatted table. It specifies the verb ('query'), resource ('most recent deposits'), and output format ('formatted table'), but doesn't explicitly differentiate from its sibling 'query_latest_withdrawals' beyond the deposit/withdrawal distinction.

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

Usage Guidelines3/5

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

The description implies usage context by specifying it returns 'most recent deposits' as a formatted table, suggesting it's for retrieving recent deposit data in a readable format. However, it doesn't provide explicit guidance on when to use this tool versus alternatives like the sibling withdrawal query or other data retrieval methods.

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

Install Server

Other Tools

Related Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/kukapay/tornado-cash-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server