Skip to main content
Glama

getFilePath

Returns the full root-to-file folder path for a Google Drive file by walking its parent chain, showing exactly where the item is stored.

Instructions

Returns the full folder path of a Drive file from root to the file itself (e.g. "My Drive/Projects/Docs/report.pdf"). Walks up the parent chain to reconstruct the complete path.

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": {
      "fileId": "<fileId>"
    },
    "name": "getFilePath"
  }
}

Input Schema

NameRequiredDescriptionDefault
fileIdYesThe ID of the file or folder to get the path for.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv4.0.0-rc.1

TDQS

A3.6/5.0
Behavior3/5

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

With no annotations, the description carries the full burden; it does disclose the mechanism (walks up the parent chain) and the shape of the return value, which is genuinely useful. It says nothing about permission requirements, behavior on shortcuts/orphaned parents, or root-level and shared-drive naming, which are the real failure modes for a path-walk.

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

Conciseness5/5

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

Two sentences, front-loaded with the return value, followed by the mechanism and a concrete example. Nothing is wasted and the example does real work.

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

Completeness4/5

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

For a one-parameter read tool with no output schema, the description is largely sufficient: it explains both what comes back and how it is derived. Only edge-case behavior (shared drives, shortcuts, inaccessible parents) is missing.

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?

The single fileId parameter is fully documented in the schema (100% coverage), so the description adds little beyond it. It correctly implies the ID may refer to a folder as well, but that is already in the schema text; baseline 3 applies.

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?

"Returns the full folder path of a Drive file from root to the file itself" gives a specific verb and resource, plus a concrete example output ("My Drive/Projects/Docs/report.pdf"). It is clearly distinct from sibling getFileInfo in effect, though it never names that sibling to make the contrast explicit.

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?

No explicit statement of when to use this versus getFileInfo or getFolderInfo; the guidance is only implied by the purpose ('if you need the path rather than metadata'). No exclusions or prerequisites are given.

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