feat(tools): add Google Discovery API URLs to WASM tool descriptions (#585)

Add Google Discovery Service URLs to all 6 Google WASM tool
descriptions so the LLM can fetch full API documentation on demand
using its built-in HTTP tool. Discovery API is public and requires
no authentication.

URLs added:
- Gmail: googleapis.com/discovery/v1/apis/gmail/v1/rest
- Calendar: calendar-json.googleapis.com/$discovery/rest?version=v3
- Drive: googleapis.com/discovery/v1/apis/drive/v3/rest
- Docs: googleapis.com/discovery/v1/apis/docs/v1/rest
- Sheets: googleapis.com/discovery/v1/apis/sheets/v4/rest
- Slides: googleapis.com/discovery/v1/apis/slides/v1/rest

[skip-regression-check]

Co-authored-by: Claude Opus 4.6 (1M context) <[email protected]>
This commit is contained in:
Henry Park
2026-03-05 19:20:29 -08:00
committed by GitHub
co-authored by Claude Opus 4.6
parent 46218ec794
commit 2d332f12f0
6 changed files with 18 additions and 6 deletions
+3 -1
View File
@@ -110,7 +110,9 @@ impl exports::near::agent::tool::Guest for GmailTool {
fn description() -> String {
"Gmail integration for reading, searching, sending, drafting, and replying to emails. \
Supports Gmail search query syntax (is:unread, from:, subject:, after:, etc.). \
Requires a Google OAuth token with gmail.modify and gmail.compose scopes."
Requires a Google OAuth token with gmail.modify and gmail.compose scopes. \
To discover all available API operations, use http GET to fetch \
<https://www.googleapis.com/discovery/v1/apis/gmail/v1/rest> (public, no auth needed)."
.to_string()
}
}
+3 -1
View File
@@ -129,7 +129,9 @@ impl exports::near::agent::tool::Guest for GoogleCalendarTool {
fn description() -> String {
"Google Calendar integration for viewing, creating, updating, and deleting calendar \
events. Requires a Google Calendar OAuth token with the calendar.events scope. \
Supports timed events, all-day events, attendees, locations, and free text search."
Supports timed events, all-day events, attendees, locations, and free text search. \
To discover all available API operations, use http GET to fetch \
<https://www.googleapis.com/discovery/v1/apis/calendar/v3/rest> (public, no auth needed)."
.to_string()
}
}
+3 -1
View File
@@ -199,7 +199,9 @@ impl exports::near::agent::tool::Guest for GoogleDocsTool {
bulleted/numbered lists. Also provides a batch_update action for complex multi-step \
edits executed atomically. Document IDs are the same as Google Drive file IDs, so use \
the google-drive tool to search for existing documents. Requires a Google OAuth token \
with the documents scope."
with the documents scope. \
To discover all available API operations, use http GET to fetch \
<https://www.googleapis.com/discovery/v1/apis/docs/v1/rest> (public, no auth needed)."
.to_string()
}
}
+3 -1
View File
@@ -160,7 +160,9 @@ impl exports::near::agent::tool::Guest for GoogleDriveTool {
files and folders. Supports personal drives and shared (organizational) drives via the \
corpora parameter. Can search with Drive query syntax, download text files, upload new \
files, manage folder structure, and control sharing permissions. Requires a Google OAuth \
token with the drive scope."
token with the drive scope. \
To discover all available API operations, use http GET to fetch \
<https://www.googleapis.com/discovery/v1/apis/drive/v3/rest> (public, no auth needed)."
.to_string()
}
}
+3 -1
View File
@@ -174,7 +174,9 @@ impl exports::near::agent::tool::Guest for GoogleSheetsTool {
(tab) management (add, delete, rename), and cell formatting (bold, colors, alignment, \
number formats). Spreadsheet IDs are the same as Google Drive file IDs, so use the \
google-drive tool to search for existing spreadsheets. Requires a Google OAuth token \
with the spreadsheets scope."
with the spreadsheets scope. \
To discover all available API operations, use http GET to fetch \
<https://www.googleapis.com/discovery/v1/apis/sheets/v4/rest> (public, no auth needed)."
.to_string()
}
}
+3 -1
View File
@@ -209,7 +209,9 @@ impl exports::near::agent::tool::Guest for GoogleSlidesTool {
Also provides a batch_update action for complex multi-step edits executed atomically. \
Positions and sizes use points (standard slide is 720x405 pt). Presentation IDs are the \
same as Google Drive file IDs, so use the google-drive tool to search for existing \
presentations. Requires a Google OAuth token with the presentations scope."
presentations. Requires a Google OAuth token with the presentations scope. \
To discover all available API operations, use http GET to fetch \
<https://www.googleapis.com/discovery/v1/apis/slides/v1/rest> (public, no auth needed)."
.to_string()
}
}