-
Notifications
You must be signed in to change notification settings - Fork 5.5k
Description
Is there a specific app this action is for?
Google Drive
https://github.com/PipedreamHQ/pipedream/tree/4fb872ca63b3c22bfa41bb048dcd0bbb6aecafd8/components/google_drive
Please provide a link to the relevant API docs for the specific service / operation.
Google Drive MCP Server Extension: Comment Tools
1. gdrive_add_comment
- What it does: Adds an unanchored comment to a Google Doc (general feedback, no text highlighting).
- Endpoint and Method:
POST https://www.googleapis.com/drive/v3/files/{file_id}/comments
- Input:
{ "file_id": "string (Google Drive file ID)", "content": "string (comment text)" }
- Output/Response: JSON object with comment details (e.g.,
{ "id": "string", "content": "string", "createdTime": "RFC3339 timestamp" }
).
2. gdrive_list_comments
- What it does: Lists all comments on a file, including content, author, and resolved status.
- Endpoint and Method:
GET https://www.googleapis.com/drive/v3/files/{file_id}/comments
- Input:
{ "file_id": "string (Google Drive file ID)" }
- Output/Response: JSON object with array of comments (e.g.,
{ "comments": [ { "id": "string", "content": "string", "resolved": boolean, "replies": array } ] }
).
3. gdrive_reply_to_comment
- What it does: Adds a reply to an existing comment (inherits parent's anchoring; unanchored if parent is).
- Endpoint and Method:
POST https://www.googleapis.com/drive/v3/files/{file_id}/comments/{comment_id}/replies
- Input:
{ "file_id": "string (Google Drive file ID)", "comment_id": "string (existing comment ID)", "content": "string (reply text)" }
- Output/Response: JSON object with reply details (e.g.,
{ "id": "string", "content": "string", "createdTime": "RFC3339 timestamp" }
).
4. gdrive_resolve_comment
- What it does: Marks a comment as resolved (updates status; can be used for other patches like editing content).
- Endpoint and Method:
PATCH https://www.googleapis.com/drive/v3/files/{file_id}/comments/{comment_id}
- Input:
{ "file_id": "string (Google Drive file ID)", "comment_id": "string (comment ID)" }
- Output/Response: JSON object with updated comment (e.g.,
{ "id": "string", "resolved": true }
).
5. gdrive_delete_comment
- What it does: Deletes a specific comment (permanent; requires ownership or permissions).
- Endpoint and Method:
DELETE https://www.googleapis.com/drive/v3/files/{file_id}/comments/{comment_id}
- Input:
{ "file_id": "string (Google Drive file ID)", "comment_id": "string (comment ID)" }
- Output/Response: Empty response (HTTP 204 No Content on success).
🛠️ Getting Started
Follow the repo's setup for auth and installation. Implement tools in server code (e.g., dist/index.js
) using googleapis
library for API calls.
🔧 Usage
Example Usage
-
Add comment:
const result = await gdrive_add_comment({ file_id: "your-file-id", content: "General feedback" });
-
List comments:
const comments = await gdrive_list_comments({ file_id: "your-file-id" });
Adapt per repo's integration with desktop app config[1][2].
Sources
[1] Google Drive API - Google for Developers https://developers.google.com/workspace/drive/api/reference/rest/v3
[2] REST Resource: comments | Google Drive https://developers.google.com/workspace/drive/api/reference/rest/v3/comments
[3] Will using Drive v3 allow me to insert anchored comments on pdf files? https://stackoverflow.com/questions/70319140/will-using-drive-v3-allow-me-to-insert-anchored-comments-on-pdf-files
[4] Google Drive API v3 - UserInfo endpoint url - Stack Overflow https://stackoverflow.com/questions/46584289/google-drive-api-v3-userinfo-endpoint-url
[5] drive package - google.golang.org/api/drive/v3 - Go Packages https://pkg.go.dev/google.golang.org/api/drive/v3
[6] drive_v3 - Rust - Docs.rs https://docs.rs/drive-v3
[7] Extracting user comments from Google Documents via API https://community.latenode.com/t/extracting-user-comments-from-google-documents-via-api/35019
[8] List Drive endpoints — drive_endpoints - googledrive https://googledrive.tidyverse.org/reference/drive_endpoints.html
[9] Package google.api | Cloud Endpoints with gRPC https://cloud.google.com/endpoints/docs/grpc-service-config/reference/rpc/google.api
[10] Package google.api | Service Infrastructure https://cloud.google.com/service-infrastructure/docs/service-management/reference/rpc/google.api
Metadata
Metadata
Assignees
Labels
Type
Projects
Status