Skip to content

Show agent-debug-log in MCP resources list#10

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

Show agent-debug-log in MCP resources list#10
maatheusgois-dd merged 1 commit into
mainfrom
maatheusgois-dd/show-agent-debug-log-resource

Conversation

@maatheusgois-dd

Copy link
Copy Markdown
Contributor

Summary

  • Re-add agent-debug-log to resources/list so it appears in Cursor's MCP panel (Cursor does not render resources/templates/list entries).
  • Discover .cursor/debug-*.log files under the workspace and cwd; list each with a fully qualified ?path= URI.
  • When no logs exist yet, list a placeholder entry; auto-read of the bare URI returns help JSON instead of -32000.
  • Keeps resources/templates/list for parameterized access.

Follow-up to #9 — fixes the missing resource in the MCP UI without reintroducing the auto-read error.

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 (src/mcp/server.test.ts, src/core/agent-debug-log.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

Notes For Reviewers

After merge: restart XcodeBazelMCP MCP server. You should see Agent debug NDJSON log alongside Last command / Session status. No error toast on connect.

Made with Cursor

@maatheusgois-dd maatheusgois-dd self-assigned this Jun 3, 2026
Cursor only renders resources/list, not templates. Re-list agent-debug-log
there (discovered .cursor/debug-*.log files or a safe placeholder) and return
help JSON instead of -32000 when the bare URI is auto-read.

Co-authored-by: Cursor <cursoragent@cursor.com>
@codecov

codecov Bot commented Jun 3, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 54.79452% with 33 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
src/mcp/server.ts 0.00% 21 Missing ⚠️
src/core/agent-debug-log.ts 76.92% 11 Missing and 1 partial ⚠️

📢 Thoughts on this report? Let us know!

@maatheusgois-dd
maatheusgois-dd force-pushed the maatheusgois-dd/show-agent-debug-log-resource branch from 7913963 to 00d7405 Compare June 3, 2026 17:24
@maatheusgois-dd
maatheusgois-dd marked this pull request as ready for review June 3, 2026 17:25
@maatheusgois-dd
maatheusgois-dd merged commit ddab837 into main Jun 3, 2026
7 checks passed
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