list_file_activity
Fetch a chronological activity timeline for a Google Drive file, including edits, permission changes, comments, and other events to audit or track file changes.
Instructions
Return the activity timeline for a Google Drive file.
Uses the Drive Activity API (driveactivity/v2) to fetch a chronological list of edits, permission changes, comments, and other events for the given file.
Each activity entry reports:
timestamp: ISO 8601 UTC time of the activity
action: type of action (edit, create, move, rename, delete, restore, permission_change, comment, settings_change, system_event, …)
actors: list of who performed the action; each actor has a type field ("user", "system", "administrator", "anonymous") plus a person_name for known users (a People API resource name, not an email address)
Args: file_id: Google Drive file ID to query. page_size: Maximum number of activities to return (1-100, default 50). page_token: Continuation token from a previous response for pagination.
Returns: Dictionary with: - file_id: echoed back for reference - activities: list of activity entries (timestamp, action, actors) - next_page_token: present when more results are available Raises ValueError if the response exceeds a safety cap (see MAX_TOOL_RESPONSE_CHARS in docs/configuration.md for the configured default) — lower page_size and paginate via next_page_token instead of raising the cap; a single activity's actors list can be large on files with many collaborators.
Note: The Drive Activity API requires the drive.activity.readonly OAuth scope. Service accounts must be granted file access to see its activity. person_name values (e.g. "people/123456") are opaque identifiers; the People API is required to resolve them to display names or email addresses.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"file_id": "<file_id>"
},
"name": "list_file_activity"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| file_id | Yes | ||
| page_size | No | ||
| page_token | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||