fix: indent multi-line descriptions in generated docs#1576
Merged
SamMorrowDrums merged 2 commits intomainfrom Dec 12, 2025
Merged
fix: indent multi-line descriptions in generated docs#1576SamMorrowDrums merged 2 commits intomainfrom
SamMorrowDrums merged 2 commits intomainfrom
Conversation
When tool parameter descriptions span multiple lines, the continuation lines now receive proper indentation to maintain markdown list formatting. This fixes the rendering issue where multi-line descriptions would break out of the parameter list structure. Fixes #1494
Contributor
There was a problem hiding this comment.
Pull request overview
This PR fixes a markdown formatting issue where multi-line tool parameter descriptions were breaking out of list structure in generated documentation. The fix adds a helper function to indent continuation lines by 4 spaces, maintaining proper markdown list formatting when descriptions span multiple lines.
Key Changes
- Added
indentMultilineDescription()helper function to maintain markdown list structure for multi-line parameter descriptions - Regenerated README.md with properly indented multi-line descriptions (7 tool parameters affected)
- Updated docs/remote-server.md table (automated generation side-effect)
Reviewed changes
Copilot reviewed 2 out of 3 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| cmd/github-mcp-server/generate_docs.go | Adds indentation helper function and integrates it into parameter documentation generation |
| README.md | Regenerated documentation with proper 4-space indentation for multi-line parameter descriptions in 7 tool parameters |
| docs/remote-server.md | Updated toolset table from "Default" to "all" (automated generation side-effect unrelated to indentation fix) |
tommaso-moro
approved these changes
Dec 12, 2025
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.
Summary
This PR fixes the formatting issue where multi-line tool parameter descriptions break out of the markdown list structure in the generated README documentation.
Fixes #1494
Rendered
Problem
When tool parameter descriptions contain newlines (like the
methodparameter inpull_request_read), the continuation lines were not indented, resulting in broken markdown rendering:Before:
This renders poorly because the continuation lines are not part of the list item.
Solution
Added an
indentMultilineDescription()helper function that adds 4-space indentation to all lines after the first line in a description. This maintains proper markdown list formatting.After:
Changes
cmd/github-mcp-server/generate_docs.go: AddedindentMultilineDescription()helper and integrated it into parameter documentation generationREADME.md: Regenerated with proper indentation for multi-line descriptions