Skip to main content
Glama

Fetch repo structure

fetch_repo_structure

List files and directories in a local checkout or public GitHub repository to map the project structure before auditing documentation.

Instructions

List files in a local directory or GitHub repository. Use this first before reading docs.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "fetch_repo_structure"
  }
}

Input Schema

NameRequiredDescriptionDefault
pathNoAbsolute or relative local path to a git checkout
githubNoGitHub repo as owner/repo or https://github.com/owner/repo (public repos via GitHub API)
maxFilesNoMaximum file entries to return (default 2000)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.1.0

TDQS

A3.7/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. 'List' implies a read-only operation, but the description says nothing about authentication for GitHub access, API rate limits, private-vs-public repo behavior, or how results are truncated or ordered. The maxFiles cap exists only in the schema, not in the prose.

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 short sentences, front-loaded with the core action and followed by the usage rule. No filler or redundant restatement of the title.

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 no annotations and no output schema, the description should say more about the result shape and, critically, about what happens when neither path nor github is provided, since both are optional. It covers the primary flow but leaves this ambiguity unresolved.

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 parameters are already well documented. The description's mention of 'local directory or GitHub repository' loosely maps to the path and github parameters but adds no detail on precedence or mutual exclusivity.

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 concrete verb and resource: 'List files in a local directory or GitHub repository.' That clearly separates it from content-reading siblings like read_docs. It stops short of an explicit contrast with any named sibling, so it falls just under a 5.

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?

'Use this first before reading docs' gives a concrete sequencing rule for when to reach for this tool. There is no statement of when not to use it, and no explicit naming of alternatives beyond the implicit docs-reading step.

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