Skip to main content
Glama

github_repos_get_readme_in_directory

Retrieves the README for a specified directory in a GitHub repository, with an optional branch, tag, or commit reference.

Instructions

Get a repository README for a directory

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": {
      "owner": "<owner>",
      "repo": "<repo>",
      "dir": "<dir>"
    },
    "name": "github_repos_get_readme_in_directory"
  }
}

Input Schema

NameRequiredDescriptionDefault
dirYesdir
refNoThe name of the commit/branch/tag. Default: the repository’s default branch.
repoYesrepo
ownerYesowner

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv1.0.4
  2. Removed
  3. Addedv1.0.2

TDQS

C2.9/5.0
Behavior2/5

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

With no annotations, the description should clarify behavior. It fails to mention that this is a read-only, idempotent operation, or what happens if the directory has no README file. The tool name suggests a GET request, but the description adds no behavioral details beyond the name.

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?

The description is extremely concise: one sentence with no wasted words. The verb 'get' is front-loaded, making the purpose immediately clear. This is ideal for conciseness.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the lack of output schema and annotations, the description should provide more context, such as the format of the returned README (e.g., base64-encoded content), how to handle directories with multiple README variants, or error cases like missing directories. The description is insufficient for an agent to use the tool confidently.

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% with minimal descriptions (e.g., 'owner', 'repo'). The tool description adds only that 'dir' is a directory, which is already implied. The 'ref' parameter has a better default description, but overall the description adds little meaning beyond 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?

The description clearly states the tool retrieves a README for a specific directory, differentiating it from the sibling 'github_repos_get_readme' which likely targets the root. However, it could be more precise about what 'get' means (e.g., returns the file content).

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

Usage Guidelines2/5

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

The description provides no guidance on when to use this tool versus alternatives, such as not using it for root-level READMEs. It also lacks prerequisites like repository existence or directory validity. Given the large sibling list, this omission reduces usability.

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

Deploy Server

Other Tools