# entropy-compute

`station__entropy-calc__entropy-compute` · external (needs EXECUTION_BACKEND_URL configured) · domain `entropy-calc` · pv-relevance `non-pv`

normalized or conditional entropy from probability distributions or counts.

> **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

- `base` *string* (required)
- `distribution_p` *array* (required) — Primary probability distribution P (required for all modes). For "mutual" and "conditional", this is a flattened joint distribution matrix in row-major order.
- `distribution_q` *array*
- `from_counts` *boolean* (required)
- `joint_rows` *integer*
- `mode` *string* (required) — Computation mode - "shannon": Shannon entropy H(X) from distribution P - "cross": Cross-entropy H(P,Q) from two distributions - "kl": KL divergence D_KL(P||Q) - "mutual": Mutual information I(X;Y) from joint distribution - "normalized": Normalized entropy H(X)/H_max in [0,1] - "conditional": Conditional entropy H(Y|X) from joint distribution

## Example call

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

{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "station__entropy-calc__entropy-compute",
    "arguments": {
      "base": "",
      "distribution_p": [],
      "from_counts": false,
      "mode": ""
    }
  }
}
```

## Related

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