Menu

#2 Add a dry-run companion for the write tools (originate, hangup)

open
nobody
None
2026-08-10
2026-08-10
Anonymous
No

Originally created by: tahiralmas

Today a user either runs with the write tools unregistered, or sets PBX_MCP_ALLOW_WRITE=true and gets the live versions. There is nothing in between, so there is no way to see what a write would do before allowing writes at all.

Proposal: a read-only tool that reports the blast radius of a write without performing it. Hangup is the case that matters most, since the argument is a channel name and a wrong one drops a live call.

  • Resolve the same arguments the write tool takes.
  • Report what would be affected: which channels match, their caller ID, state, and duration.
  • Change nothing, and stay registered even when PBX_MCP_ALLOW_WRITE is unset.

This exercises the write path's planning logic while remaining read-only by contract, so a cautious operator can see the effect before deciding to set the flag.

Open questions:

  • One tool per write tool (pbx_hangup_preview), or a single pbx_preview that takes the intended action? Per-tool is clearer to a model.
  • Does originate have anything meaningful to preview beyond validating the channel string and confirming the extension exists in the dialplan? Possibly less valuable than the hangup case.

Suggested by a commenter on the r/mcp thread: https://old.reddit.com/r/mcp/comments/1vkatsb/

Discussion


Log in to post a comment.