Skip to main content
Glama
selvinchen97-lab

selvin-search-mcp

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault
SELVIN_MODELYesModel name to use (required)
ZHIPU_API_KEYNoAlternative to SELVIN_API_KEY for Zhipu
SELVIN_API_KEYNoYour API key for the provider
SELVIN_API_URLNoBase URL for the API (default: https://open.bigmodel.cn/api/paas/v4)https://open.bigmodel.cn/api/paas/v4
SELVIN_PROVIDERNoProvider type (default: zhipu)zhipu
SELVIN_MAX_TOKENSNoMaximum tokens for model output (default: 2600)2600
SELVIN_SEARCH_MODENoSearch mode: parallel, api, or model_online (default: parallel)parallel
ZHIPU_CONTENT_SIZENoContent size for Zhipu: high, medium, low (default: high)high
ZHIPU_SEARCH_COUNTNoNumber of search results (default: 5)5
SELVIN_ONLINE_MODELNoModel name for the alternative online model
ZHIPU_SEARCH_ENGINENoSearch engine for Zhipu (default: search_pro)search_pro
SELVIN_ONLINE_API_KEYNoAPI key for the alternative online model API
SELVIN_ONLINE_API_URLNoAlternative API URL for online model in parallel or model_online mode
SELVIN_FETCH_ONLINE_SOURCESNoWhether to fetch online source pages (default: true)true
ZHIPU_SEARCH_RECENCY_FILTERNoRecency filter: noLimit, day, week, month (default: noLimit)noLimit
SELVIN_API_CANCEL_GRACE_SECONDSNoGrace period for cancelling API search (default: 0.5)0.5
SELVIN_FETCH_ONLINE_SOURCE_CHARSNoMax characters to fetch per online source (default: 3000)3000
SELVIN_FETCH_ONLINE_SOURCE_COUNTNoMax number of online sources to fetch (default: 5)5

Capabilities

Features and capabilities supported by this server

CapabilityDetails
tools
{
  "listChanged": true
}
logging
{}
prompts
{
  "listChanged": false
}
resources
{
  "subscribe": false,
  "listChanged": false
}
extensions
{
  "io.modelcontextprotocol/ui": {}
}
experimental
{}

Tools

Functions exposed to the LLM to take actions

NameDescription
web_searchA
Performs a web search through the configured search mode and caches the source list.

PLANNING GATE: when `plan_session_id` is provided, this tool refuses to run until the
plan is complete (all required phases done, unverified_terms covered). If you intend to
skip planning (one-shot factual lookup), call this tool with an empty `plan_session_id`.

Returns:
  - session_id      string  pass to get_sources to retrieve full source list
  - content         string  answer from API-search summarization or online model search
  - sources_count   int
  - cached          bool    true if response was served from in-memory result cache
  - budget          object  (when plan_session_id set) actual vs estimated tool calls
get_sourcesA
When you feel confused or curious about the search response content, use the session_id returned by web_search to invoke the this tool to obtain the corresponding list of information sources.
Retrieve all cached sources for a previous web_search call.
Provide the session_id returned by web_search to get the full source list.
get_config_infoA
Returns current Selvin Search MCP server configuration and tests the configured upstream connectivity.

**Key Features:**
    - **Configuration Check:** Verifies environment variables and current settings.
    - **Connection Test:** Sends request to /web_search in api mode, /models in model_online mode, or both in parallel mode.

**Edge Cases & Best Practices:**
    - Use this tool first when debugging connection or configuration issues.
    - API keys are automatically masked for security in the response.
    - Connection test timeout is 10 seconds; network issues may cause delays.
switch_modelA
Switches the GLM-compatible model used for search summarization, persisting the setting.

**Key Features:**
    - **Model Selection:** Change the AI model for web search and content fetching.
    - **Persistent Storage:** Model preference saved to ~/.config/selvin-search/config.json.
    - **Immediate Effect:** New model used for all subsequent operations.

**Edge Cases & Best Practices:**
    - Use get_config_info to verify available models before switching.
    - Invalid model IDs may cause API errors in subsequent requests.
    - Model changes persist across sessions until explicitly changed again.
plan_intentA
Phase 1 of search planning: Analyze user intent. Call this FIRST to create a session.
Returns session_id for subsequent phases. Required flow:
plan_intent → plan_complexity → plan_sub_query(×N) → plan_search_term(×N) → plan_tool_mapping(×N) → plan_execution

Required phases depend on complexity: Level 1 = phases 1-3; Level 2 = phases 1-5; Level 3 = all 6.
plan_complexityA

Phase 2: Assess search complexity (1-3). Controls required phases: Level 1 = phases 1-3; Level 2 = phases 1-5; Level 3 = all 6.

plan_sub_queryA

Phase 3: Submit ALL sub-queries in ONE call (batch).

items_json: JSON array, each element shape: {"id":"sq1","goal":"...","expected_output":"...","boundary":"...", "depends_on":["sq0"],"tool_hint":"web_search"}

Validation enforced by the engine:

  • ids must be unique

  • depends_on must reference declared ids

  • no cycles in depends_on graph

  • duplicate id → error returned, batch rejected

Set is_revision=true to replace any previously submitted decomposition.

plan_search_termA

Phase 4: Submit ALL search terms in ONE call (batch).

terms_json: JSON array, each element shape: {"term":"react server components 2025","purpose":"sq1","round":1}

Strict rules (enforced):

  • term MUST be ≤8 words (engine rejects otherwise)

  • purpose MUST reference a declared sub-query id

  • one term per (purpose, round); add multiple rounds for follow-up refinement

approach (broad_first | narrow_first | targeted) and fallback_plan are strategy-level; pass them as top-level params, not inside terms.

plan_tool_mappingA

Phase 5: Submit ALL sub-query → tool mappings in ONE call (batch).

mappings_json: JSON array, each element shape: {"sub_query_id":"sq1","tool":"web_search","reason":"...", "params":{"platform":"GitHub"}}

tool must be: web_search.

plan_executionC

Phase 6: Define execution order. parallel_groups: semicolon-separated groups of comma-separated IDs (e.g., 'sq1,sq2;sq3').

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/selvinchen97-lab/GLM-search-mcp'

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