MCP: tell the --output format switch apart from an --output path; ship LICENSE in every wheel - #25
Merged
Conversation
…p LICENSE in every wheel _catalog.py treated any option named --output as the text|json format flag: it hid it from the tool schema and appended "--output json" to every invocation. For `bookkit write outline` and `write chapter` that option is the destination path, so the outline was written to a file literally named "json" and the model never got an envelope. The format switch is now recognised by its type (an enum containing "json"), and a path-typed --output is exposed as an ordinary parameter. The test catalog's write outline entry now carries the path type the real introspect declares; a test covers the argv both without and with a path. Each package declares license = "EUPL-1.2" but had no LICENSE file in its own directory, so hatchling shipped none (License-File: None in every built wheel). A copy of the repository LICENSE now sits in each package root, which hatchling's default license-file glob picks up; verified by building all four wheels. Closes #21, closes #22. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01GexXknLn75PzvBJRG3MDFW
alpibrupa
marked this pull request as ready for review
September 1, 2026 23:32
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Closes #21, closes #22.
MCP adapter
_catalog.pytreated any option named--outputas thetext|jsonformat flag: it hid it from the tool's input schema and appended--output jsonto every invocation. Forbookkit write outlineandbookkit write chapter,--outputis the destination path (type: pathin the CLI's own introspect), so the outline was written to a file literally namedjson, the chapter to./json, and the model never received a JSON envelope.The format switch is now recognised by its type (an
enum[...]containingjson) rather than its name, via_is_format_option(). A path-typed--outputis exposed as an ordinary parameter and passed through. The test catalog'swrite outlineentry now carries the path type the real CLI declares;test_path_typed_output_option_is_a_real_parametercovers the argv with and without a path, and the existing group-command test asserts no--output jsonis appended.Licence files
Each package declares
license = "EUPL-1.2"but had noLICENSEfile in its own directory, so hatchling shipped none (License-File: None, emptylicenses/in every built wheel). A copy of the repositoryLICENSEnow sits in each package root, which hatchling's default license-file glob picks up. Verified by building all four wheels:packages/bookkit/README.md's[LICENSE](LICENSE)link now resolves.Verification
ruff check packages,ruff format --check packages,pytest packages/mcp(12 passed).🤖 Generated with Claude Code
https://claude.ai/code/session_01GexXknLn75PzvBJRG3MDFW
Generated by Claude Code