phux docs

CLI and MCP parity

Each MCP tool, the phux command it mirrors, and its read-only and destructive hints.

Every tool the MCP adapter (phux mcp) serves, the phux verb it mirrors, and how it runs. in-process tools spawn no subprocess and return the document the CLI verb prints, built by the same phux-client function. The CLI residue runs the canonical phux binary with argv, never a shell, for the reason listed. The parity gate holds this table to the live tool catalog, the CLI grammar, and the kind table, so it cannot drift from the adapter.

ToolCLI verbRunsRead-onlyDestructive
phux_operation_statusnone (automation only)in-processyesno
phux_lsphux lsin-processyesno
phux_uploadphux uploadin-processnoyes
phux_snapshotphux snapshotin-processyesno
phux_send_keysphux send-keysin-processnoyes
phux_pastephux pastein-processnoyes
phux_runphux runCLInoyes
phux_waitphux waitin-processyesno
phux_newphux newCLInono
phux_killphux killin-processnoyes
phux_rmphux rmin-processnoyes
phux_relaunchphux relaunchin-processnono
phux_organizephux organizein-processnono
phux_detachphux detachin-processnoyes
phux_watchphux watchin-processyesno
phux_askphux askin-processnono
phux_launchphux launchCLInoyes
phux_spawnphux spawnin-processnoyes
phux_signalphux signalin-processnoyes
phux_tagphux tagin-processnono
phux_renamephux renamein-processnono
phux_insert_panephux insert-panein-processnono
phux_move_panephux mvin-processnono
phux_swap_panephux swap-panein-processnono
phux_archivephux archiveCLInono
phux_project_inspectphux project inspectCLIyesno
phux_plugin_actionphux config runin-processnoyes
phux_plugin_profilenone (automation only)in-processyesno
phux_agent_listphux agent listCLIyesno
phux_agent_showphux agent showCLIyesno
phux_agent_explainphux agent explainCLIyesno
phux_agent_setphux agent setin-processnono
phux_agent_clearphux agent clearin-processnono
phux_agent_waitphux agent waitCLIyesno
phux_agent_send_keysphux agent send-keysCLInoyes
phux_agent_promptphux agent promptCLInoyes
phux_agent_answerphux agent answerCLInoyes
phux_agent_startphux agent startCLInoyes
phux_agent_session_openphux agent session openCLInono
phux_agent_session_closephux agent session closeCLInoyes
phux_agent_emitphux agent emitCLInoyes
phux_agent_logphux agent logCLInono
phux_mail_sendphux mail sendin-processnono
phux_mail_readphux mail readin-processnono
phux_mail_ackphux mail ackin-processnono
phux_claim_takephux claim takein-processnono
phux_claim_renewphux claim renewin-processnono
phux_claim_releasephux claim releasein-processnono
phux_claim_listphux claim listin-processyesno
phux_statusphux statusCLIyesno
phux_doctorphux doctorCLIyesno
phux_whoamiphux whoamiCLIyesno
phux_perfphux perfCLIyesno
phux_perf_tracephux perf traceCLInono
phux_resource_showphux resource showin-processyesno
phux_resource_waitphux resource waitin-processyesno
phux_resource_methodsphux resource methodsin-processyesno
phux_approvalsphux approvalsin-processyesno
phux_approvephux approvein-processnoyes

CLI residue

These tools still run the phux binary as a subprocess, bounded in time and output:

  • phux_run: the sentinel bracketing, the child’s mirrored exit code, and the run deadline are the CLI command’s, and a failing command must still return its RunResult.
  • phux_new: phux new auto-starts a local server when none is listening, which runs the phux binary; phux_client::session has the create, but not that server lifecycle.
  • phux_launch: integration resolution (enabled plugins, manifests, argv templates, native-session restore) lives in the CLI command.
  • phux_archive: the archive capture, its agent-session bridge, and the import live in the CLI command.
  • phux_project_inspect: git worktree inspection runs git from the CLI command; phux-client has no git.
  • phux_agent_list: the detector projection (manifest replay over the pane’s screen, plus [[plugins]] agent declarations) is built in the phux binary, not phux-client.
  • phux_agent_show: the detector projection (manifest replay over the pane’s screen, plus [[plugins]] agent declarations) is built in the phux binary, not phux-client.
  • phux_agent_explain: the detector projection (manifest replay over the pane’s screen, plus [[plugins]] agent declarations) is built in the phux binary, not phux-client.
  • phux_agent_wait: the result document’s detection field is the detector projection, which is built in the phux binary, not phux-client.
  • phux_agent_send_keys: key-spec validation, the occupant check, operation-id minting, and the error-code table live in the CLI command.
  • phux_agent_prompt: operation-id minting, the fused wait’s result document, and the error-code table live in the CLI command.
  • phux_agent_answer: live-ask correlation and suggestion validation live in the CLI command.
  • phux_agent_start: integration resolution and the detector readiness wait live in the CLI command.
  • phux_agent_session_open: the Terminal-to-AgentSession resolution and the result documents are assembled in the CLI command (commands/agent/resource_session.rs).
  • phux_agent_session_close: the Terminal-to-AgentSession resolution and the result documents are assembled in the CLI command (commands/agent/resource_session.rs).
  • phux_agent_emit: the Terminal-to-AgentSession resolution and the result documents are assembled in the CLI command (commands/agent/resource_session.rs).
  • phux_agent_log: the Terminal-to-AgentSession resolution and the result documents are assembled in the CLI command (commands/agent/resource_session.rs).
  • phux_status: the status document (peer-credential pid, service state, log paths) is assembled by the CLI command.
  • phux_doctor: the health checks are the CLI’s; a second copy could disagree with phux doctor.
  • phux_whoami: the whoami feature check and the refusal document are the CLI command’s.
  • phux_perf: the report document and the dev-mode desktop’s socket discovery are the CLI command’s.
  • phux_perf_trace: the capture window, the trace file, and the merged desktop timeline are the CLI command’s.

Automation-only tools

  • phux_operation_status: observe an adapter-scoped mutation without blocking on approval.
  • phux_plugin_profile: lists the profiles configured plugin manifests declare; phux plugin list and phux config plugins list the manifests, not their profiles.

CLI verbs without a tool

Agent-facing verbs that have no MCP tool yet:

  • phux config distro list: local distro package inventory; no server action.
  • phux config distro current: local configured selection; no server action.
  • phux config distro use: operator config-file selection; reload is explicitly separate.
  • phux config distro off: operator config-file selection; reload is explicitly separate.
  • phux logs: local operator log inventory and tailing, not a model-facing server action.
  • phux update: replaces the operator’s installed binaries; installation management stays outside MCP.
  • phux channel: changes the operator’s installed release channel; installation management stays outside MCP.
  • phux config agents: local config inventory of declared agent integrations; phux_agent_list covers the live agents.
  • phux host add: operator host-registry enrollment, not an agent action.
  • phux host ls: operator inventory of the host registry, not an agent action.
  • phux host discover: operator tailnet inventory for enrollment, not an agent action.
  • phux host renew: operator host-registry certificate renewal, not an agent action.
  • phux host upgrade: operator host-registry transport upgrade, not an agent action.
  • phux pair: mints a pairing secret; credential handling stays outside the model-facing set.
  • phux mcp: launches this adapter itself.
  • phux deny: phux_approve decides both ways: decision: deny is phux deny.
  • phux resize: not exposed over MCP yet; a known parity gap.
  • phux restore: an operator’s after-restart sweep; an agent relaunches the one pane it means with phux_relaunch.
  • phux rec: not exposed over MCP yet; a recording is written to a file on the adapter’s host.
  • phux play: not exposed over MCP yet; playback replays a file from the adapter’s host.
  • phux rec mark: not exposed over MCP yet; it marks recordings written on the adapter’s host.

Annotation sources

Read-only is the kind table’s mutating rule: a tool is read-only only when no method it can send changes server state. Destructive comes from the kind table’s MethodSpec.dangerous flag, or a method that needs INPUT.