Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions plans/2026-12-01-mcp-server-example-implementation-plan.md
Original file line number Diff line number Diff line change
Expand Up @@ -2626,6 +2626,26 @@ What is left needs the maintainer, and is not to be assumed done:
_Added on 2026-12-02. Everything above this section is the plan as it was written and revised. This
section records what was done with it._

**Subcommand lookup and rendering**
([cmd2 commit `dfb92d47`](https://github.com/python-cmd2/cmd2/commit/dfb92d47)).

- Append the subcommand's `typed` spelling to its parent's lookup path. This distinguishes the
single subcommand in `report "list all"` from the nested subcommand in `report list all`.
`list_commands` also returns the typed spellings.
- Use the child usage to construct the actual invocation. For a parser with a `user` positional
before its subcommands, `owner alice -- -x` dispatches to the subcommand described by `owner -x`.
A preceding positional can consume the end-of-options marker even when the child itself is named
`--`. From-file expansion still happens before option parsing.
- When an argument in a child usage prefix has more than 1,000 choices, rebuild the prefix from the
bounded display parser. Descendant usage and help then show the argument's metavar. Configure the
formatter and its Rich console for 100 columns on the display copy. The rebuild leaves the process
environment alone.
- Escape lone surrogate code points as printable text at the snapshot boundary. A default or alias
containing an undecodable filesystem byte can then be returned in a UTF-8 MCP response.

On macOS, all 196 SDK-required example tests passed on Python 3.11.18 and 3.15.2. On 3.15.2 the full
suite passed with 3,426 tests and 3 skips, and both `make check` and `make docs-test` passed.

**Parser, snapshot, and server behavior at
[`db54d52d`](https://github.com/python-cmd2/cmd2/commit/db54d52d).**

Expand Down