Skip to main content
Glama
saidsef

GitHub PR Issue Analyser

by saidsef

Github Get Latest Sha

github_get_latest_sha
Read-only

Get the commit SHA at the tip of a specified branch, tag, or the default branch of a GitHub repository. Returns None when the repository has no commits.

Instructions

Fetches the SHA of the newest commit on ref, or on the default branch when ref is omitted. Returns None if the repository has no commits. The answer is a reading rather than a pin, so a push landing afterwards moves it.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
refNoBranch, tag or SHA to read the newest commit of. Omit for the default branch
repo_nameYes
repo_ownerYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

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?

Annotations already declare readOnlyHint and openWorldHint, and the description adds meaningful behavior: it returns None for empty repositories and warns that the value is a reading, not a pin, so a later push can change it. These details align with idempotentHint=false and destructiveHint=false with no contradiction.

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 short sentences deliver the core action, the default-branch behavior, the empty-repo edge case, and the mutability caveat. There is no filler or redundancy.

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?

The description fully covers how the tool behaves, including ref resolution, default branch usage, no-commit handling, and read semantics. Given the output schema and annotations, nothing essential is missing for correct invocation.

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 schema already documents the ref parameter, and the description mostly restates its default behavior. repo_owner and repo_name are self-explanatory from their names, but schema description coverage is low and the description does not add much beyond the schema for these parameters.

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 names a specific verb ('Fetches'), a specific resource ('SHA of the newest commit'), and the ref handling. It is clearly distinguishable from sibling tools such as github_get_release or github_get_repository_file, so an agent can select it without ambiguity.

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 clearly implies when to use the tool: to get the latest commit SHA for a ref or the default branch. It does not name alternatives or state explicit when-not-to-use cases, but the narrow resource and default-branch behavior give enough context for correct use.

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