Skip to main content
Glama
garylab

Serper MCP Server

by garylab

google_search_reviews

Search Google for reviews using specific parameters like place ID, topic ID, and sorting options to find relevant user feedback.

Instructions

Search Google for results

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
fidYesThe FID
cidNoThe CID to search in
placeIdNoThe place ID to search in
sortByNoThe sort order to use (enum value as string: 'mostRelevant', 'newest', 'highestRating', 'lowestRating')mostRelevant
topicIdNoThe topic ID to search in
nextPageTokenNoThe next page token to use
glNoThe country to search in, e.g. us, uk, ca, au, etc.
hlNoThe language to search in, e.g. en, es, fr, de, etc.

Implementation Reference

  • Handler function that executes the google_search_reviews tool logic by constructing the Serper API URL (/reviews) from the tool name and delegating to fetch_json for the HTTP POST request.
    async def google(tool: SerperTools, request: BaseModel) -> Dict[str, Any]:
        uri_path = tool.value.split("_")[-1]
        url = f"https://google.serper.dev/{uri_path}"
        return await fetch_json(url, request)
  • Pydantic schema for input validation of google_search_reviews tool parameters.
    class ReviewsRequest(BaseModel):
        fid: str = Field(..., description="The FID")
        cid: Optional[str] = Field(None, description="The CID to search in")
        placeId: Optional[str] = Field(None, description="The place ID to search in")
        sortBy: Optional[str] = Field(
            "mostRelevant",
            pattern=r"^(mostRelevant|newest|highestRating|lowestRating)$",
            description="The sort order to use (enum value as string: 'mostRelevant', 'newest', 'highestRating', 'lowestRating')",
        )
        topicId: Optional[str] = Field(None, description="The topic ID to search in")
        nextPageToken: Optional[str] = Field(None, description="The next page token to use")
        gl: Optional[str] = Field(
            None, description="The country to search in, e.g. us, uk, ca, au, etc."
        )
        hl: Optional[str] = Field(
            None, description="The language to search in, e.g. en, es, fr, de, etc."
        )
  • Maps SerperTools enum values to input schema classes; maps GOOGLE_SEARCH_REVIEWS to ReviewsRequest for tool dispatch.
    google_request_map = {
        SerperTools.GOOGLE_SEARCH: SearchRequest,
        SerperTools.GOOGLE_SEARCH_IMAGES: SearchRequest,
        SerperTools.GOOGLE_SEARCH_VIDEOS: SearchRequest,
        SerperTools.GOOGLE_SEARCH_PLACES: AutocorrectRequest,
        SerperTools.GOOGLE_SEARCH_MAPS: MapsRequest,
        SerperTools.GOOGLE_SEARCH_REVIEWS: ReviewsRequest,
        SerperTools.GOOGLE_SEARCH_NEWS: SearchRequest,
        SerperTools.GOOGLE_SEARCH_SHOPPING: ShoppingRequest,
        SerperTools.GOOGLE_SEARCH_LENS: LensRequest,
        SerperTools.GOOGLE_SEARCH_SCHOLAR: AutocorrectRequest,
        SerperTools.GOOGLE_SEARCH_PATENTS: PatentsRequest,
        SerperTools.GOOGLE_SEARCH_AUTOCOMPLETE: AutocorrectRequest,
    }
  • Registers the google_search_reviews tool (via google_request_map) with MCP server, providing name, description, and input schema.
    @server.list_tools()
    async def list_tools() -> List[Tool]:
        tools = []
    
        for k, v in google_request_map.items():
            tools.append(
                Tool(
                    name=k.value,
                    description="Search Google for results",
                    inputSchema=v.model_json_schema(),
                ),
            )
    
        tools.append(Tool(
            name=SerperTools.WEBPAGE_SCRAPE,
            description="Scrape webpage by url",
            inputSchema=WebpageRequest.model_json_schema(),
        ))
    
        return tools
  • Dispatch logic in the main call_tool handler that routes google_search_reviews calls to the appropriate schema and google handler.
    if not SerperTools.has_value(name):
        raise ValueError(f"Tool {name} not found")
    
    tool = SerperTools(name)
    request = google_request_map[tool](**arguments)
    result = await google(tool, request)
    return [TextContent(text=json.dumps(result, indent=2), type="text")]
Behavior1/5

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

With no annotations provided, the description carries full burden for behavioral disclosure but offers none. It doesn't mention whether this is a read-only operation, what permissions might be needed, rate limits, pagination behavior (though 'nextPageToken' parameter hints at it), or what the response format looks like. For an 8-parameter tool with no annotation coverage, this is completely inadequate.

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

Conciseness2/5

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

While technically concise with only 4 words, this is under-specification rather than effective conciseness. The description fails to communicate essential information about the tool's purpose and behavior, making it inefficient despite its brevity.

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

Completeness1/5

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

For a complex tool with 8 parameters, no annotations, no output schema, and 11 similar sibling tools, the description is completely inadequate. It doesn't explain what the tool actually searches for (Google reviews), how it differs from other search tools, what the response contains, or any behavioral characteristics.

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?

Schema description coverage is 100%, so the schema already documents all 8 parameters thoroughly. The description adds no additional parameter information beyond what's in the schema. According to scoring rules, when schema coverage is high (>80%), the baseline is 3 even with no param info in the description.

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

Purpose2/5

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

The description 'Search Google for results' is tautological with the tool name 'google_search_reviews' and doesn't specify what kind of results (reviews) or differentiate from sibling tools like 'google_search' or 'google_search_places'. It restates the name without adding meaningful specificity about the resource being searched.

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

Usage Guidelines1/5

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

No guidance is provided about when to use this tool versus the 11 other search-related sibling tools. The description offers no context about alternatives, prerequisites, or appropriate use cases for review searches specifically.

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/garylab/serper-mcp-server'

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