Skip to main content
Glama

get_folder_structure

Returns the folder hierarchy as a tree, revealing content domains and folder IDs to plan targeted retrieval before browsing documents.

Instructions

Orientation step: show the folder hierarchy as a tree (like tree -d). Call this before browse_documents() to plan targeted retrieval — folder names reveal content domains (e.g. "Research", "Finance") and return folder IDs you pass to browse_documents(folder_id=…). Wait for this result before issuing browse_documents() or search_documents(). For folder_id="root" (default), returns the entire folder tree; for a specific folder_id, returns that subtree only.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathNoHuman-readable folder path (e.g. "Research/Papers/2024"). Alternative to folder_id — copy a `path` value from any browse_documents() or search_documents() response. When provided, folder_id is ignored.
depthNoMaximum depth to traverse (1-10, default 10). Use a smaller value for very large folder trees.
folder_idNoSubtree root (default "root" = entire library). Pass a specific folder ID to get only that subtree, or "shared-with-me"/"following" for the read-only folders at the library root. Copy any folder_id verbatim from a browse/tree response, never construct one. Ignored when `path` is provided.
include_countsNoInclude file_count and children_count per folder (default true). Set false to reduce response size; the root node of the tree always carries its counts regardless of this flag.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.8.2

TDQS

A4.7/5.0
Behavior4/5

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

With no annotations, the description carries the full behavioral burden. It discloses the tool is read-only in nature (orientation), explains the tree output, and notes that the root node always carries counts. It does not explicitly state error behavior or permission requirements, but these are minor given the non-destructive nature implied and the detail provided about response composition.

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?

The description is detailed and front-loaded with its purpose, then moves to usage sequencing, then parameter nuances. It is slightly long but each sentence contributes operational value; nothing is redundant or filler.

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?

For a tool with 4 parameters, no output schema, and no annotations, the description covers all essential aspects: what it returns (tree, IDs), how to invoke it canonically (before browse_documents), parameter interactions, and special cases (root subtree, read-only folders). No crucial information for correct invocation 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?

Although schema coverage is 100%, the description goes far beyond the schema by explaining the path/folder_id interplay (path overrides folder_id), special folder_id values ('shared-with-me'/'following'), the rule to never construct folder IDs, and when to reduce depth. This adds critical operational meaning that the schema alone does not convey.

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?

The description states a specific verb and resource ('show the folder hierarchy as a tree') and frames it as an 'Orientation step' distinct from retrieval tools like browse_documents or search_documents. It clearly positions itself as the prerequisite for targeted retrieval, distinguishing it from sibling tools with a specific call pattern.

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

Usage Guidelines5/5

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

Explicitly instructs the agent to call this before browse_documents() and wait for the result before issuing browse_documents() or search_documents(). It also gives conditional guidance on path vs folder_id and on reducing depth for large trees, making the usage rules unambiguous.

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