> ## Documentation Index
> Fetch the complete documentation index at: https://docs.deepmako.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Tools Overview

> How Mako's agentic tool system works.

Mako has **23 built-in tools** that she calls autonomously during inference. Tool execution happens entirely server-side in the gateway — you receive the final answer, not the raw tool calls.

## Tool categories

| Category        | Tools    | Description                                                                          |
| --------------- | -------- | ------------------------------------------------------------------------------------ |
| **On-chain**    | 16 tools | Read blockchain state, decode transactions, and sleuth wallets across 8 EVM networks |
| **Market data** | 1 tool   | Live crypto prices from CoinGecko                                                    |
| **Web**         | 4 tools  | Search, page extraction, tweets, music                                               |
| **Knowledge**   | 1 tool   | Curated Base ecosystem knowledge base                                                |
| **Meta**        | 1 tool   | Self-documenting tool listing                                                        |

## How tool calling works

When you send a message to the chat completions endpoint, the gateway:

1. **Sends tool definitions** to the model alongside your message. The model sees all 23 tools and their parameter schemas.
2. **Checks the response** for tool calls. If the model outputs a structured tool call (or embeds one in XML/JSON within its text), the gateway parses and executes it.
3. **Feeds results back.** The tool result is formatted into human-readable text and added to the conversation as a `tool` message.
4. **Loops.** The model sees the tool result and can either respond or call another tool. This repeats for up to **8 rounds**.

## Auto-chaining

The gateway adds intelligence on top of the model's tool calls:

* **Transaction forensics:** When a tx hash is detected, the gateway automatically fires `get_transaction`, `get_transaction_receipt`, and `decode_tx_logs` in parallel — giving the model the complete picture (basic details, execution outcome, and decoded token transfers) without requiring multiple turns.
* **Address profiling:** When an address is detected, `lookup_address` fires alongside balance and contract checks to resolve ENS names and known protocol labels. If the user asks about "history" or "activity", `get_address_history` is also triggered.
* **Contract inspection:** When the user mentions "source", "code", "abi", or "verified" alongside an address, `get_contract_source` fires automatically.
* **Tweet auto-reading:** When `web_search` returns results containing Twitter/X URLs, the gateway automatically calls `read_tweet` on those URLs without waiting for the model to request it.
* **Page auto-extraction:** The top non-social-media URL from search results is automatically extracted via `web_extract` for additional context.
* **Stall detection:** If the model responds with "let me check that" without actually calling a tool, the gateway nudges it with a direct instruction to make the appropriate tool call.

## Tool timeout

All tools have a **15-second timeout**. If the underlying RPC call or API request takes longer, the tool returns an error and the model continues with whatever information it has.

## All tools

| Tool                        | Parameters                                         | Description                                                        |
| --------------------------- | -------------------------------------------------- | ------------------------------------------------------------------ |
| `get_eth_balance`           | `address`, `chain?`                                | Native token balance (ETH, MATIC, etc.)                            |
| `is_contract`               | `address`, `chain?`                                | Check if address is contract, EOA, or EIP-7702 delegated           |
| `get_token_balance`         | `address`, `token_address`, `chain?`               | ERC-20 token balance                                               |
| `get_token_info`            | `token_address`, `chain?`                          | Token name, symbol, decimals, total supply                         |
| `get_gas_price`             | `chain?`                                           | Current gas price in Gwei                                          |
| `get_block`                 | `chain?`                                           | Latest block number, timestamp, tx count, base fee                 |
| `get_tx_count`              | `address`, `chain?`                                | Transaction count (nonce)                                          |
| `resolve_ens`               | `name`                                             | ENS name → Ethereum address                                        |
| `get_transaction`           | `hash`, `chain?`                                   | Transaction details by hash                                        |
| `get_transaction_receipt`   | `hash`, `chain?`                                   | Full receipt — status, gas used, logs count, contract created      |
| `decode_tx_logs`            | `hash`, `chain?`                                   | Decode ERC-20 Transfer/Approval events from tx logs                |
| `get_internal_transactions` | `hash`, `chain?`                                   | Internal (trace) transactions — contract-to-contract flows         |
| `get_address_history`       | `address`, `chain?`                                | Recent transaction history (last 25 txs) with direction and timing |
| `read_contract`             | `address`, `function_signature`, `args?`, `chain?` | Read any public view/pure function on a contract                   |
| `get_contract_source`       | `address`, `chain?`                                | Verified contract source, ABI, function list                       |
| `lookup_address`            | `address`, `chain?`                                | Reverse ENS, known protocol labels, basic profiling                |
| `get_crypto_price`          | `coin`                                             | Live USD price, 24h change, market cap                             |
| `web_search`                | `query`                                            | Web search (Firecrawl → DDG → Bing fallback)                       |
| `web_extract`               | `url`                                              | Extract text content from a URL                                    |
| `read_tweet`                | `tweet`                                            | Read a tweet by URL or ID (via FXTwitter)                          |
| `find_music`                | `query`                                            | Search for music on YouTube                                        |
| `knowledge_search`          | `query`                                            | Search the Base ecosystem knowledge base                           |
| `list_tools`                | `query?`                                           | List and filter available tools                                    |
