Skip to main content
Glama
Project Scope MCP Server

Project Scope MCP Server

get_repo_structure

Map a repository's complete file structure, automatically respecting .gitignore rules, and return it as a visual tree, flat list, or structured JSON for codebase analysis.

Instructions

Map the complete file structure of a repository. Automatically respects .gitignore rules. Use 'tree' format for visual hierarchy, 'simple' for flat file lists, or 'json' for programmatic access. Best practice: Run this first when encountering a new codebase.

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": {
      "path": "<path>"
    },
    "name": "get_repo_structure"
  }
}

Input Schema

NameRequiredDescriptionDefault
pathYesRoot path of the repository
formatNoOutput format: 'tree' (visual tree), 'simple' (flat list), or 'json' (structured data)json

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

A3.8/5.0
Behavior3/5

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

No annotations are supplied, so the description carries the full behavioral burden. It usefully discloses that .gitignore rules are respected and how output formatting behaves, but says nothing about read-only semantics, depth/recursion limits, or behavior on very large or deeply nested repositories.

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?

Four short sentences, front-loaded with the core purpose followed by behavior, options, and a recommendation. Minor redundancy in re-explaining the format enum, but nothing is padded or off-topic.

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?

With only two parameters and no output schema, the agent still doesn't know what the return payload looks like (e.g. whether json yields a nested node tree or a path array) or how large repositories are handled. The definition is adequate but leaves meaningful gaps for a tool whose whole value is its output shape.

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 description coverage is 100%, so the schema already defines both 'path' and the 'format' enum. The description's format guidance ('tree' for visual hierarchy, 'simple' for flat lists, 'json' for programmatic access) largely restates the schema's own enum descriptions, adding only mild selection rationale.

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?

Uses a specific verb+resource ('Map the complete file structure of a repository') that unambiguously distinguishes it from every listed sibling, none of which enumerate repository layout. An agent can select it without opening the schema.

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

Usage Guidelines4/5

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

'Best practice: Run this first when encountering a new codebase' gives a concrete triggering condition, and the format guidance tells the agent which mode to pick for which consumer. It stops short of stating when NOT to use it (e.g. very large repos, or when a targeted search suffices), so it lands just below a 5.

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