fix(docs): include document title in getText and getSuggestions#309
Merged
Conversation
…nses
docs.getText and docs.getSuggestions were not returning the document
title, unlike slides.getText and sheets.getText which already did.
- getText: prepends "Document Title: ..." for single-tab plain text,
wraps multi-tab JSON in { title, tabs } object
- getSuggestions: returns { title, suggestions } instead of bare array
Contributor
There was a problem hiding this comment.
Code Review
This pull request updates the DocsService to include the document title in the output of various methods, including those for retrieving text and suggestions. The changes involve updating the Google Docs API field masks to fetch the title and restructuring the JSON response to include it. Test files have been updated to accommodate the new response structure. The review feedback suggests adding explicit assertions in the tests to verify that the title field is correctly populated, ensuring the primary goal of the PR is fully validated.
Add mock title data and explicit assertions verifying the document title is present in responses, not just the tab/suggestion content.
Sum1cares
approved these changes
May 24, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
docs.getTextanddocs.getSuggestionswere the only read tools that didn't return the document title —slides.getText,sheets.getText, andgmail.getall already didgetText: PrependsDocument Title: ...for single-tab plain text responses; wraps multi-tab JSON in a{ title, tabs }objectgetSuggestions: Returns{ title, suggestions }instead of a bare arrayTest plan