[0.8.37] - 2026-11-12
Added
-
Per-command
ArgParserFactory. A new
src/mcptoon/arg_parser_factory.pymodule wrapsargparse.ArgumentParser
withallow_abbrev=Falseandadd_help=False, exposing a shared baseline of
output flags (--json,--toon,--slim,--compact,--mcptoon,
--yaml,--format,--head,--max-chars,--full,--transport,
--stdin,--fallback-json).parse_cmd_argsusesparse_known_argsso
positionals and opaque tails pass through to the command handler without
aborting; strict unknown-flag enforcement stays with the global pre-pass in
cli.py. -
doctorsubcommand migrated to the new parser._cmd_doctornow takes
json_mode=Falseinstead of the oldfmt/--json in restheuristic. The
dispatch is keyed on the resolved command and reads--jsonfrom the
factory's namespace, so a--jsonon either side ofdoctorstill produces
JSON, while an argument value that happens to readdoctoron another
command can no longer reach this branch. The global pre-pass still validates
every other flag and value, so strict-mode behavior is unchanged.Contributed by @examosa (#44); landed with the two review items applied (#46).