# magi-code 0.99.0
## New features
### Client-provided tools
Clients launching `magi-code serve --stdio` can register tools for the agent, Code Mode, and permitted subagents.
**How to use:** Include `client.tools` in `initialize.params.required_capabilities` and provide a `client_tools` array. Each descriptor needs a unique `client__`-prefixed name, description, and object `input_schema`. An optional `timeout_ms` controls the deadline.
Handle `client.tool.call` events by executing the named tool. Reply through `client.tool.result` with a fresh request ID, the supplied instance/session/run/call/task/subagent identities, `status` (`success` or `error`), and `text`. Optional `structured` carries JSON results.
Registration lasts for that child process. The client owns approvals, argument validation, execution, and cancellation handling. Inspection subagents cannot use client tools.
### Cache-compatible compaction
Compaction can now preserve a compatible live request’s instructions, tools, reasoning settings, and cache identity.
**How to use:** Run `/compact` or leave automatic compaction enabled. No additional setup is required. Reuse requires matching provider/model settings and unchanged saved history. Without a compatible snapshot, compaction uses tool-free history replay. Cache savings depend on the provider and are not guaranteed.
### Visible tool intent
Mission Control tool cards now show the agent’s explanation in a bordered `Intent:` box, including MCP tools and subagent batches.
**How to use:** Read the intent above tool details during normal agent activity. No setting is required. Direct Bash-mode responses do not show this box.
## Fixes
- Count each compaction attempt separately and retain total usage when fallback is needed.
- Remove repeated Code Mode intent text and restore its `Script outcome` row.
## Other changes
- Every built-in and MCP call now requires a nonblank top-level `intent`, including calls inside Code Mode. Custom prompts and scripts must supply it.
- MCP calls now use `{intent, arguments}`. Only `arguments` reaches the MCP server.
- Client-provided tools retain their declared schemas without an added intent requirement.