Skip to main content
Glama

Get GitHub Repository Context

get_github_context
Read-onlyIdempotent

Retrieves current GitHub repository context—branch, open issues, and pull requests—auto-detecting from git or using a specified owner/repo for multi-project workflows.

Instructions

Get current repository context including branch, open issues, and open PRs. IMPORTANT: Leave owner/repo empty to auto-detect from git, OR specify the repository name if working in a multi-project registry.

Input Schema

NameRequiredDescriptionDefault
repoNoRepository name (use this to switch projects dynamically)
ownerNoRepository owner
use_test_dbNo

Output Schema

NameRequiredDescriptionDefault
codeNoError code (e.g. VALIDATION_ERROR, INTERNAL_ERROR)
errorNoHuman-readable error message
branchNo
commitNo
issuesNo
detailsNoAdditional error context
prCountNo
categoryNoError category (validation, query, connection, internal)
repoNameNo
remoteUrlNo
issueCountNo
suggestionNoSuggested fix for the error
recoverableNoWhether the error is recoverable
pullRequestsNo
aggregated_errorsNoDetails of individual errors in a multi-step operation

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv9.0.0

TDQS

A3.5/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=true, idempotentHint=true, and destructiveHint=false, so the safety profile is covered. The description adds the auto-detection behavior from git, but says nothing about auth requirements, rate limiting, or what happens when auto-detection fails in a non-git directory — relevant for an openWorldHint=true tool hitting an external API.

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?

Two tight sentences with the core purpose front-loaded and the conditional-parameter guidance second. The 'IMPORTANT:' framing is slightly heavy but earns its emphasis given the auto-detect behavior is non-obvious.

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 rich annotations and an output schema present, the description needn't explain return values, and it covers the one non-obvious calling decision (empty vs. explicit repo). The undocumented use_test_db parameter and no fallback/error behavior keep it from being fully complete.

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 67% and the description reinforces the repo/owner semantics (empty = auto-detect, specified = switch projects). But use_test_db is left undocumented in both the schema and the description, and the interaction between specifying only one of owner/repo is unaddressed.

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 specific verb and resource — 'Get current repository context' — and enumerates the contents (branch, open issues, open PRs). It doesn't differentiate from the near siblings get_github_issues / get_github_prs / get_github_pr, so an agent could hesitate over which to call for issue data.

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?

Gives conditional guidance for the owner/repo arguments (leave empty to auto-detect from git vs. specify for a multi-project registry), which is useful. However it offers no guidance on when to use this aggregate tool versus the dedicated get_github_issues, get_github_prs, or get_repo_insights siblings.

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