Skip to main content
Glama

drive.files.listLabels

Lists the labels attached to a Google Drive file by file ID, with pagination support to retrieve all labels.

Instructions

Lists the labels on a file. For more information, see List labels on a file [HTTP GET]. Returns the requested resource as JSON — request bodies are built from the typed parameters (typed flags win over the params map), or read whole from body_file Siblings over the same resource: copy, create, delete, download, emptyTrash, export, generateCseToken, generateIds, get, list, modifyLabels, update, watch.

Input Schema

NameRequiredDescriptionDefault
queryNoExtra KEY=VALUE query pairs for endpoints whose parameters Discovery does not describe.
fileIdYes[URL path segment] The ID for the file.
paramsNoParameter map merged into the request; typed parameters win.
dry_runNoReturn the request that would be sent, without sending it.
body_fileNoRead the request body from this file ('-' for stdin) instead of building one from the parameters.
pageTokenNo[query parameter] The token for continuing a previous list request on the next page. This should be set to the value of `nextPageToken` from the previous response.
maxResultsNo[query parameter] The maximum number of labels to return per page. When not set, defaults to 100.100

Output Schema

NameRequiredDescriptionDefault
kindNo
labelsNo
nextPageTokenNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed8 schema fields changed
    • changedInput schema / properties / fileId / description
      Previous value: -"The ID for the file."New value: +"[URL path segment] The ID for the file."
    • addedInput schema / properties / maxResults / default
      Added value: +"100"
    • changedInput schema / properties / maxResults / description
      Previous value: -"The maximum number of labels to return per page. When not set, defaults to 100."New value: +"[query parameter] The maximum number of labels to return per page. When not set, defaults to 100."
    • addedInput schema / properties / maxResults / format
      Added value: +"int32"
    • addedInput schema / properties / maxResults / maximum
      Added value: +100
    • addedInput schema / properties / maxResults / minimum
      Added value: +1
    • changedInput schema / properties / pageToken / description
      Previous value: -"The token for continuing a previous list request on the next page. This should be set to the value of `nextPageToken` from the previous response."New value: +"[query parameter] The token for continuing a previous list request on the next page. This should be set to the value of `nextPageToken` from the previous response."
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "properties": {
      +    "kind": {
      +      "type": "string"
      +    },
      +    "labels": {
      +      "items": {
      +        "properties": {
      +          "fields": {
      +            "type": "object"
      +          },
      +          "id": {
      +            "type": "string"
      +          },
      +          "kind": {
      +            "type": "string"
      +          },
      +          "revisionId": {
      +            "type": "string"
      +          }
      +        },
      +        "type": "object"
      +      },
      +      "type": "array"
      +    },
      +    "nextPageToken": {
      +      "type": "string"
      +    }
      +  },
      +  "type": "object"
      +}
  2. First observed

TDQS

B3.1/5.0
Behavior3/5

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

With no annotations, the description must carry the behavioral burden; it does disclose the HTTP method (GET, implying read-only) and that the resource returns as JSON. However, it says nothing about authorization requirements, whether pagination must be followed via nextPageToken, or error behavior — and the body/`params` boilerplate is generic wrapper text irrelevant to a GET.

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

Conciseness3/5

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

The purpose is correctly front-loaded in the first sentence, but it is followed by a documentation link, an HTTP-method tag, a block about building request bodies that cannot apply to a GET, and a long comma-separated sibling list. Roughly half the text does not earn its place for this tool.

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

Completeness3/5

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

An output schema exists, so return shape needn't be explained, and pagination parameters are covered in the schema. For a 7-parameter list tool with zero annotations, though, the description is silent on the auth/permission context and on how to iterate pages, leaving gaps the agent must infer.

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

Parameters3/5

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

Schema coverage is 100%, so the schema already documents fileId, pageToken, and maxResults thoroughly; the description adds no endpoint-specific parameter meaning. The only extra is the meta-explanation that typed flags win over the `params` map and that `body_file` can supply a whole body, which is generic and not useful for this read-only list call.

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

Purpose4/5

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

The opening sentence gives a specific verb and resource: 'Lists the labels on a file,' which is clearly distinct from sibling modifyLabels. The trailing sibling enumeration is a raw dump rather than differentiation, so it doesn't lift the score further.

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

Usage Guidelines2/5

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

No statement of when to use this versus alternatives (e.g., use get for file metadata, modifyLabels to change labels) and no prerequisites such as required scopes or a permissions model. The sibling list merely names other tools without linking any of them to a selection condition.

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