Skip to main content
Glama

fetch_reviews

Get unprocessed Amazon reviews for any ASIN from 10 marketplaces. Use the output for your own analysis or to avoid duplicate API costs when calling analyze_reviews.

Instructions

Fetch raw Amazon reviews for an ASIN via the Shulex VOC API.

No analysis — returns the raw review array plus metadata. Use this when you want to plug reviews into your own analysis pipeline, or when you plan to call analyze_reviews later (avoids paying the Shulex API twice).

Args: asin: 10-character Amazon product ID (e.g. "B08N5WRWNW"). market: Market code (US, GB, DE, FR, IT, ES, JP, AU, CA, MX) or amazon.* domain ("amazon.co.uk"). Default: US. limit: Number of reviews to fetch (1-1000). Default: 100.

Returns: { "reviews": [{rating, title, body, date, verified, ...}, ...], "meta": {asin, market, total_available, fetched} }

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
asinYes
marketNoUS
limitNo

Implementation Reference

  • The core implementation of fetch_reviews: validates the ASIN, runs fetch.sh via _run_script, parses the JSON output, and returns the {reviews, meta} envelope.
    def fetch_reviews(asin: str, market: str = "US", limit: int = 100) -> dict[str, Any]:
        """Fetch raw Amazon reviews via the Shulex VOC API, no analysis."""
        asin = _validate_asin(asin)
        if limit < 1 or limit > 1000:
            raise ValueError(f"limit must be 1-1000, got {limit}")
    
        with tempfile.NamedTemporaryFile(
            prefix="mcp_fetch_", suffix=".json", delete=False, mode="w"
        ) as tmp:
            out_path = tmp.name
        try:
            _run_script(
                "fetch.sh",
                [asin, "--limit", str(limit), "--market", market, "--output", out_path],
            )
            with open(out_path, "r", encoding="utf-8") as f:
                data = json.load(f)
            # fetch.sh's output shape is already `{reviews: [...], meta: {...}}` —
            # pass through unchanged.
            return data
        finally:
            try:
                os.unlink(out_path)
            except OSError:
                pass
  • Registers fetch_reviews as an MCP tool via @mcp.tool() decorator; delegates to tools.fetch_reviews.
    @mcp.tool()
    def fetch_reviews(asin: str, market: str = "US", limit: int = 100) -> dict:
        """Fetch raw Amazon reviews for an ASIN via the Shulex VOC API.
    
        No analysis — returns the raw review array plus metadata. Use this when
        you want to plug reviews into your own analysis pipeline, or when you
        plan to call `analyze_reviews` later (avoids paying the Shulex API
        twice).
    
        Args:
            asin: 10-character Amazon product ID (e.g. "B08N5WRWNW").
            market: Market code (US, GB, DE, FR, IT, ES, JP, AU, CA, MX) or
                amazon.* domain ("amazon.co.uk"). Default: US.
            limit: Number of reviews to fetch (1-1000). Default: 100.
    
        Returns:
            {
              "reviews": [{rating, title, body, date, verified, ...}, ...],
              "meta": {asin, market, total_available, fetched}
            }
        """
        return tools.fetch_reviews(asin=asin, market=market, limit=limit)
  • FetchResult Pydantic model defining the output schema (reviews list + meta).
    class FetchResult(BaseModel):
        reviews: list[Review]
        meta: FetchMeta
  • FetchMeta Pydantic model for the meta field in the fetch result.
    class FetchMeta(BaseModel):
        asin: str
        market: str
        total_available: int = 0
        fetched: int = 0
  • Helper _validate_asin used by fetch_reviews to normalize and validate ASIN input.
    def _validate_asin(asin: str) -> str:
        """Validate ASIN shape. We accept lowercase from MCP clients but normalize
        to upper before passing to the shell scripts (which warn but proceed on
        lowercase) — this keeps our error messages clearer.
        """
        asin = asin.strip().upper()
        if not VALID_ASIN_RE.match(asin):
            raise ValueError(
                f"invalid ASIN {asin!r}: must be 10 alphanumeric characters (e.g. B08N5WRWNW)"
            )
        return asin
Behavior4/5

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

No annotations, but description fully discloses behavior: returns raw review array plus metadata, and implies read-only fetch. Could mention rate limits or auth, but overall transparent.

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?

Concise yet complete, with clear sections for overview, usage context, args, and returns. Every sentence adds value.

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?

Covers all necessary aspects given no annotations or output schema: purpose, parameters, return format, and relationship with sibling tools. No gaps.

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

Parameters5/5

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

Schema has 0% description coverage, but the description provides detailed semantics for all 3 parameters, including format, examples, defaults, and valid values.

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?

Clearly states 'Fetch raw Amazon reviews for an ASIN' with specific verb and resource, and distinguishes from siblings by emphasizing no analysis and returning raw data.

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

Usage Guidelines5/5

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

Explicitly describes when to use (for raw data or prior to analyze_reviews) and when not to (if analysis is needed elsewhere), with alternatives named.

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/mguozhen/voc-amazon-reviews'

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