Skip to main content
Glama

list_file_activity

Read-only

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

NameRequiredDescriptionDefault
file_idYes
page_sizeNo
page_tokenNo

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.9.6

TDQS

A4.5/5.0
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Goes well beyond the readOnlyHint annotation: discloses the required drive.activity.readonly OAuth scope, that service accounts must be explicitly granted file access, and that oversized responses raise ValueError against MAX_TOOL_RESPONSE_CHARS. It also warns that a single activity's actors list can be large on heavily shared files, which is exactly the kind of failure-mode context an agent needs.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Front-loaded with a one-line purpose, then cleanly sectioned into Args/Returns/Note so scanning is easy. The Returns block partly duplicates the output schema that already exists, making the definition longer than strictly necessary, but the remaining text is dense and earns its place.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given a read-only, paginated tool with three parameters, the definition covers auth requirements, service-account caveats, pagination mechanics, and the response-size failure mode. Nothing an agent needs to invoke it correctly is missing.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, so the description carries the full burden and does so: it documents all three parameters, including the 1-100 bounds and default for page_size and the meaning/origin of page_token. It also explains that actor person_name is an opaque People API resource name, not an email.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb and resource ("Return the activity timeline for a Google Drive file") and names the backing API (driveactivity/v2), plus enumerates the event types returned (edits, permission changes, comments). This is clearly distinguishable from siblings like list_revisions or get_file_metadata.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Usage is implied by the resource scope rather than stated: an agent can infer this is the audit/activity feed for one file, but no sibling is named as an alternative and no when-not-to-use condition is given. The only explicit guidance is the pagination advice in the error note, which is a usage rule but reactive rather than selective.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Deploy Server

Other Tools