Skip to content

feat(drive,mcp): add drive_sheets_info/drive_sheets_read MCP tools - #1619

Open
newhoggy wants to merge 1 commit into
mainfrom
issue-1614-sheets-mcp
Open

newhoggy wants to merge 1 commit into
mainfrom
issue-1614-sheets-mcp

Conversation

@newhoggy

@newhoggy newhoggy commented Sep 6, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Adds drive_sheets_info and drive_sheets_read MCP tools to src/mcp/drive_tools.rs, closing feat(mcp): expose the drive sheets surface as MCP tools #1614's suggested first pass — mirrors drive_file_read's shape and delegates to the same engine functions the CLI's drive sheets info/read already use (SheetsApi::get_spreadsheet, sheets::read::read), returning YAML.
  • Both tools are read-only: like the rest of the Drive read surface they consult no permission gate and write no request-log record (ADR-0071 §11, ADR-0073 §5) — an existing, deliberate gap, not something new here.
  • Write verbs (write/append/clear) remain deferred, per the issue's own scoping (dry-run equivalent and RefusedNoVisibleParents surfacing still need their own design).
  • Adds the reverse (mirrors the \drive_sheets_info`/`drive_sheets_read` MCP tool)cross-reference to the CLI'ssheets info/readsubcommand help (STYLE-0029), and updatesdocs/mcp.md+CHANGELOG.md` accordingly.

Test plan

  • cargo test (default features, all 9 test binaries) — 8,732 tests pass
  • cargo test --features mcp --test mcp_integration_test — 44 tests pass
  • cargo clippy --all-features --all-targets -- -D warnings — clean
  • cargo fmt --check — clean
  • update-snapshots skill run; insta snapshot diff reviewed and accepted (only the two new CLI help cross-references changed)
  • Note: daemon_test.rs's two SIGHUP/shutdown lifecycle tests failed in the full local run — this is a known, pre-existing load-sensitive flake unrelated to this change (no daemon code touched)

Refs #1589, ADR-0073 §12

#1589 shipped `drive sheets` CLI-first with MCP tools deferred per
ADR-0073 §12. Adds the read-only half of that surface, mirroring
`drive_file_read`'s shape: both tools delegate to the same engine
functions the CLI uses and return YAML. The write verbs (write/
append/clear) stay deferred pending their own dry-run-equivalent and
refusal-surfacing design.
@github-actions

github-actions Bot commented Sep 6, 2026

Copy link
Copy Markdown

Coverage

Total: 97.08% ⚪ 0 pp vs main

Comparing d69d441..2c51bc2 (merge-base → PR head)

File Before After Δ
src/mcp/drive_tools.rs 98.32% 97.7% 🔴 -0.63 pp

Patch coverage

Patch: 95.9% (257/268 new lines covered)

File Patch Uncovered new lines
src/mcp/drive_tools.rs 95.86% (255/266) 304-307, 311-313, 327-330
src/mcp/server.rs 100% (2/2)
Uncovered new lines (11)
  • src/mcp/drive_tools.rs:304
  • src/mcp/drive_tools.rs:305
  • src/mcp/drive_tools.rs:306
  • src/mcp/drive_tools.rs:307
  • src/mcp/drive_tools.rs:311
  • src/mcp/drive_tools.rs:312
  • src/mcp/drive_tools.rs:313
  • src/mcp/drive_tools.rs:327
  • src/mcp/drive_tools.rs:328
  • src/mcp/drive_tools.rs:329
  • src/mcp/drive_tools.rs:330

📦 Full per-file coverage summary · run summary

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