Conversation
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
Fixes #262
When using
rustwright-mcpwith Google Gemini models via Vertex AI (such as in OpenCode via@ai-sdk/google-vertex), Vertex AI enforces strict validation on OpenAPI 3.03 / JSON Schema tool definitions.Specifically:
browser_file_upload.pathspreviously defined"type": ["array", "null"]. When translated to Gemini's schema format,type: ["array", "null"], it became ananyOfunion withitemsremaining as a sibling field.itemsalongsideany_ofcaused Vertex AI to reject requests with HTTP 400 (Unable to submit request because rustwright_browser_file_upload functionDeclaration parameters.paths schema specified other fields alongside any_of).browser_network_request.partdefined"type": ["string", "null"].browser_drag(startElement,endElement),browser_console_messages(filename),browser_network_requests(filter,filename), andbrowser_handle_dialog(promptText) also used"type": ["string", "null"].Changes
mcp/src/tools.rsto single types ("type": "array","type": "string") omitted from"required", aligning with upstream Playwright MCP standards (@modelcontextprotocol/server-playwright).nullfrombrowser_network_request.part'senumlist.mcp/src/tools.rsandmcp/tests/stdio_e2e.rs.mcp/tests/fixtures/tools-list.json,tools-list-lean.json,tools-list-legacy.json) and SHA-256 fixture checksum inmcp/tests/fixtures/README.md.Verification
cargo check --lockedcargo check --manifest-path mcp/Cargo.toml --lockedcargo test --manifest-path mcp/Cargo.toml --bin rustwright-mcp(all 43 tests pass, including catalog fixture match)cargo test --lib(all 397 unit tests pass)