Repository navigation
feat: enhance logging and input validation across tools; update README - #14
Merged
onlyexeption merged 2 commits intoOct 22, 2026
Merged
Conversation
…E for debug logging details
Marina-L-Stoyanova
requested review from
onlyexeption
and
a balanced review from Copilot
and removed request for
onlyexeption
October 20, 2026 08:39
Contributor
There was a problem hiding this comment.
🟢 Approval recommended
The focused changes have no identified blocking issues in static review; runtime tests were not executed.
No open issues 🎉
What changed in this PR
Improves reliability, input validation, and output formatting in the C# WPF MCP server while leaving the TypeScript runtime unchanged.
Changes:
- Serializes debug-log writes and reduces default stderr logging.
- Enforces input limits, adjusts headings, and improves documentation control matching.
- Adds C# smoke checks and updates troubleshooting guidance.
| File | Description |
|---|---|
| server/Tools/ToolLog.cs | Serializes concurrent log appends. |
| server/Tools/ToolInput.cs | Adds shared string-length validation. |
| server/Tools/SearchTools.cs | Validates queries, clamps limits, and adjusts headings. |
| server/Tools/DocsTools.cs | Validates inputs and improves matching and headings. |
| server/Tools/ComponentTools.cs | Validates inputs and adjusts headings. |
| server/README.md | Documents SDK debug logging. |
| server/Program.cs | Sets logging verbosity based on --debug. |
| scripts/smoke-test.ts | Adds validation and logging regression checks. |
| README.md | Updates debug troubleshooting guidance. |
Review effort: Balanced
onlyexeption
changed the base branch from
main
to
ibarakov/palette-recolor-guidance
October 22, 2026 07:16
onlyexeption
approved these changes
Oct 22, 2026
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.
C#-only changes in
server/;src/andThemeTools.csare untouched.--debuglog under parallel calls:ToolLog.Writenow locks around the append. Before, concurrent calls collided and the error was swallowed, so entries went missing.--debug. The "ready (data: …)" line is unchanged.limitis clamped to 1–50, solimit: 0or a negative value no longer returns "no results".ToolInput.CheckLength(name, value, max, min)returnsisErrorwith a clear message (e.g. "queryis too long (700 characters), max 128 characters").ThemeTools.cs.##instead of#, and the sections below it moved down one level (### Properties,#### Example 1, …).ThemeTools.csstill uses#until it gets the same change.search_wpf_docs(control: "ThemeManager"): control-name matching now ignores spaces as well as hyphens, so it finds the 10 "IG Theme Manager" topics.--debugnow mentions the SDK's stderr logging.Tests
New
IS_DOTNETchecks inscripts/smoke-test.ts:limit: 0returns one resultisErrorcontrol: "ThemeManager"finds the "IG Theme Manager" topicsinfo:lines without--debug--debuglog entries