Skip to main content
Glama
localseodata

Local SEO Data

Official

google_reviews

Read-only

Get Google reviews for a business by name and location, including review text, rating, date, author, and owner replies with sort options.

Instructions

Get Google reviews for a business. Returns review text, rating, date, author, and owner replies. Costs 1 credit per 10 reviews. Note: this tool may take 10-30 seconds to return — this is normal, not an error.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
business_nameYesBusiness name
locationYesCity and state
limitNoNumber of reviews (1-100). Default: 10
sortNoSort order. Default: newest

Implementation Reference

  • Handler function for google_reviews tool. Calls the /v1/reviews/google API endpoint with business_name, location, optional limit and sort parameters, then formats the result.
    withErrorHandling(async ({ business_name, location, limit, sort }) => {
      const result = await callApi(
        "/v1/reviews/google",
        { business_name, location, ...(limit && { limit }), ...(sort && { sort }) },
        getAuth()
      );
      return { content: [{ type: "text" as const, text: formatResult(result.data, result) }] };
    })
  • Input schema for google_reviews tool, defined with Zod. Requires business_name and location strings; optional limit (1-100 integer) and sort (newest/highest/lowest/most_relevant).
    {
      business_name: z.string().describe("Business name"),
      location: z.string().describe("City and state"),
      limit: z.number().int().min(1).max(100).optional().describe("Number of reviews (1-100). Default: 10"),
      sort: z.enum(["newest", "highest", "lowest", "most_relevant"]).optional().describe("Sort order. Default: newest"),
    },
  • Registration of google_reviews tool via server.tool() call in registerReviewTools function, with name, description, schema, READ_ONLY hint, and handler.
    server.tool(
      "google_reviews",
      "Get Google reviews for a business. Returns review text, rating, date, author, and owner replies. Costs 1 credit per 10 reviews. Note: this tool may take 10-30 seconds to return — this is normal, not an error.",
      {
        business_name: z.string().describe("Business name"),
        location: z.string().describe("City and state"),
        limit: z.number().int().min(1).max(100).optional().describe("Number of reviews (1-100). Default: 10"),
        sort: z.enum(["newest", "highest", "lowest", "most_relevant"]).optional().describe("Sort order. Default: newest"),
      },
      READ_ONLY,
      withErrorHandling(async ({ business_name, location, limit, sort }) => {
        const result = await callApi(
          "/v1/reviews/google",
          { business_name, location, ...(limit && { limit }), ...(sort && { sort }) },
          getAuth()
        );
        return { content: [{ type: "text" as const, text: formatResult(result.data, result) }] };
      })
    );
  • src/server.ts:37-37 (registration)
    Top-level registration: registerReviewTools is called in createMcpServer to wire up all review tools including google_reviews.
    registerReviewTools(server, getAuth);
  • Helper that wraps the handler to catch errors and return them as MCP error content.
    export function withErrorHandling<T>(
      fn: (args: T) => Promise<ToolResult>
    ): (args: T) => Promise<ToolResult> {
      return async (args) => {
        try {
          return await fn(args);
        } catch (err) {
          const message = err instanceof Error ? err.message : String(err);
          console.error(`[mcp] Tool error: ${message}`);
          return {
            content: [{ type: "text" as const, text: `Error: ${message}` }],
            isError: true,
          };
        }
      };
    }
Behavior4/5

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

Annotations already indicate readOnlyHint=true and destructiveHint=false. The description adds value by disclosing latency (10-30 seconds) and credit cost, which are behavioral beyond annotations. No contradictions.

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?

Two sentences plus a note, highly efficient and front-loaded. Every sentence adds value: purpose, return fields, cost, and latency note. No unnecessary text.

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

Completeness4/5

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

Given no output schema, the description explains return fields (review text, rating, date, author, owner replies) and mentions limit/sort behavior. Lacks pagination details or total count, but sufficient for understanding core functionality.

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?

Input schema has 100% description coverage for all 4 parameters. The description adds no additional semantic meaning beyond what the schema provides (e.g., business_name, location, limit, sort), so baseline of 3 is appropriate.

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 'Get Google reviews for a business' with specific detail on returned fields (review text, rating, date, author, owner replies). This distinguishes it from sibling tools like 'multi_platform_reviews' by specifying the platform, though not explicitly compared.

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 provides cost (1 credit per 10 reviews) and latency warnings (10-30 seconds) but no explicit guidance on when to use this tool versus alternatives like 'multi_platform_reviews' or 'review_velocity'. Usage is implied but not directly compared.

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

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