Skip to main content
Glama

github_mcp.get_diff

Read-only

Inspect an existing job's Git diff against its base commit without modifying the workspace; returns redacted diff text and a truncation flag.

Instructions

Inspect the existing job's Git diff against its base commit without modifying the workspace. Returns redacted diff text capped at 100,000 characters and a truncation flag. Use preview_job for approval fingerprints and per-file previews.

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

Input Schema

NameRequiredDescriptionDefault
job_idYesExisting job identifier returned by create_job.

Output Schema

NameRequiredDescriptionDefault
okYes
dataNo
messageNo
error_codeNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv1.0.2
    • addedInput schema / properties / job_id / description
      Added value: +"Existing job identifier returned by create_job."
  2. First observedv1.0.1

TDQS

A4.3/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=true, destructiveHint=false, and openWorldHint=false, so the safety profile is covered structurally. The description adds real value beyond that: the 100,000-character cap, the truncation flag, and the fact that diff text is redacted. It does not discuss pagination or how to retrieve the remainder past truncation, so it stops short of full disclosure.

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 sentences, each doing distinct work: purpose and scope first, output characteristics second, sibling routing last. No redundant restatement of the tool name or filler.

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 one-parameter read-only tool with an output schema, the definition covers what an agent needs: what is inspected, that the workspace is untouched, output size limits, and where to go for previews. Nothing material is missing.

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% and there is a single optional-documented parameter (job_id), so the schema already carries full meaning. The description reinforces that the job must be 'existing' and ties the diff to a base commit, but adds no syntax or format detail beyond the schema — baseline 3 applies.

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?

States a specific verb+resource combination — inspect the job's Git diff against its base commit — and adds the scoping constraint 'without modifying the workspace.' It is clearly distinguishable from sibling preview_job, which the description explicitly routes elsewhere.

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

Usage Guidelines5/5

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

Names the alternative (preview_job) and the condition that selects it: approval fingerprints and per-file previews. An agent can choose between reading the raw diff and previewing fingerprints without opening either schema.

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