# Microgram: station-count-drift-gate

`station__algovigilance__microgram-station-count-drift-gate` · native (always callable) · domain `algovigilance` · pv-relevance `pv-core`

Station-specific count drift gate. Wraps staleness-count-drift with ferroforge config surface semantics: fires DRIFTED when the ratio of (|measured - claimed| / claimed) exceeds the configured threshold. Intended for SessionStart hook enforcement.

## Agent metadata

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

## Input schema

- `measured` *number* (required) — Current measured count (e.g., ls ferroforge/configs/*.json | wc -l)
- `claimed` *number* (required) — Count claimed in CLAUDE.md or MEMORY.md
- `threshold_pct` *number* — Fractional drift threshold (default 0.05 = 5%)
- `surface_name` *string* — Surface label for downstream reporting
- `drift_ratio` *number* (required) — Caller pre-computes abs(measured-claimed)/max(claimed,1). Passed to gate for comparison.
- `threshold_exceeded` *boolean* (required) — Caller pre-computes (drift_ratio > threshold_pct). Microgram classifies.

## Example call

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

{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "station__algovigilance__microgram-station-count-drift-gate",
    "arguments": {
      "measured": 0,
      "claimed": 0,
      "drift_ratio": 0,
      "threshold_exceeded": false
    }
  }
}
```

## Related

- [/tools](/tools) — all 7718 tools
- [/tools/algovigilance__microgram-station-count-drift-gate](/tools/algovigilance__microgram-station-count-drift-gate) — HTML page
- [/tools/algovigilance__microgram-station-count-drift-gate/json](/tools/algovigilance__microgram-station-count-drift-gate/json) — JSON form (agent-friendly)
- [/api/mcp](/api/mcp) — endpoint
- [/AGENTS.md](/AGENTS.md) — agent guide
