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

# Execute a Tool

> Call a Nikiwa tool and get its structured result.

Execution runs a single tool and returns its structured data. Pass the tool's inputs as a JSON body.

<ParamField header="Authorization" type="string" required>
  Your [developer key](/api-reference/authentication) as a Bearer token.
</ParamField>

<ParamField path="tool_name" type="string" required>
  The tool to run, for example `get_wallet_portfolio_breakdown`. It must be a public tool (see the [catalog](/mcp/tools)). Unknown or non-public names return `404`.
</ParamField>

<ParamField body="tool inputs" type="object">
  The tool's inputs. Most tools take an entity (a wallet as `wallet_address` or `address`, a token as `token_address`, a contract as `contract_address`, a `tx_hash`, or an `ens_name`) and often a `network`. The exact parameter names vary per tool — read each tool's schema from [discovery](/api-reference/discovery) or its page under **Endpoints**.
</ParamField>

## Example: wallet portfolio

<CodeGroup>
  ```bash cURL theme={null}
  curl -X POST https://pro-api.nikiwa.com/api/tools/get_wallet_portfolio_breakdown \
    -H "Authorization: Bearer nkw_live_YOUR_KEY" \
    -H "Content-Type: application/json" \
    -d '{
          "wallet_address": "0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045",
          "network": "ethereum"
        }'
  ```

  ```python Python theme={null}
  import requests

  r = requests.post(
      "https://pro-api.nikiwa.com/api/tools/get_wallet_portfolio_breakdown",
      headers={"Authorization": "Bearer nkw_live_YOUR_KEY"},
      json={
          "wallet_address": "0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045",
          "network": "ethereum",
      },
  )
  data = r.json()
  ```

  ```javascript Node theme={null}
  const res = await fetch(
    "https://pro-api.nikiwa.com/api/tools/get_wallet_portfolio_breakdown",
    {
      method: "POST",
      headers: {
        Authorization: "Bearer nkw_live_YOUR_KEY",
        "Content-Type": "application/json",
      },
      body: JSON.stringify({
        wallet_address: "0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045",
        network: "ethereum",
      }),
    },
  );
  const data = await res.json();
  ```
</CodeGroup>

## Providing exact entities

Tools are deterministic and expect precise inputs: an exact wallet, token, or contract address, a transaction hash, and a network. If you only have a symbol or a name, resolve it first. Call `resolve_token_symbol` to turn a symbol into an address, or `resolve_ens` to turn an ENS name into an address.

## Result

On success you receive the tool's data object. Invalid arguments return `422 Unprocessable Entity`, so check the tool's input schema from [discovery](/api-reference/discovery) if you hit one. When a tool has nothing to return, or hits a problem, you receive a status marker instead. See [Errors & status](/api-reference/errors).
