Skip to main content
Glama
saidsef

GitHub PR Issue Analyser

by saidsef

Github List Repository Tree

github_list_repository_tree
Read-only

List a GitHub repository's file tree at a branch, tag, or SHA, optionally scoped to a subdirectory or recursive. Use it to inspect file structure and entry metadata before analyzing PRs or issues.

Instructions

Lists a repository's tree at ref, one level deep unless recursive. Each entry carries path, mode, type, size and sha. truncated is True where the tree exceeded GitHub's cap, which no amount of paging widens. See #409.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
refNoBranch, tag or SHA to list at. Omit for the default branch
pathNoSubdirectory to list. Omit for the repository root
recursiveNoDescend into every subdirectory rather than one level
repo_nameYes
repo_ownerYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
refYes
pathYes
totalYes
entriesYes
truncatedYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv42.0.0

TDQS

A4.3/5.0
Behavior5/5

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

Beyond the readOnlyHint annotation, the description discloses meaningful behavior: the default is one-level deep, recursive changes that, each entry contains specific fields, and the truncated flag indicates GitHub's cap cannot be widened by paging. This is exactly the kind of non-obvious behavior an agent needs to know.

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 tightly packed sentences lead with the core action, then describe the entry shape and the truncation caveat. Every sentence carries useful information and there is no filler or repetition of schema fields.

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 read-only listing tool with an output schema and annotations, the description is complete. It covers default depth, recursion, entry fields, and the truncation limitation, so an agent can call it correctly without additional context.

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 input schema already documents ref, path, and recursive with clear descriptions, covering 60% of parameters. The description reinforces ref and recursive but adds little beyond what schema descriptions already say; repo_owner and repo_name are self-evident from names.

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 opens with a specific verb and resource: 'Lists a repository's tree at ref'. It clearly distinguishes this from sibling tools like github_get_repository_file, github_list_releases, and github_list_tags by naming the exact object being listed and the default depth behavior.

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 description gives clear operational context—list a tree at a ref, one level deep unless recursive—but does not explicitly state when to prefer this tool over alternatives such as github_get_repository_file. There are no exclusions or 'use X instead' guidance, leaving the choice mostly implied.

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