Skip to main content
Glama

get_diff

Read-only

Compare git refs or the working tree to review recent changes in a Typleaf project, with options to filter by file and control context.

Instructions

Get a git diff between refs or the working tree. Useful for reviewing recent changes.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
to_refNoEnd ref. Omit for working tree.
from_refNoStart ref (e.g. 'HEAD~3', commit hash). Default: HEAD
file_pathNoFilter to a specific file
max_charsNoTruncate diff to N chars (default 120000)
project_idYesTypleaf project ID — a 24-character lowercase hex string (e.g. '692a83fb82feceb233c4b0e7'), obtained from list_projects or the project URL. NOT a local filesystem path, NOT '.', NOT a project name or title. These tools operate on the REMOTE Typleaf project. Only call these tools when the user explicitly asks to work with a Typleaf project — never for general local file I/O. If you already have a copy of THIS project checked out on the local filesystem, prefer the standard read/grep tools against that path. Always call list_projects first when unsure.
context_linesNoDiff context lines (0-10, default 3)
Behavior3/5

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

The annotation readOnlyHint: true already covers the non-destructive nature, so the description does not need to repeat that. However, it also does not add any additional behavioral context, such as truncation behavior, default refs, or performance implications. The description essentially restates the tool's purpose without disclosing any traits beyond the annotation, so it provides only minimal added value.

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 sentences, zero filler, and the primary operation is front-loaded. The second sentence adds a clear use case. Every word earns its place, making this an exemplary concise definition.

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 6-parameter tool with a read-only annotation and full schema coverage, the description is largely sufficient. It states the core operation and a typical use case. The only minor gap is it does not explicitly mention that the tool operates on a remote Typleaf project (though the project_id parameter description covers this), nor does it describe the output format, which is arguably implied by 'diff'. Overall, the description, combined with the schema and annotation, provides enough context 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?

Schema description coverage is 100% with all six parameters documented, including detailed explanations for project_id (which clarifies remote usage). The tool description itself adds no parameter-specific meaning beyond what the schema already provides, so the baseline of 3 is appropriate.

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 states a specific verb and resource: 'Get a git diff between refs or the working tree.' This clearly identifies the operation and scope, and it is distinct from all sibling tools (none of which handle git diffs), so an agent can easily differentiate it without inspecting the schema.

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 phrase 'Useful for reviewing recent changes' provides a clear context for when to use the tool, but it does not explicitly state when not to use it or mention alternatives. There are sibling tools like status_summary and list_history that might overlap conceptually, and the description does not clarify how to choose between them. The usage guidance is implied rather than explicit.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/superzeldalink/typleaf-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server