Skip to content

fix(bake): use baked tool name and description in help output - #66

Open
syf2211 wants to merge 1 commit into
knowsuchagency:mainfrom
syf2211:fix/bake-description-usage
Open

fix(bake): use baked tool name and description in help output#66
syf2211 wants to merge 1 commit into
knowsuchagency:mainfrom
syf2211:fix/bake-description-usage

Conversation

@syf2211

@syf2211 syf2211 commented Jul 20, 2026

Copy link
Copy Markdown

Summary

Use the baked tool's configured name and description in argparse help output when running mcp2cli @<name> -h, instead of always showing the generic mcp2cli banner.

Motivation

Fixes #63

bake create --description and bake update --description already persist a description into the baked config, but _run_baked() never passed it through to the CLI parser. As a result, mcp2cli @petstore -h showed usage: mcp2cli and the default tagline even when a custom description was configured.

Changes

  • Extend BakeConfig with optional name and description fields
  • Populate them in _run_baked() from the baked config
  • Add optional prog / description parameters to build_argparse()
  • Pass baked metadata from handle_mcp() and _handle_openapi_mode() when building the subcommand parser
  • Add integration tests for help output with and without a custom description

Tests

python3 -m pytest tests/test_bake.py -q
python3 -m pytest -q

Result: 354 passed

Notes

  • GraphQL and session code paths are unchanged; they do not use BakeConfig.
  • bake install wrappers still exec mcp2cli @<name>, so this fix also improves petstore -h for installed wrappers.

Thread the baked config name and description through BakeConfig into
build_argparse so `mcp2cli @<name> -h` shows the tool's prog and custom
description instead of the generic mcp2cli banner.

Fixes knowsuchagency#63
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

bake create/update --description is stored but never used

1 participant