Skip to main content
Glama

code_analysis_with_docs

Analyzes code snippets against official documentation to identify bugs, performance issues, and security vulnerabilities. Uses Google Search and Vertex AI to compare code with best practices.

Instructions

Analyzes code snippets by comparing them with best practices from official documentation found via web search. Identifies potential bugs, performance issues, and security vulnerabilities. Uses the configured Vertex AI model (gemini-2.5-pro) with Google Search. Requires 'code', 'language', and 'analysis_focus'.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
codeYesThe code snippet to analyze.
versionNoOptional. Specific version of the language or framework to target (e.g., 'ES2022', 'Python 3.11', 'React 18.2').
languageYesThe programming language of the code (e.g., 'JavaScript', 'Python', 'Java', 'TypeScript').
frameworkNoOptional. The framework or library the code uses (e.g., 'React', 'Django', 'Spring Boot').
analysis_focusYesAreas to focus the analysis on. Use 'all' to cover everything.

Schema Changelog

Changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. First observed

TDQS

A3.9/5.0
Behavior4/5

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

Since no annotations are provided, the description carries the full burden. It transparently discloses that it uses a Vertex AI model (gemini-2.5-pro) and Google Search, which implies network calls and external dependencies. However, it does not mention potential inaccuracies, rate limits, or that it is a read-only operation, though the 'analyzes' verb makes non-destructive behavior evident.

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 concise and well-structured, covering the main purpose, analysis areas, and underlying technology in three sentences. However, the final sentence about required parameters is redundant because the schema already marks them as required, which slightly reduces efficiency.

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?

Given there is no output schema, the description adequately explains what the tool does and its input requirements. It does not explicitly state the output format (e.g., a list of issues or a report), but for an analysis tool, the output is implicitly a descriptive analysis. The description is sufficient for an agent to decide when to use it.

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 baseline is 3. The description does not add meaningful parameter details beyond the schema; it simply repeats the required parameters ('code', 'language', 'analysis_focus') without elaborating on their semantics or relationships. The 'analysis_focus' enum values are not explained in the description.

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 the tool's purpose with a specific verb ('Analyzes code snippets') and resource ('code snippets'), and it distinguishes itself from sibling tools by focusing on code analysis against official documentation. It uniquely identifies bug detection, performance, and security analysis, which no other sibling tool claims.

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 implies when to use this tool (when you have a code snippet and need analysis against best practices) but does not explicitly contrast it with alternatives like get_doc_snippets or explain_topic_with_docs. No when-not guidance is provided, so the usage context is only implied.

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

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/shariqriazz/google-ai-search-mcp'

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