Skip to main content
Glama

get_file_diff

Retrieve the complete parsed diff for a single file in a pull request, including every hunk with added/deleted/context lines and line numbers, to read exact code changes for accurate tour narration.

Instructions

Return the full parsed diff for one changed file in the PR: every hunk with every line (kind add/del/ctx, old/new line numbers, text). Use this to read the actual code changes so your show_step narration is accurate.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathYes
pr_urlYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4/5.0
Behavior3/5

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

With no annotations, the description carries the burden and does disclose the output shape (every hunk, line kinds, line numbers, text). However, it omits any behavior around errors, missing files, or side effects, though the read-only nature is implicitly clear from 'Return'.

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?

Two compact sentences with no filler. The core output is front-loaded, followed by a practical usage tip. Every sentence adds value.

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?

For a simple two-parameter tool with no output schema, the description adequately explains the returned structure and the intended use case. It could mention edge cases like invalid paths or empty diffs, but the essentials are present.

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 description coverage is 0%, and the description does not explicitly define pr_url or path formats. It does add contextual meaning by tying them to 'one changed file in the PR', but leaves details like how to specify a path or URL unresolved.

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 clearly states the specific verb 'Return' and the resource: the full parsed diff for one changed file in the PR, including hunk and line details. It distinguishes itself from sibling tools like show_step and get_pr_info by focusing on reading actual code changes.

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

Usage Guidelines4/5

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

It gives a clear usage purpose: 'Use this to read the actual code changes so your show_step narration is accurate.' This tells the agent when to call it, though it does not explicitly name alternatives or when not to use it.

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