Skip to main content
Glama
miqui

yelp-mcp-min

by miqui

get_business_reviews

Read-onlyIdempotent

Retrieve customer reviews for a Yelp business, including text excerpts and star ratings. Supports pagination and sorting by date or rating.

Instructions

Retrieve user reviews for a specific Yelp business.

Use this when the user wants to read what customers say about a business: sentiment, specific comments about food, service, or atmosphere. Returns up to 50 reviews per call with text excerpts, star ratings, and reviewer info.

The 'total' field in the response shows how many reviews exist in full; use 'offset' to paginate through them.

Raises an error if the business ID does not exist on Yelp.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
paramsYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
reviewsNo
totalNo
possible_languagesNo

Implementation Reference

  • The async function get_business_reviews that implements the tool logic: accepts ReviewsParams, builds query params, calls YelpClient.get('businesses/{id}/reviews', ...), and returns BusinessReviewsResult.
    async def get_business_reviews(params: ReviewsParams) -> BusinessReviewsResult:
        """Retrieve user reviews for a specific Yelp business.
    
        Use this when the user wants to read what customers say about a
        business: sentiment, specific comments about food, service, or
        atmosphere.  Returns up to 50 reviews per call with text excerpts,
        star ratings, and reviewer info.
    
        The 'total' field in the response shows how many reviews exist in full;
        use 'offset' to paginate through them.
    
        Raises an error if the business ID does not exist on Yelp.
        """
        query: dict[str, object] = {
            "limit": params.limit,
            "offset": params.offset,
        }
        if params.locale:
            query["locale"] = params.locale
        if params.sort_by:
            query["sort_by"] = params.sort_by
    
        logger.info("get_business_reviews", business_id=params.business_id)
        raw = await client.get(
            f"businesses/{params.business_id}/reviews",
            params=query,
        )
        return BusinessReviewsResult.model_validate(raw)
  • ReviewsParams model - input schema for the tool with fields: business_id (required), locale, sort_by, limit (1-50), offset (>=0).
    class ReviewsParams(BaseModel):
        business_id: str = Field(
            ...,
            description=(
                "Yelp business ID or alias. "
                "Obtain from search_businesses, find_business_by_phone, or match_business."
            ),
        )
        locale: str | None = Field(
            default=None,
            description=(
                "BCP 47 locale to filter reviews by language, e.g. 'en_US', 'es_MX'. "
                "Defaults to all languages."
            ),
        )
        sort_by: str | None = Field(
            default=None,
            description=(
                "Sort order for reviews: 'yelp_sort' (default), 'newest', 'oldest', "
                "'highest_rated', or 'lowest_rated'."
            ),
        )
        limit: int = Field(
            default=20,
            ge=1,
            le=50,
            description="Number of reviews to return (1–50, default 20).",
        )
        offset: int = Field(
            default=0,
            ge=0,
            description=(
                "Zero-based offset for pagination. "
                "Use with limit to page through all reviews."
            ),
        )
  • BusinessReviewsResult model - output schema returned by get_business_reviews, containing reviews list, total count, and possible_languages.
    class BusinessReviewsResult(_YelpBase):
        """Wrapper returned by get_business_reviews."""
    
        reviews: list[Review] = Field(default_factory=list)
        total: int = 0
        possible_languages: list[str] = Field(default_factory=list)
  • Supporting ReviewUser and Review models used within BusinessReviewsResult to represent individual review entries.
    class ReviewUser(BaseModel):
        model_config = ConfigDict(extra="ignore")
    
        id: str | None = None
        profile_url: str | None = None
        image_url: str | None = None
        name: str | None = None
    
    
    class Review(_YelpBase):
        id: str
        url: str | None = None
        text: str | None = None
        rating: int | None = None
        time_created: str | None = None
        user: ReviewUser | None = None
  • The register() function that decorates get_business_reviews with @mcp.tool(...) to register it on the FastMCP instance, with readOnlyHint and idempotentHint annotations.
    def register(mcp: FastMCP, client: YelpClient) -> None:
        """Register the get_business_reviews tool on the FastMCP instance."""
    
        @mcp.tool(
            annotations={
                "readOnlyHint": True,
                "idempotentHint": True,
            }
        )
Behavior5/5

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

Beyond annotations (readOnlyHint, idempotentHint), the description discloses important behaviors: returns up to 50 reviews, pagination via offset, total field, and error handling. No contradictions with annotations.

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 concise—five short sentences, each valuable. It is front-loaded with the main purpose and organized logically (purpose, usage, behavior, error).

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

Completeness5/5

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

For a tool with an output schema, the description adequately mentions return fields (text excerpts, star ratings, reviewer info), pagination behavior, and error conditions. It is complete for an AI agent to understand usage.

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?

While the input schema provides rich descriptions for all parameters (e.g., locale, sort_by), the tool description adds minimal new information beyond summarizing pagination. Given the schema's thoroughness, the description provides adequate but not exceptional additional meaning.

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 'Retrieve user reviews for a specific Yelp business,' using a specific verb and resource. It distinguishes itself from sibling tools (like get_business or search_businesses) by focusing solely on reviews.

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

Usage Guidelines4/5

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

It explicitly says 'Use this when the user wants to read what customers say about a business,' which provides clear context. It also mentions an error condition if the business ID doesn't exist, but does not exclude other scenarios.

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/miqui/yelp-mcp-min'

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