Skip to main content
Glama

github_mcp.list_tree

Read-only

Browse safe tracked entries in a repository's default-branch snapshot, paging results with limit and offset. Refreshes the local read cache and excludes unsafe paths.

Instructions

Browse safe tracked entries in the default-branch snapshot. Returns entries, total and next_offset; use next_offset for subsequent pages. Refreshes the local read cache and excludes unsafe paths.

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": {
      "repository": "<repository>"
    },
    "name": "github_mcp.list_tree"
  }
}

Input Schema

NameRequiredDescriptionDefault
limitNoPage size, 1–200 entries; default 100.
offsetNoZero-based entry offset; default 0.
repositoryYesAllowlisted owner/repo identifier.

Output Schema

NameRequiredDescriptionDefault
okYes
dataNo
messageNo
error_codeNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changedv1.0.2
    • addedInput schema / properties / limit / description
      Added value: +"Page size, 1–200 entries; default 100."
    • addedInput schema / properties / offset / description
      Added value: +"Zero-based entry offset; default 0."
    • addedInput schema / properties / repository / description
      Added value: +"Allowlisted owner/repo identifier."
  2. First observedv1.0.1

TDQS

A3.9/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true, destructiveHint=false and openWorldHint=true, so the safety profile is covered. The description adds non-obvious behavior beyond that: it refreshes the local read cache (a side effect worth knowing about for a read tool) and excludes unsafe paths, both of which an agent could not infer from annotations alone.

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: what it browses, what it returns and how to page, then the cache and path-exclusion caveats. The scope statement is front-loaded and no sentence is filler.

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?

With an output schema present and full schema coverage, the description only needs to supply scope, paging and side effects, all of which it does. Minor gaps remain around error behavior and what 'tracked' excludes, but nothing blocks a correct call.

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 limit, offset and repository are already documented, which sets a baseline of 3. The description earns above baseline by connecting the response field next_offset to the offset parameter for paging, adding meaning the schema alone does not convey.

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?

The description gives a specific verb-plus-resource: 'Browse safe tracked entries in the default-branch snapshot,' which tells an agent exactly what is listed and the scope (default branch, tracked only). It falls short of a 5 because it does not contrast itself with siblings like read_file or list_recent_commits, leaving the agent to infer the boundary.

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?

It provides concrete pagination guidance ('use next_offset for subsequent pages'), which is real when-to-use instruction. However, there is no statement of when to prefer this tool over read_file, read_files_batch, or list_branches, so the alternative-selection guidance is only implied.

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