Skip to main content
Glama
Platano78

Smart-AI-Bridge

by Platano78

analyze_file

Answer any specific question about one file using a local or cloud LLM, returning structured findings and actions while keeping file contents private. Ideal for security, bug, or architecture reviews.

Instructions

Read ONE file and answer a question about it using a local or cloud LLM — Claude never sees the file contents, only the structured findings the LLM returns, plus a measured tokens_saved figure for that call. Use when you have one specific file and a specific question (security check, bug hunt, architectural concern). For the same question across many files (glob patterns), use batch_analyze. For a natural-language search across the codebase with no specific file in mind, use explore. Pure line-range questions like 'show me lines 437–490' short-circuit the LLM entirely and return the requested lines verbatim at zero token cost. Read-only: reads filePath, optionally reads includeContext files, makes one LLM call. Returns: {success, filePath, fileSize, lineCount, language, analysisType, question, summary, findings:[strings], confidence (0-1), suggestedActions:[strings], backend_used, processing_time, tokens_saved}. Verbatim short-circuit returns the same shape with analysisType:'verbatim', backend_used:'direct_extraction', and the requested lines in summary.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
optionsNo
filePathYesPath to the file to analyze
questionYesQuestion about the file (e.g., "What are the security vulnerabilities?")

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv2.14.0
    • changedInput schema / properties / options / properties / backend / enum
      Previous value: -[
      -  "auto",
      -  "local",
      -  "deepseek",
      -  "glm",
      -  "qwen3",
      -  "gemini",
      -  "groq"
      -]New value: +[
      +  "auto",
      +  "local",
      +  "deepseek",
      +  "glm",
      +  "gemini",
      +  "groq"
      +]
  2. Changed1 schema field changed
    • changedInput schema / properties / options / properties / backend / enum
      Previous value: -[
      -  "auto",
      -  "local",
      -  "deepseek",
      -  "qwen3",
      -  "gemini",
      -  "groq"
      -]New value: +[
      +  "auto",
      +  "local",
      +  "deepseek",
      +  "glm",
      +  "qwen3",
      +  "gemini",
      +  "groq"
      +]
  3. Changed1 schema field changedv2.6.0
    • changedInput schema / properties / options / properties / analysisType / description
      Previous value: -"Type of analysis to perform"New value: +"`general` = open-ended question (default). `bug` = look for defects, off-by-ones, race conditions. `security` = vulnerability-focused (SQLi, XSS, secret leaks, OWASP-style review). `performance` = bottlenecks, hot loops, allocation churn. `architecture` = design issues, coupling, layering. The choice also influences which backend is preferred for the analysis."
  4. Addedv1.3.2

TDQS

A4.6/5.0
Behavior5/5

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

With no annotations provided, the description carries the full disclosure burden, and it pays it thoroughly: it states the tool is read-only, discloses that Claude never sees file contents (only structured findings), explains the single LLM call, describes the verbatim short-circuit that returns lines 'at zero token cost', reports a measured tokens_saved, and lists the complete return shape. This exceeds what annotations alone would convey.

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?

The description is long, but every section earns its place: purpose, sibling routing, behavioral caveats, and return shape. The core purpose is front-loaded before the alternatives. It is dense rather than padded, though the return-shape enumeration could arguably be trimmed for tightness.

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?

There is no output schema, so the description appropriately takes on the job of documenting the return value, and it does so exhaustively, including the verbatim variant's distinct shape. For a tool with nested options objects and no output schema, nothing an agent needs to call it correctly is missing.

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 67%, and the schema already documents each parameter well (filePath, question, options with analysisType's enum behavior and backend choices). The description adds little parameter-level detail beyond what the schema provides; its extra content (verbatim short-circuit) is behavioral rather than semantic. This matches the baseline for a well-documented 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?

The description opens with a specific verb+resource pair — 'Read ONE file and answer a question about it using a local or cloud LLM' — and immediately establishes its single-file scope. It explicitly contrasts itself with siblings by name (batch_analyze, explore), so an agent can tell them apart without inspecting schemas.

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?

Delivers crisp routing guidance: 'Use when you have one specific file and a specific question', then names the alternatives with the conditions that select them — batch_analyze for glob patterns, explore for natural-language codebase search. It even carves out the verbatim short-circuit case for pure line-range questions. Nothing is left to inference.

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