fix(xcode-ide): add bridge proxy diagnostics and default schema handling#310
fix(xcode-ide): add bridge proxy diagnostics and default schema handling#310dpearson2699 wants to merge 4 commits intogetsentry:mainfrom
Conversation
Add debug logging to xcode-tools-bridge proxy tool calls so the exact arguments and responses can be inspected when diagnosing bridge-related issues like XcodeGlob returning paths rejected by XcodeRead/RenderPreview. Handle the JSON Schema `default` keyword in jsonSchemaToZod so remote tool schema defaults are preserved through the proxy, preventing potential argument loss. Add integration test verifying argument passthrough integrity through the full proxy pipeline (paths with spaces, unicode, extra properties). Closes getsentry#252 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 2199455. Configure here.
|
@cameroncooke can you merge this in? |
|
@dpearson2699 sorry for the delay on this, there is a code freeze on merging contributor PRs at the moment while I finish a very large refactor. I hope to finish my refactor by the end of this week and get this PR in shortly after, I've got a bit of a backlog to address sorry about that. |
commit: |
|
Tried to reproduce #252 on Xcode 26.4 against While verifying the PR's stated fix mechanism, also noticed: none of the 20 currently-emitted bridge tools have JSON Schema |

Summary
Fixes #252
After
xcode-idebridge sync succeeds, paths returned byXcodeGlobare rejected byXcodeReadandRenderPreviewwith "File not found in project structure". Investigation revealed:xcrun mcpbridge. The "File not found" error originates from Apple's remote server, not this codebase.jsonSchemaToZodconverter was silently dropping JSON Schemadefaultvalues, meaning Zod validation could reject or alter arguments the remote server expects.Changes
Bridge proxy diagnostics (registry.ts, tool-service.ts)
registry.ts: Logs tool name and argument keys when the proxy handler is invokedtool-service.ts: Logs call initiation, result summary (content type count), and errors ininvokeTool()logutility atdebuglevel -- zero overhead when debug logging is disabledJSON Schema
defaultvalue handling (jsonschema-to-zod.ts)defaultto theJsonSchematype definitionapplyDefault()helper that chains.default(value)onto any Zod typeIntegration test for argument passthrough (registry.integration.test.ts)
Echotool to the fake MCP server fixture that JSON-echoes received argumentsTesting
Automated
Manual verification (iOS template project)
XcodeBuildMCP-iOS-Templateand openedMyProject.xcodeprojin Xcodexcode-ide call-tool --remote-tool XcodeGlobreturned Swift file paths successfullyxcode-ide call-tool --remote-tool XcodeReadread files using paths returned by XcodeGlob -- no "File not found" errornpm run inspect): server initialized successfullyinspect list-tools: 29 tools registered with xcode-ide workflow enabled, 20 bridge-proxied tools visibleinspect call-tool xcode_ide_list_tools: bridge tools returned correctly through MCP proxy pathXCODEBUILDMCP_DEBUG=trueconfirmed active in.vscode/mcp.jsondev server config