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
| Name | Required | Description | Default |
|---|---|---|---|
| code | Yes | The code snippet to analyze. | |
| version | No | Optional. Specific version of the language or framework to target (e.g., 'ES2022', 'Python 3.11', 'React 18.2'). | |
| language | Yes | The programming language of the code (e.g., 'JavaScript', 'Python', 'Java', 'TypeScript'). | |
| framework | No | Optional. The framework or library the code uses (e.g., 'React', 'Django', 'Spring Boot'). | |
| analysis_focus | Yes | Areas to focus the analysis on. Use 'all' to cover everything. |