Skip to content

Conversation

@michaelneale
Copy link
Collaborator

@michaelneale michaelneale commented Mar 10, 2025

fixes: #1609

Does add a sheets lib (similar to the one there for drive) - not really noticeable additional size.

Testing it (manual as requires google docs setup with oauth):
Screenshot 2025-03-11 at 12 27 39 pm

Screenshot 2025-03-11 at 12 27 59 pm

@michaelneale michaelneale marked this pull request as ready for review March 11, 2025 01:41
@michaelneale michaelneale changed the title WIP: google sheets support (in google drive builtin MCP server) feat: google sheets support (in google drive builtin MCP server) Mar 11, 2025
* main:
  feat: enable smart approve for user by default (#1599)
  ui: fix modal state (#1598)
  ui: setting configuration (#1597)
  fix: merge error logging in goose bench  (#1545)
  feat: add additional goosebench evals (#1571)
  chore: update types and imports (#1594)
  Retain session through view changes (#1580)
  docs: Add steps for desktop tutorial (#1590)
  remove env vars from bottom menu model setting (#1584)
  Fix Goosehints modal UI (#1581)
  docs: typo fix (#1593)
  feat: update config endpoints for use with providers (#1563)
  fix: update anthropic provider headers (#1592)
  feat: Build Goose in a Docker Container (#1551)
  docs: voyp blog post (#1588)
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PR Overview

This PR adds support for handling Google Sheets to the Google Drive MCP server by integrating the google-sheets4 library and implementing a new sheets_tool with operations for listing sheets, extracting column headers, and retrieving data ranges.

  • Introduces a new sheets field in the router that uses the google-sheets4 API.
  • Adds a new tool ("sheets_tool") and related asynchronous functions to handle sheets operations.
  • Updates documentation/instructions and Cargo.toml to include the new dependency.

Reviewed Changes

File Description
crates/goose-mcp/src/google_drive/mod.rs Added support for Google Sheets through new functions and updated tool instructions.
crates/goose-mcp/Cargo.toml Added the google-sheets4 dependency.

Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.

Comments suppressed due to low confidence (2)

crates/goose-mcp/src/google_drive/mod.rs:622

  • The default range value '1:1' in the get_columns operation might be ambiguous if no sheetName is provided. Consider either requiring an explicit sheet name or using a more explicit default (e.g., 'Sheet1!1:1') to avoid retrieving unintended data.
                .and_then(|q| q.as_str()).map(|s| format!("{}!1:1", s)).unwrap_or_else(|| "1:1".to_string()); // Default to first row of first sheet

crates/goose-mcp/src/google_drive/mod.rs:693

  • [nitpick] In the get_values operation, using unwrap_or_default() when converting cell values may silently drop non-string data. Consider adding explicit handling for non-string cell values to ensure robust CSV generation.
                                    .map(|cell| cell.as_str().unwrap_or_default().to_string())

Copy link
Contributor

@kalvinnchau kalvinnchau left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice!

* origin:
  docs: Persistent Command History (#1627)
  change to make build work on windows, macos, linux (#1618)
  chore(release): release version 1.0.13 (#1623)
  fix: handle mac screenshots with the image tool (#1622)
  feat: write eval results to eval dir (#1620)
  [fix] fix model config logging to remove api key (#1619)
  fix: ensure repeating benches return to initial run-dir (#1617)
@kalvinnchau kalvinnchau merged commit bdb90a5 into main Mar 12, 2025
6 checks passed
@kalvinnchau kalvinnchau deleted the micn/google-sheets branch March 12, 2025 15:59
sheagcraig added a commit to sheagcraig/goose that referenced this pull request Mar 12, 2025
* upstream/main:
  feat(google_drive): move credentials into keychain, add optional fallback (block#1603)
  feat: add session list command in cli (block#1586)
  feat: google sheets support (in google drive builtin MCP server) (block#1601)
  fix: deep link opening when window is closed (block#1633)
  docs: edits to docker guide (block#1639)
  feat: ollama tool shim (block#1448)
  feat: add write approve mode (block#1628)
  ui: auto update card upon config (block#1610)
  fix: fix tool output expansion checks (block#1634)
  fix: remove conditional that breaks output display for tool calls (block#1631)
  docs: Persistent Command History (block#1627)
  change to make build work on windows, macos, linux (block#1618)
  chore(release): release version 1.0.13 (block#1623)
  fix: handle mac screenshots with the image tool (block#1622)
  feat: write eval results to eval dir (block#1620)
  [fix] fix model config logging to remove api key (block#1619)
  fix: ensure repeating benches return to initial run-dir (block#1617)
cbruyndoncx pushed a commit to cbruyndoncx/goose that referenced this pull request Jul 20, 2025
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.

google sheets support

3 participants