google_search_reviews
Retrieve Google reviews for a business or place using identifiers like FID, CID, or place ID. Filter results by language, country, sort order, and paginate through pages.
Instructions
Search Google for results
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"fid": "<fid>"
},
"name": "google_search_reviews"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| fid | Yes | The FID | |
| cid | No | The CID to search in | |
| placeId | No | The place ID to search in | |
| sortBy | No | The sort order to use (enum value as string: 'mostRelevant', 'newest', 'highestRating', 'lowestRating') | mostRelevant |
| topicId | No | The topic ID to search in | |
| nextPageToken | No | The next page token to use | |
| gl | No | The country to search in, e.g. us, uk, ca, au, etc. | |
| hl | No | The language to search in, e.g. en, es, fr, de, etc. |
Implementation Reference
- src/serper_mcp_server/server.py:25-32 (registration)Registration mapping: GOOGLE_SEARCH_REVIEWS is mapped to ReviewsRequest in google_request_map, used to register the tool via list_tools()
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, - ReviewsRequest schema: Pydantic model defining input fields (fid required, cid, placeId, sortBy, topicId, nextPageToken, gl, hl optional) for the google_search_reviews tool
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." ) - src/serper_mcp_server/server.py:62-82 (handler)Handler call_tool: when name='google_search_reviews', it creates a ReviewsRequest from arguments, then calls google(tool, request) which sends to the Serper API
@server.call_tool() async def call_tool(name: str, arguments: dict[str, Any]) -> Sequence[TextContent | ImageContent | EmbeddedResource]: if not SERPER_API_KEY: return [TextContent(text=f"SERPER_API_KEY is empty!", type="text")] try: if name == SerperTools.WEBPAGE_SCRAPE.value: request = WebpageRequest(**arguments) result = await scape(request) return [TextContent(text=json.dumps(result, indent=2), type="text")] 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")] except Exception as e: return [TextContent(text=f"Error: {str(e)}", type="text")] - src/serper_mcp_server/core.py:14-17 (helper)Helper function google(): derives the API endpoint from the tool name suffix (e.g. 'reviews'), builds URL, and calls fetch_json to POST to Serper API
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)