Skip to main content
Glama
longhz

MiniMax MCP Server

by longhz

web_search

Search the web to find answers, facts, or recent updates by providing a search query.

Instructions

使用 MiniMax 进行网络搜索

Args: query: 搜索查询词,例如 "OpenAI GPT-5 发布日期"

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
queryYes

Implementation Reference

  • MCP tool registration and entry point: the @mcp.tool() decorator registers 'web_search' as an MCP tool. It delegates to the actual implementation in tools/web_search.py.
    @mcp.tool()
    def web_search(query: str) -> dict:
        """使用 MiniMax 进行网络搜索
    
        Args:
            query: 搜索查询词,例如 "OpenAI GPT-5 发布日期"
        """
        from minimax_mcp.tools.web_search import web_search as _run
        return _run(get_client(), query)
  • Tool logic implementation: validates input, calls the HTTP client, and formats the search results from MiniMax API into structured output with title, url, snippet, date, and related searches.
    def web_search(client: MiniMaxClient, query: str) -> dict:
        """使用 MiniMax 进行网络搜索
    
        Args:
            client: MiniMax API 客户端
            query: 搜索查询词
    
        Returns:
            {
                success: bool,
                query: str,
                results: [{title, url, snippet, date?}],
                related_searches: [...],
            }
        """
        if not query or not query.strip():
            return {"success": False, "error": "query 不能为空"}
    
        result = client.web_search(query=query.strip())
    
        if not result.get("success"):
            return {
                "success": False,
                "query": query,
                "error": result.get("error", "Search failed"),
                "detail": result.get("detail", ""),
            }
    
        data = result.get("data", result)
    
        # 实际响应: {"organic": [{title, link, snippet, ...}]}
        search_results = data.get("organic", [])
        if isinstance(search_results, list):
            formatted = []
            for item in search_results:
                if isinstance(item, str):
                    formatted.append({"title": item, "url": "", "snippet": ""})
                elif isinstance(item, dict):
                    formatted.append({
                        "title": item.get("title", ""),
                        "url": item.get("link", item.get("url", "")),
                        "snippet": item.get("snippet", item.get("summary", "")),
                        "date": item.get("date", item.get("published", "")),
                    })
        else:
            formatted = []
    
        return {
            "success": True,
            "query": query,
            "results": formatted,
            "result_count": len(formatted),
            "related_searches": data.get("related_searches", []),
            "raw": result,
        }
  • HTTP client method that sends a POST request to MiniMax's /v1/coding_plan/search endpoint with the search query.
    def web_search(self, query: str) -> dict:
        """网络搜索
    
        POST {host}/v1/coding_plan/search
        Body: {"query": "..."}
        """
        return self._request("POST", "/v1/coding_plan/search", body={"q": query})
  • Resource listing confirms web_search is registered as a tool in the minimax-mcp service.
    "tools": ["query_quota", "web_search", "understand_image", "generate_image", "clear_vision_cache"],
    "config": cfg,
  • Docstring describing the API contract: POST to /v1/coding_plan/search with query parameter.
    """
    MCP Tool: web_search — MiniMax 网络搜索
    
    API: POST {host}/v1/coding_plan/search
    Body: {"query": "..."}
    """
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries full responsibility for behavioral disclosure. It only states the tool performs a web search without any details on behavior such as rate limits, cost, result format, or synchronous/asynchronous nature. This is insufficient.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is very concise, consisting of a clear header and an Args section with a single example. Every word serves a purpose, and it is front-loaded with the main action. No unnecessary information.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool is a web search, the description lacks crucial context such as what the search results contain, how many results are returned, whether pagination is supported, or any limitations. Even for a simple tool, more context would be helpful for an AI agent to use it effectively.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The input schema has one parameter 'query' with 0% description coverage. The description adds an example query (e.g., 'OpenAI GPT-5 release date'), which provides some context, but does not explain constraints like length limits, allowed formats, or language. This is moderate value.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states 'Use MiniMax for web search' and provides an example query, making the purpose immediately obvious. The tool name 'web_search' is descriptive, and no sibling tools perform web search, so distinction is clear.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description does not provide explicit guidance on when to use this tool versus alternatives. It only implies its use for web search, but lacks any context about when it is appropriate or not, or comparisons to sibling tools.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

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/longhz/minimax-mcp'

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