Skip to main content
Glama
LKbaba
by LKbaba

gemini_analyze_codebase

Analyze entire codebases using a 1M-token context to uncover architecture, patterns, security risks, performance bottlenecks, and dependency issues. Accepts directories, file paths, or file contents.

Instructions

Analyze entire codebase using 1M token context. Supports directory path, file paths, or file contents. Provides architecture overview, identifies patterns, security issues, performance bottlenecks, and dependency problems.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
filesNoList of files with their content (for backward compatibility). Use directory or filePaths for easier usage.
focusNoOptional: Analysis focus area
modelNoGemini model to use (optional, default: gemini-3.1-pro-preview)
excludeNoGlob patterns to exclude files (e.g., ["node_modules/**", "**/*.test.ts"]). Only used with directory parameter.
includeNoGlob patterns to include files (e.g., ["**/*.ts", "**/*.tsx"]). Only used with directory parameter.
deepThinkNoEnable Deep Think mode for complex analysis (default: false)
directoryNoDirectory path to analyze (e.g., "./src" or "C:/Project/src"). The tool will automatically read files from this directory.
filePathsNoList of file paths to analyze (e.g., ["./src/index.ts", "./src/utils/helper.ts"]). The tool will automatically read these files.
outputFormatNoOutput format (default: markdown)markdown
thinkingLevelNoThinking depth: low for speed, high for complex analysis (default: high)high
Behavior3/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It adds useful context (1M token context, input flexibility) but does not state whether the operation is read-only, the runtime expectations, or system accesses required. It is adequate but lacks rich behavioral depth.

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 three focused sentences with no redundant wording. It front-loads the core action and then efficiently expands on capability and outcomes, making every sentence earn its place.

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?

This is a complex tool with 10 parameters, no output schema, and no annotations. The description covers the primary purpose, input modes, and the types of analysis results returned, which is sufficient for high-level agent decision-making. Some details are left to the schema, but the description is not incomplete enough to hinder selection or 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%, so every parameter is already documented. The description loosely maps to parameters via 'directory path, file paths, or file contents' and analysis areas, but it does not add meaning beyond what the schema provides. Baseline 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 clearly states a specific verb ('Analyze') and resource ('entire codebase'), and enumerates the analysis outcomes (architecture, patterns, security, performance, dependencies). This distinguishes it from sibling tools like gemini_analyze_content or gemini_search, which target different input types or tasks.

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

Usage Guidelines4/5

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

The description implies when to use this tool (when codebase analysis is needed) and mentions supported input modes (directory path, file paths, file contents), providing clear context. However, it does not explicitly name alternatives or exclusions relative to sibling tools, so it stops short of a 5.

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/LKbaba/Gemini-mcp'

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