Skip to main content
Glama

Gemini Analyze Code Tool

gemini_analyze_code_tool
Read-only

Analyze code with Gemini to find bugs, security flaws, and performance issues. Detects the programming language automatically and supports focused reviews.

Instructions

Analyze code with Gemini.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
codeYesThe code to analyze.
focusNoAnalysis focus (general, security, performance, bugs).general
modelNoModel to use.pro
languageNoProgramming language (auto-detected if not specified).

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.3.0

TDQS

C2.5/5.0
Behavior2/5

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

The annotation readOnlyHint=true already tells the agent this is a safe, non-mutating operation, so the description could have used its space for richer context. Instead it adds nothing: no mention of what the analysis produces, how the focus modes differ, latency, or any constraints. It contributes no behavioral information beyond the annotation.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

It is a single short sentence with no waste, which is structurally clean. However, the brevity here reflects under-specification rather than disciplined conciseness, so it does not rise above adequate.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a 4-parameter tool with an output schema and annotations, the description is far too thin. Even granting that the output schema covers return values and annotations cover safety, the agent still lacks any explanation of the focus modes or the difference from sibling analyze tools.

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 schema already documents all four parameters (code, focus, model, language) with defaults and enum-like values. The description adds no extra meaning, so the baseline 3 applies.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose3/5

Does the description clearly state what the tool does and how it differs from similar tools?

"Analyze code with Gemini" does name a verb (analyze) and a resource (code), so the basic purpose is inferable. But it is essentially a restatement of the tool name/title and gives no differentiation from siblings like gemini_run_code_tool or gemini_analyze_text_tool. An agent cannot tell what kind of analysis this performs or how it differs from the other analyze_* tools.

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

Usage Guidelines2/5

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

There is no when-to-use guidance, no mention of alternatives, and no conditions or exclusions. With many sibling analyze/extract/summarize tools available, the description provides nothing to route the agent to this one.

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