Skip to main content
Glama
kmandana
by kmandana

review_changes

Review code changes to understand what was done and why before staging or committing, using a narrative summary and goal-aligned breakdown.

Instructions

Review code changes before staging/committing to understand what was done and why.

WHEN TO CALL: After you (the AI assistant) have made code changes on behalf of the user and BEFORE staging or committing. This lets the user understand what you did at a conceptual level rather than reading raw diffs.

REQUIRED: Before calling this tool, summarize what the user asked you to do. Pass this as the 'goal' parameter. Be specific — "add JWT authentication middleware" is better than "make changes".

HOW TO PRESENT THE RESPONSE — follow this layered approach:

  1. NARRATIVE SUMMARY (always show first): Start with a plain-language summary of what changed. Example: "I made 5 changes across 3 files to add JWT authentication." Include the key stats: files added/modified/deleted, lines changed.

  2. GOAL ALIGNMENT (group changes by purpose): Look at each changed file and classify it into one of three tiers:

    • KNOWN: Changes that directly relate to the 'goal' you passed. You know these because you made them for the stated purpose.

    • INFERRED: Changes whose context_clues (comments, docstrings) suggest a clear purpose different from the stated goal. These may be from a different AI agent session. Describe the inferred purpose.

    • UNKNOWN: Changes with no clear connection to any goal AND no useful context clues. Flag these — the user should review them.

  3. PER-FILE BREAKDOWN: For each goal group, list the files with a short description of what changed. Read the diff to explain HOW the goal was achieved:

    • What functions/classes were added or modified?

    • What's the approach? (e.g., "Added middleware pattern using decorators")

    • Any notable implementation choices?

  4. ATTENTION GUIDE: Tell the user what needs their eyes vs what's routine:

    • NEW FILES: "I created auth/middleware.py — worth a quick review"

    • MODIFIED FILES: "Added 3 lines to config.py — routine import addition"

    • UNKNOWN CHANGES: "utils.py was modified but doesn't match the goal — please check"

    • LARGE CHANGES: Any file with 50+ lines added deserves a mention

  5. DETAIL ON DEMAND: End with: "Want me to walk through any specific file in detail?"

IMPORTANT: You have the full diff in the response — READ IT to understand the actual code in any programming language. The context_clues are supplementary hints (comments/docstrings) to help you classify changes from other sessions that you didn't make yourself.

Args: goal: What the user asked the AI to do. Summarize from your conversation. Be specific — this is used to classify changes into goal groups. scope: What to analyze: - "working" (default): All unstaged working tree changes (git diff) plus untracked files. Use this before staging. - "staged": Only staged changes (git diff --staged). Use this if the user has already staged specific files. repo_path: Path to git repository (optional, defaults to MCP roots).

Returns: JSON string with: - goal: The stated goal (pass-through for your reference) - summary: File and line count statistics - changes: Per-file stats (path, status, lines_added, lines_removed) - context_clues: Comments and docstrings from added lines (per file) - diff: Raw diff text for you to read and understand the code - untracked_files: List of new files not yet tracked by git (working scope only) - pagination_info: Token counts and chunk info for the diff

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
goalYes
scopeNoworking
repo_pathNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior5/5

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

No annotations provided, but description fully discloses behavior: returns JSON with summary, changes, diff, context clues, etc. Explains how to interpret and present results. No contradictions.

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?

Very detailed and well-structured with clear sections, but quite lengthy. Every section adds value, but could be more concise while retaining essential information.

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?

Covers all aspects: purpose, when to call, prerequisites, parameters, output schema (explained even though output schema exists), and how to present results. Complete for a tool with 3 parameters and output schema.

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

Parameters5/5

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

Schema description coverage is 0%, but description includes an 'Args:' section that explains each parameter (goal, scope, repo_path) with defaults and usage guidance, adding significant meaning beyond the schema.

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?

Clearly states the tool reviews code changes before staging/committing. Provides specific verb 'review' and resource 'code changes', and distinguishes from sibling tools like commit_changes and create_pr.

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?

Explicitly states WHEN TO CALL: after making changes and before staging/committing. Gives required prerequisite to provide a 'goal' summary. Provides detailed instructions on how to present the response.

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/kmandana/DevNarrate'

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