Skip to content

v4.9.0 — MCP agent-ergonomics

Latest

Choose a tag to compare

@kingassune kingassune released this 07 Jul 16:14
· 15 commits to main since this release

An agent-ergonomics pass on the MCP read/management surface, from a red-team of how an agent perceives and acts through these tools.

Fixed

  • close_perp_position could not close short positions. It hardcoded isLong: false (with a false "reduce-only determines direction" comment), so closing a short submitted a sell that could not reduce it — the primary risk-management tool silently failed for half of all positions. Direction and size are now resolved from the live position (a short closes with a buy).

Added

  • get_hl_trade_history limit (default 20, most recent first) — the tool returned the entire lifetime fill history (~90KB in practice) and overflowed an agent's context.
  • get_hl_meta_and_asset_ctxs coins filter — return only the requested assets instead of all ~231.

Changed

  • Tool results serialize compact (no 2-space indent tax).
  • Failures set isError: true with a structured { error } payload so a caller can branch on success/failure; the stack is logged server-side, not shipped into the agent's context.

Impact

trade_history on a real account: ~19k tokens unbounded → ~1.9k at limit=20 (~17k tokens/call saved).

Tests

107 mcp-server tests passing.

Full changelog: CHANGELOG.md.