Skip to main content
Glama

project_structure

Returns a repository's compact directory tree with language and symbol counts per folder, collapsing deeper paths beyond a set depth into file counts.

Instructions

Returns the repository's directory tree with language and symbol counts per directory. Directories beyond max_depth are collapsed with file counts. Compact output like the tree command.

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": {
      "repo": "<repo>"
    },
    "name": "project_structure"
  }
}

Input Schema

NameRequiredDescriptionDefault
repoYesRepository name (as shown in list_repos)
max_depthNoMaximum depth to expand

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.10.2

TDQS

A3.7/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 behavioral burden. It usefully discloses output composition and the collapse behavior beyond max_depth, but does not mention read-only status, permissions, performance characteristics, or error conditions.

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?

Three tight sentences with the core output described first and truncation behavior following. Every sentence adds useful information and the tree-command analogy is efficient.

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 simple read-only inspection tool with no output schema, the description explains the return shape and depth behavior sufficiently. Minor gaps such as root path treatment or example output are not critical for correct invocation.

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

Parameters4/5

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

Schema coverage is 100%, so the baseline is 3, but the description adds meaningful semantics about max_depth by explaining that directories beyond it are collapsed with file counts. The repo parameter remains fully covered by the schema.

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?

States a specific verb and resource: returns the repository's directory tree with language and symbol counts per directory. It is clear about the output, but does not differentiate itself from sibling tools such as doc_tree or import_graph.

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?

The purpose strongly implies when to use it for inspecting repository structure, and the max_depth behavior suggests a compact overview use case. However, there is no explicit when-to-use guidance, no exclusions, and no named alternatives.

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