Skip to main content
Glama

gemini_code_search

Scan multiple repository files at once to answer architectural or code questions across them.

Instructions

Use a large-context model to scan multiple repository files at once and answer architectural or code questions about them. Runs synchronously and returns the answer.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "query": "<query>",
      "context_files": "<context_files>"
    },
    "name": "gemini_code_search"
  }
}

Input Schema

NameRequiredDescriptionDefault
modelNoOptional live model label or ID for this search; defaults to Flash.
queryYesQuery or pattern to search for and explain across the provided files.
context_filesYesAbsolute paths of the files to scan.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

B3.1/5.0
Behavior3/5

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

With no annotations, the description carries the burden and does disclose two useful traits: execution is synchronous and the answer is returned directly rather than a job handle. It says nothing about latency, context-size or file-count limits, cost, or failure behavior for a large-context model call — material gaps for a potentially expensive operation.

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?

Two sentences, zero padding, and the core capability is front-loaded before the execution/return note. Nothing is wasted, though the second sentence is terse enough that it could have absorbed a limit or two at no length cost.

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

Completeness3/5

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

Three fully documented parameters and no output schema mean the structured fields cover the mechanics, and the description correctly notes that an answer is returned. For a synchronous multi-file model call with no annotations, however, an agent still lacks the operational boundaries — size limits, latency, and model-choice impact — needed to invoke it confidently.

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

Parameters1/5

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

Schema coverage is 100% and every parameter already carries a description, so the schema does the work. The description adds only 'multiple repository files at once', which merely restates the array nature of context_files, and gives no extra meaning about query syntax, absolute-path expectations, or how model selection affects results.

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

Purpose4/5

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

States a specific action (scan multiple repository files and answer architectural or code questions) over an explicit resource set. It is clearly distinct from the job-management siblings, reinforced by 'Runs synchronously', though it never names an alternative tool outright.

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 gives a use context ('architectural or code questions' across multiple files), which implies when to reach for it rather than a single-file text search. It provides no explicit exclusions, no guidance on when to prefer the async agent-job siblings, and no prerequisites such as repo access or file-count limits.

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