Skip to main content
Glama

ingest_diff

Converts a unified diff into a structured change summary with intent classification, symbols changed, and files modified to understand the architectural impact of code changes.

Instructions

Ingest a code diff/patch into the context memory.

Converts a unified diff (git diff output) into a structured change summary: intent classification (bug-fix/feature/refactor), symbols changed, files modified, and line delta. Particularly useful for understanding recent changes and their architectural impact.

Args: diff_text: Raw unified diff text (git diff output). source: Identifier (e.g., 'pr_42_auth_refactor.diff'). commit_message: Optional commit message for better intent classification.

Returns JSON with ingestion result plus: - intent: bug-fix/feature/refactor/test/security/performance - files_changed, added_lines, removed_lines - symbols_changed: functions/classes modified

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
sourceYes
diff_textYes
commit_messageNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior3/5

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

No annotations provided, so the description must fully disclose behavior. It states the tool converts a diff into a structured summary and returns JSON. However, it does not clarify whether the ingested data is stored, the persistence of changes, or any side effects (e.g., modifications to context memory). More details on authorization or error handling would improve transparency.

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?

The description is concise with two paragraphs and a bullet list. It is front-loaded with the primary action and quickly details the conversion process. However, the bullet-listed output fields could be slightly more compact, and there is minor redundancy in the first paragraph explaining the same concept.

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?

The description covers purpose, parameters, and return value sufficiently. An output schema exists (implied by the return fields listed), so repeating those fields is acceptable. However, it lacks information on error handling, input validation, or performance implications, but overall it provides a complete understanding for an AI agent.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Despite 0% schema description coverage, the description adds significant meaning to all three parameters. It explains 'diff_text' as 'raw unified diff text (git diff output)', 'source' with an example, and 'commit_message' as optional for better intent classification. This goes beyond what the schema's titles provide.

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 that the tool ingests a diff, converts it to a structured change summary, and provides intent classification. It uses specific verbs and resources ('ingest', 'diff', 'context memory'). It distinguishes from sibling tools like 'ingest_diagram' and 'ingest_voice' by focusing on code diffs.

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 mentions it is 'particularly useful for understanding recent changes and their architectural impact,' but does not explicitly state when to use this tool vs alternatives or provide exclusions. It lacks guidance on when not to use it or when to use siblings like 'process_change' or 'sync_workspace_changes'.

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/juyterman1000/entroly'

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