Skip to content

KB/mcp

MCP tool: plays_state

Last verified

What this tool does

plays_state answers one question per locked trading play: is it armed right now, and what is the evidence? It replaces reading state out of journal prose with a single structured call.

For each play it returns:

The envelope carries session_state (fresh / stale / unknown) so a stale read announces itself.

How an agent uses it

Read armed.value per play as your one boolean, with the evidence beside it. Then apply your own governance:

What it never does

This surface reports state and evidence — it never decides.

Auth

The tool wraps the internal-token-gated GET /api/v1/plays/state. It forwards X-Internal-Token from the MCP server’s own environment — set INTERNAL_API_TOKEN on the finance-report-mcp container. It is a thin wrapper: no gate logic lives in the tool, so it inherits the route’s behaviour (including the never-500/never-404 degrade — every missing piece comes back as a reason at HTTP 200).