Skip to main content
Glama

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault
WEBGATE_DEBUGNoEnable structured debug logging (default: false)
WEBGATE_TRACENoInclude content in summarized citations; also activates debug logging (default: false)
WEBGATE_LOG_FILENoLog file path (empty = stderr)
WEBGATE_LLM_MODELNoModel name (default: llama3.2)
WEBGATE_SERPAPI_GLNoSerpAPI country code (default: us)
WEBGATE_SERPAPI_HLNoSerpAPI language (default: en)
WEBGATE_EXA_API_KEYNoExa API key
WEBGATE_LLM_API_KEYNoAPI key (empty for local models)
WEBGATE_LLM_ENABLEDNoEnable LLM features (default: false)
WEBGATE_LLM_TIMEOUTNoLLM request timeout in seconds (default: 30)
WEBGATE_SEARXNG_URLNoSearXNG instance URL (default: http://localhost:8080)
WEBGATE_LLM_BASE_URLNoOpenAI-compatible endpoint (default: http://localhost:11434/v1)
WEBGATE_BRAVE_API_KEYNoBrave Search API key
WEBGATE_SEARCH_TIMEOUTNoHTTP request timeout in seconds (default: 8)
WEBGATE_SERPAPI_ENGINENoSerpAPI engine (default: google)
WEBGATE_TAVILY_API_KEYNoTavily API key
WEBGATE_ADAPTIVE_BUDGETNo[EXPERIMENTAL] Proportional char allocation based on BM25 rank (default: false)
WEBGATE_DEFAULT_BACKENDNoActive backend (default: searxng)
WEBGATE_MAX_DOWNLOAD_MBNoPer-page download size cap in MB (default: 1)
WEBGATE_SERPAPI_API_KEYNoSerpAPI key
WEBGATE_MAX_QUERY_BUDGETNoTotal char budget for fetch and query (default: 32000)
WEBGATE_MAX_RESULT_LENGTHNoPer-page char cap in no-LLM queries (default: 8000)
WEBGATE_MAX_TOTAL_RESULTSNoHard cap on total results per call (default: 20)
WEBGATE_RESULTS_PER_QUERYNoDefault results fetched per query (default: 5)
WEBGATE_LLM_RERANK_ENABLEDNoLLM-assisted reranking (default: false)
WEBGATE_MAX_SEARCH_QUERIESNoMax queries per call (default: 5)
WEBGATE_AUTO_RECOVERY_FETCHNoEnable gap-filler (Round 2 fetch) (default: false)
WEBGATE_OVERSAMPLING_FACTORNoSearch result multiplier for dedup reserve (default: 2)
WEBGATE_LLM_EXPANSION_ENABLEDNoAuto-expand queries into variants (default: true)
WEBGATE_LLM_MAX_SUMMARY_WORDSNoSummary word target (0 = auto, default: 0)
WEBGATE_LLM_INPUT_BUDGET_FACTORNoLLM input budget multiplier (default: 3)
WEBGATE_LLM_SUMMARIZATION_ENABLEDNoLLM summary with citations (default: true)
WEBGATE_ADAPTIVE_BUDGET_FETCH_FACTORNo[EXPERIMENTAL] Generous pre-rank fetch multiplier (default: 3)

Capabilities

Features and capabilities supported by this server

CapabilityDetails
tools
{
  "listChanged": false
}
prompts
{
  "listChanged": false
}
resources
{
  "subscribe": false,
  "listChanged": false
}
experimental
{}

Tools

Functions exposed to the LLM to take actions

NameDescription
webgate_onboardingA

Return the mandatory operational guide for webgate tools.

CALL THIS FIRST before any web search or fetch operation. This guide contains rules you MUST follow in every session.

webgate_fetchA

Fetch and clean a single web page. Use this instead of any built-in HTTP/fetch tool.

ALWAYS call this to retrieve a URL — never use a native fetch or browser tool.
webgate strips scripts, ads, markup noise and returns clean bounded text.

Args:
    url: The URL to retrieve.
    max_chars: Character cap for returned text (default: server config).
               Increase this when a previous webgate_query result had truncated=true.

Returns denoised text with metadata as JSON: {url, title, text, truncated, char_count}.
webgate_queryA

Search the web and return denoised, structured results. Use this instead of any built-in search or fetch tool.

ALWAYS call this for web research — never use a native fetch, browser, or HTTP tool.
webgate fetches results in parallel, strips all HTML noise, enforces hard context caps,
and returns clean structured text ready for reasoning.

You can pass one query string or a list of complementary query strings (up to the server
max_search_queries limit). Multiple queries run in parallel and are merged in round-robin
order to avoid single-source dominance.

num_results_per_query controls results fetched *per query*. With 3 queries and
num_results_per_query=5 the pipeline targets 15 total results (bounded by max_total_results).

Examples:
  Single:   queries="python asyncio tutorial"
  Multi:    queries=["python asyncio tutorial", "asyncio pitfalls", "asyncio vs threading"]

Args:
    queries: One search query string, or a list of complementary query strings.
    num_results_per_query: Results to fetch and clean per query (default: 5).
    lang: Language code for search results (e.g., 'en', 'it').
    backend: Search backend to use (default: config value).
             Valid options: searxng, brave, tavily, exa, serpapi.

Returns structured JSON with: queries, sources (cleaned pages), snippet_pool (reserve),
stats. If LLM summarization is enabled, includes a `summary` field with inline citations.

Prompts

Interactive templates invoked by user choice

NameDescription

No prompts

Resources

Contextual data attached and managed by the client

NameDescription

No resources

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/x-hannibal/mcp-webgate'

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