Skip to content

Fix agent-debug-log MCP resource auto-read error#9

Merged
maatheusgois-dd merged 1 commit into
mainfrom
maatheusgois-dd/fix-agent-debug-log-resource
Jun 3, 2026
Merged

Fix agent-debug-log MCP resource auto-read error#9
maatheusgois-dd merged 1 commit into
mainfrom
maatheusgois-dd/fix-agent-debug-log-resource

Conversation

@maatheusgois-dd

Copy link
Copy Markdown
Contributor

Summary

  • Move agent-debug-log from resources/list to resources/templates/list with uriTemplate: xcodebazel://agent-debug-log?path={path}.
  • Fixes Cursor (and other MCP clients) auto-reading the bare xcodebazel://agent-debug-log URI and hitting -32000: agent-debug-log resource requires ?path=<absolute-log-path> query parameter.
  • resources/read with a full ?path= URI still works unchanged.

Scope

  • MCP server/tools
  • CLI commands or parsers
  • Bazel build/test/discovery
  • Simulator workflows
  • Physical device workflows
  • UI automation, screenshots, video, logs, or deep links
  • LLDB debugging
  • macOS, tvOS, watchOS, or visionOS workflows
  • Swift Package Manager
  • Daemon, session defaults, config, doctor, or setup
  • Project scaffolding
  • Docs, examples, or agent skills
  • CI, release, packaging, or dependencies

Validation

  • npm run lint
  • npm run typecheck
  • npm test (includes new resources/templates/list and parameterized resources/read cases in src/mcp/server.test.ts)
  • npm run build
  • npx vitest --run --coverage
  • Manual MCP validation with Cursor or another MCP client
  • Manual CLI validation with xcodebazelmcp ...
  • Bazel workspace validation against a real Apple target
  • Simulator validation
  • Physical device validation

Compatibility

  • Adds, removes, or renames MCP tools
  • Changes CLI flags, command output, exit codes, or streaming behavior
  • Changes config files, environment variables, defaults, or profiles
  • Changes generated project scaffolding
  • Changes package contents, dependencies, Node support, or release behavior
  • Requires updates to docs, README, manifests, schemas, or skills
  • No compatibility impact

agent-debug-log is no longer returned by resources/list; clients that need it should use resources/templates/list or read with an explicit ?path= query. The bazel_ios_agent_debug_log_read tool is unchanged.

Notes For Reviewers

Root cause: agent-debug-log was advertised as a static resource but requires a path query param. Cursor prefetches listed resources on connect, triggering the error toast.

After merge, restart the MCP server in Cursor to pick up the change.

Made with Cursor

Move the parameterized agent-debug-log URI from resources/list to
resources/templates/list so clients no longer prefetch a bare URI that
requires ?path= and throw -32000.

Co-authored-by: Cursor <cursoragent@cursor.com>
@maatheusgois-dd maatheusgois-dd self-assigned this Jun 3, 2026
@maatheusgois-dd
maatheusgois-dd marked this pull request as ready for review June 3, 2026 17:20
@maatheusgois-dd
maatheusgois-dd merged commit 6c50891 into main Jun 3, 2026
5 checks passed
@codecov

codecov Bot commented Jun 3, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 0% with 8 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
src/mcp/server.ts 0.00% 8 Missing ⚠️

📢 Thoughts on this report? Let us know!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant