Skip to main content
Glama

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault
TASK_TTL_MSNoDefault task result retention in milliseconds.300000
GEMINI_MODELNoOverride the default Gemini model for all tools.gemini-3-flash-preview
GEMINI_API_KEYNoGemini API key. Falls back to GOOGLE_API_KEY if not set.
GOOGLE_API_KEYNoAlternative Gemini API key. Used if GEMINI_API_KEY is not set.
MAX_DIFF_CHARSNoMaximum diff size in characters.120000
MAX_TASK_TTL_MSNoUpper bound for request-provided task TTL in milliseconds.3600000
GEMINI_BATCH_MODENoEnable Gemini batch mode.off
MAX_CONCURRENT_CALLSNoMaximum concurrent Gemini API calls.10
GEMINI_DIFF_CACHE_TTL_SNoCache TTL in seconds when caching is enabled.3600
GEMINI_DIFF_CACHE_ENABLEDNoEnable Gemini context caching for large diffs.false
MAX_CONCURRENT_BATCH_CALLSNoMaximum concurrent batch Gemini calls.2
GEMINI_HARM_BLOCK_THRESHOLDNoSafety filter threshold (BLOCK_NONE, BLOCK_ONLY_HIGH, BLOCK_MEDIUM_AND_ABOVE, BLOCK_LOW_AND_ABOVE).BLOCK_NONE
MAX_CONCURRENT_CALLS_WAIT_MSNoWait timeout for concurrency semaphore in milliseconds.2000

Capabilities

Features and capabilities supported by this server

CapabilityDetails
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

NameDescription
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

NameDescription
get-helpReturns full server instructions: capabilities, tools, resources, constraints, and task lifecycle.
review-guideReturns a workflow guide for a specific tool and focus area. Supports auto-completion.
select-workflowReturns a recommended tool pipeline based on the type of code change. Supports auto-completion.
analyze-fileReturns a goal-based tool pipeline for single-file analysis. Supports auto-completion.
tool-chainReturns the full prerequisite chain for a given tool, including setup steps and follow-ups.

Resources

Contextual data attached and managed by the client

NameDescription
server-instructionsComplete server usage instructions.
tool-catalogTool reference: models, params, outputs, data flow.
workflowsRecommended workflows and tool sequences.
server-configRuntime configuration and limits.
diff-currentThe most recently generated diff, cached by generate_diff. Read by all review tools automatically.
file-currentThe most recently loaded source file, cached by load_file. Read by file analysis tools automatically.
tool-info:analyze_pr_impactPer-tool reference: model, params, output, gotchas.
tool-info:analyze_time_space_complexityPer-tool reference: model, params, output, gotchas.
tool-info:ask_about_codePer-tool reference: model, params, output, gotchas.
tool-info:detect_api_breaking_changesPer-tool reference: model, params, output, gotchas.
tool-info:detect_code_smellsPer-tool reference: model, params, output, gotchas.
tool-info:generate_diffPer-tool reference: model, params, output, gotchas.
tool-info:generate_documentationPer-tool reference: model, params, output, gotchas.
tool-info:generate_review_summaryPer-tool reference: model, params, output, gotchas.
tool-info:generate_test_planPer-tool reference: model, params, output, gotchas.
tool-info:load_filePer-tool reference: model, params, output, gotchas.
tool-info:refactor_codePer-tool reference: model, params, output, gotchas.
tool-info:verify_logicPer-tool reference: model, params, output, gotchas.
tool-info:web_searchPer-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