Report a missing grant as a missing grant - #150
Merged
davidmckayv merged 1 commit intoAug 22, 2026
Conversation
Asked what was in a PRD it had just found in Drive, a Bot opened docs.google.com in its own container, met Google's sign-in page and asked the person to take the wheel and sign in. Only search_files was granted. read_file_content was not. The Bot could find the document and had no way to read it, and rather than say so it fell back to the browser, so a gap in what it holds surfaced as an authentication problem somewhere else entirely. The person already had access. What was missing was the Bot's, not theirs, and nothing on screen said that. The guidance a Bot gets about its grants already told it not to browse to a vendor it holds tools for. It now also says what to do when it holds some of a vendor's tools and not the one it needs: say so plainly, name the capability, and say an administrator can grant it on that connector. Not the browser, not a sign-in request, and not asking the person to fetch it, which is the same mistake wearing a hat. Closes #141.
davidmckayv
requested review from
MikeRyanDev,
guidovizoso and
tylerslaton
as code owners
August 22, 2026 04:23
davidmckayv
deleted the
fix/a-missing-grant-is-reported-as-a-missing-grant
branch
August 22, 2026 04:24
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.
Closes #141.
What happened
A person asked what was in a PRD the Bot had just found in their Drive. Instead of reading it, the Bot opened
docs.google.comin its own container, hit Google's sign-in page, and asked them to take the wheel and sign in.Only
search_fileswas granted.read_file_contentwas not. So the Bot could find the document and had no way to read it — and rather than say that, it fell back to the browser, and a gap in what it holds surfaced as an authentication problem somewhere else entirely.The person already had access. What was missing was the Bot's, not theirs, and nothing on screen said so. Their reaction was the correct one: "this is wrong, it should tell me what's in the PRD, not sign me in".
The fix
The guidance a Bot gets about its grants already told it not to browse to a vendor it holds tools for — that was the other half of this issue, fixed earlier. It now also covers the case where it holds some of a vendor's tools and not the one it needs:
The last clause is there because "could you paste it in for me" is the same mistake wearing a hat.
Driven in Chrome, on the real repro
Revoked
read_file_contentfrom Risk Analyst on/admin/plugins/google-drive, leavingsearch_filesandget_file_metadata— the exact state from the issue. Then asked, through the@picker:It called
search_filesandget_file_metadata(visible as tool pills), found the document, reported its title, type, modified time, owner, size and link, noted the two earlier copies, and then:No browser. No sign-in wall. No asking the person to fetch it. It named what it would need and where it would be granted.
It says "read document contents" rather than
read_file_contentbecause the tool is not in its list at all — it can only describe the capability, not name a tool it was never told about. That is the honest version, and it still points at the screen that fixes it.The grant was restored afterwards.
Tests
One added to the existing
what a Bot is told it holdssuite, asserting the guidance names a gap as a grant to ask for, names the capability, says an administrator can grant it, and does not send the person to a sign-in box. Whitespace-normalised, because the guidance is assembled line by line and a sentence spans a newline wherever the source happened to wrap.