Skip to main content
Glama

gemini_review

Review code changes, git diffs, or specific files with Gemini to get a second opinion and actionable comments with severity levels before committing.

Instructions

Get a code review from Gemini on specific files or a git diff. USE THIS TOOL WHEN: (1) You want a second opinion on code you just wrote or are about to commit. (2) You need to review a large diff that would consume too many tokens to analyze yourself. (3) You want a focused review on a specific aspect like performance, error handling, or readability. (4) You need to review multiple files together to check for cross-file consistency. This tool differs from gemini_analyze: it is designed for reviewing CHANGES (diffs, specific files) rather than analyzing an entire codebase. It provides actionable review comments with severity levels.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "gemini_review"
  }
}

Input Schema

NameRequiredDescriptionDefault
diffNoA git diff string to review (e.g., output of `git diff` or `git diff --staged`). Provide this OR file_paths, not both. Preferred for reviewing changes before commit.
modelNoOverride the default Gemini model. If omitted, uses the server default.
file_pathsNoArray of absolute file paths to review. Binary files are automatically skipped. Provide this OR diff, not both.
review_focusNoWhat aspect to focus the review on. Examples: "performance", "error handling", "readability", "security", "concurrency", "API design", "test coverage". If omitted, performs a general-purpose code review.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.1.0

TDQS

A4.2/5.0
Behavior3/5

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

No annotations are provided, so the description carries the full behavioral disclosure burden. It states that the tool returns actionable review comments with severity levels, which is useful output context, but it does not clarify whether the operation is read-only, what happens if neither diff nor file_paths is provided, or any cost/latency characteristics. The use cases and output summary make it adequate but not rich.

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?

The description is front-loaded with a clear purpose sentence, followed by a structured USE THIS TOOL WHEN list and a sibling differentiation statement. The numbered scenarios are purposeful and none of the sentences feel redundant. It is appropriately sized for a tool with several use cases.

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 is complete enough to select and invoke the tool given the fully covered input schema and the lack of an output schema. It describes the general return value as actionable review comments with severity levels. A minor gap remains: it does not state what occurs when neither diff nor file_paths is supplied, despite both being optional in the schema.

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%, so the input schema already documents the four parameters in detail. The description only restates that the tool works on specific files or a git diff and does not add syntax, constraints, or examples beyond the schema. Baseline 3 is appropriate when the schema does the parameter-level work.

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: getting a code review from Gemini on specific files or a git diff. It also explicitly distinguishes the tool from gemini_analyze by focusing on reviewing changes rather than analyzing an entire codebase. An agent can identify the tool's role from the opening sentence and the differentiation section.

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?

The description gives four explicit scenarios for using the tool, including second opinions before commit, large diffs, focused reviews, and cross-file consistency checks. It also names gemini_analyze as an alternative for whole-codebase analysis. The when-to-use guidance is unusually direct and actionable.

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