code-lens
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| TASK_TTL_MS | No | Default task result retention in milliseconds. | 300000 |
| GEMINI_MODEL | No | Override the default Gemini model for all tools. | gemini-3-flash-preview |
| GEMINI_API_KEY | No | Gemini API key. Falls back to GOOGLE_API_KEY if not set. | |
| GOOGLE_API_KEY | No | Alternative Gemini API key. Used if GEMINI_API_KEY is not set. | |
| MAX_DIFF_CHARS | No | Maximum diff size in characters. | 120000 |
| MAX_TASK_TTL_MS | No | Upper bound for request-provided task TTL in milliseconds. | 3600000 |
| GEMINI_BATCH_MODE | No | Enable Gemini batch mode. | off |
| MAX_CONCURRENT_CALLS | No | Maximum concurrent Gemini API calls. | 10 |
| GEMINI_DIFF_CACHE_TTL_S | No | Cache TTL in seconds when caching is enabled. | 3600 |
| GEMINI_DIFF_CACHE_ENABLED | No | Enable Gemini context caching for large diffs. | false |
| MAX_CONCURRENT_BATCH_CALLS | No | Maximum concurrent batch Gemini calls. | 2 |
| GEMINI_HARM_BLOCK_THRESHOLD | No | Safety filter threshold (BLOCK_NONE, BLOCK_ONLY_HIGH, BLOCK_MEDIUM_AND_ABOVE, BLOCK_LOW_AND_ABOVE). | BLOCK_NONE |
| MAX_CONCURRENT_CALLS_WAIT_MS | No | Wait timeout for concurrency semaphore in milliseconds. | 2000 |
Capabilities
Features and capabilities supported by this server
| Capability | Details |
|---|---|
| tasks | {
"list": {},
"cancel": {},
"requests": {
"tools": {
"call": {}
}
}
} |
| tools | {
"listChanged": true
} |
| logging | {} |
| prompts | {
"listChanged": true
} |
| resources | {
"subscribe": true,
"listChanged": true
} |
| completions | {} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| generate_diffA | Generate a diff of the current branch working changes and cache it for all review tools. You MUST call this tool before calling any other review tool. Use "unstaged" for working-tree changes not yet staged, or "staged" for changes already added with git add. |
| analyze_pr_impactA | Assess impact and risk from cached diff. Prerequisite: generate_diff. Auto-infer repo/language. |
| generate_review_summaryA | Summarize diff and risk level. Prerequisite: generate_diff. Auto-infer repo/language. |
| generate_test_planA | Generate test cases. Prerequisite: generate_diff. Auto-infer repo/language/framework. |
| analyze_time_space_complexityA | Analyze Big-O complexity. Prerequisite: generate_diff. Auto-infer language. |
| detect_api_breaking_changesA | Detect breaking API changes. Prerequisite: generate_diff. Auto-infer language. |
| load_fileA | Cache a single file for analysis tools (refactor_code, ask_about_code, verify_logic). Overwrites previous cache. Path is relative to server working directory (e.g. src/index.ts) or absolute (e.g. /home/user/project/src/index.ts). |
| refactor_codeA | Analyze cached file for complexity, duplication, naming, and grouping improvements. Prerequisite: load_file. Set maxSuggestions to cap output (default 10). |
| generate_documentationA | Generate documentation stubs for all public exports in a cached file. Prerequisite: load_file. Auto-infer language. |
| detect_code_smellsA | Detect structural code smells in a cached file. Prerequisite: load_file. Auto-infer language. |
| ask_about_codeA | Answer questions about a cached file. Prerequisite: load_file. Auto-infer language. |
| verify_logicA | Verify algorithms and logic in a cached file using Gemini code execution sandbox. Prerequisite: load_file. Auto-infer language. |
| web_searchA | Google Search with Grounding. Set topic to scope results; responseStyle controls output length. |
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
| get-help | Returns full server instructions: capabilities, tools, resources, constraints, and task lifecycle. |
| review-guide | Returns a workflow guide for a specific tool and focus area. Supports auto-completion. |
| select-workflow | Returns a recommended tool pipeline based on the type of code change. Supports auto-completion. |
| analyze-file | Returns a goal-based tool pipeline for single-file analysis. Supports auto-completion. |
| tool-chain | Returns the full prerequisite chain for a given tool, including setup steps and follow-ups. |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
| server-instructions | Complete server usage instructions. |
| tool-catalog | Tool reference: models, params, outputs, data flow. |
| workflows | Recommended workflows and tool sequences. |
| server-config | Runtime configuration and limits. |
| diff-current | The most recently generated diff, cached by generate_diff. Read by all review tools automatically. |
| file-current | The most recently loaded source file, cached by load_file. Read by file analysis tools automatically. |
| tool-info:analyze_pr_impact | Per-tool reference: model, params, output, gotchas. |
| tool-info:analyze_time_space_complexity | Per-tool reference: model, params, output, gotchas. |
| tool-info:ask_about_code | Per-tool reference: model, params, output, gotchas. |
| tool-info:detect_api_breaking_changes | Per-tool reference: model, params, output, gotchas. |
| tool-info:detect_code_smells | Per-tool reference: model, params, output, gotchas. |
| tool-info:generate_diff | Per-tool reference: model, params, output, gotchas. |
| tool-info:generate_documentation | Per-tool reference: model, params, output, gotchas. |
| tool-info:generate_review_summary | Per-tool reference: model, params, output, gotchas. |
| tool-info:generate_test_plan | Per-tool reference: model, params, output, gotchas. |
| tool-info:load_file | Per-tool reference: model, params, output, gotchas. |
| tool-info:refactor_code | Per-tool reference: model, params, output, gotchas. |
| tool-info:verify_logic | Per-tool reference: model, params, output, gotchas. |
| tool-info:web_search | Per-tool reference: model, params, output, gotchas. |
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/j0hanz/code-lens'
If you have feedback or need assistance with the MCP directory API, please join our Discord server