Repository navigation
fix: accept explicit null in get_current_config; keep screenshot logs off stdout - #33
Merged
mijun (houlianpi) merged 1 commit intoOct 28, 2026
Conversation
…nshot logs off stdout - get_current_config(platform: str = None) advertised default null on a string-typed field, so an explicit null failed validation. Type it Optional[str], like #9 did for app_launch arguments. - app_screenshot printed to stdout, which is the JSON-RPC stream when the pywinauto server runs with --transport stdio. Log instead; the error path already logs via logger.error.
Vishal Habib · AI Product Manager (vishalhabib99)
requested a review
from a team
October 26, 2026 16:21
Contributor
Author
|
@microsoft-github-policy-service agree |
mijun (houlianpi)
approved these changes
Oct 28, 2026
mijun (houlianpi)
left a comment
Contributor
There was a problem hiding this comment.
Reviewed locally: explicit null is accepted by the Optional annotation, screenshot logging no longer writes to stdout, and the focused behavioral smoke test passed.
Contributor
Author
|
Thanks mijun (@houlianpi) for reviewing it locally and merging, and for running the smoke test on the stdout change. |
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.
Two small MCP protocol fixes, in the same spirit as #9 (
Optional[list]forapp_launcharguments).1.
get_current_config(platform)rejects an explicitnull(appium-mcp-server)platform: str = Nonemakes FastMCP advertise{"type": "string", "default": null}. Clients that send the advertised default explicitly get a validation error, and the tool never runs. Reproduced with the same signature on mcp 1.25 (inside themcp>=1.23.0,<2pin):Fix:
platform: Optional[str] = None. Behaviour for omitted or real values is unchanged.2.
app_screenshotprints to stdout (pywinauto-mcp-server)With
--transport stdio, stdout is the JSON-RPC stream, and the spec says a server must not write non-MCP output there. A client reading it getsInvalid JSON: expected value at line 1 column 1for each line. The success message now goes throughlogger.info. The error path already callslogger.errorwith the same message, so I removed the duplicateprint. Both loggers use the defaultStreamHandler(), which writes to stderr.Checked
python -m py_compilepasses on both files.