# compute

`station__entropy__compute` · external (needs EXECUTION_BACKEND_URL configured) · domain `entropy` · pv-relevance `non-pv`

Compute information-theoretic entropy measures. Modes: shannon (H), cross (H_cross), kl (D_KL), mutual (MI), normalized (H_norm), conditional (H_Y|X). Supports from_counts for raw integers.

> **Note:** This tool routes through an external execution backend. If `EXECUTION_BACKEND_URL` is unset on the server, calls return JSON-RPC error `-32603 "Tool execution backend not configured"`. Tools with `backend: native` execute in-process and are always callable.

## Agent metadata

- `idempotent`: unknown
- `read_only`: unknown
- `expected_latency_ms`: unknown (not yet contract-tested)
- `cost_tokens_estimate`: unknown

## Input schema

- `mode` *string* (required) — shannon, cross, kl, mutual, normalized, or conditional
- `distribution_p` *array* (required) — Primary probability distribution or counts
- `distribution_q` *array* — Secondary distribution (required for cross, kl)
- `joint_rows` *integer* — Row count for joint matrix (required for mutual, conditional)
- `base` *string* — Log base: bits (default), nats, hartleys
- `from_counts` *boolean* — If true, normalize raw counts to probabilities

## Example call

```json
POST /api/mcp
Content-Type: application/json

{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "station__entropy__compute",
    "arguments": {
      "mode": "",
      "distribution_p": []
    }
  }
}
```

## Related

- [/tools](/tools) — all 3062 tools
- [/tools/entropy__compute](/tools/entropy__compute) — HTML page
- [/tools/entropy__compute/json](/tools/entropy__compute/json) — JSON form (agent-friendly)
- [/api/mcp](/api/mcp) — endpoint
- [/AGENTS.md](/AGENTS.md) — agent guide
