Skip to main content
Glama

list_gbp_locations

Retrieve all Google Business Profile locations linked to a specified GBP account. Use this to manage and view your business listings.

Instructions

List Google Business Profile locations for a connected GBP account

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
socialMediaIdYesGBP account ID (from list_accounts)

Implementation Reference

  • The tool handler for 'list_gbp_locations'. Calls client.get<GbpLocation[]> on /social-media/${socialMediaId}/gbp-locations to fetch GBP locations for a given social media account.
    server.tool(
      'list_gbp_locations',
      'List Google Business Profile locations for a connected GBP account',
      {
        socialMediaId: z
          .string()
          .uuid()
          .describe('GBP account ID (from list_accounts)'),
      },
      async (input) => {
        const data = await client.get<GbpLocation[]>(
          `/social-media/${input.socialMediaId}/gbp-locations`,
        );
    
        return {
          content: [{ type: 'text' as const, text: JSON.stringify(data, null, 2) }],
        };
      },
    );
  • The registerAccountTools function registers the 'list_gbp_locations' tool (along with other account tools) on the MCP server via server.tool(). The tool is registered with name 'list_gbp_locations' and a zod schema for socialMediaId.
    export function registerAccountTools(
      server: McpServer,
      client: PostFastClient,
    ) {
      server.tool(
        'list_accounts',
        'List all social media accounts connected to the workspace',
        {},
        async () => {
          const data = await client.get<SocialAccount[]>(
            '/social-media/my-social-accounts',
          );
    
          return {
            content: [{ type: 'text' as const, text: JSON.stringify(data, null, 2) }],
          };
        },
      );
    
      server.tool(
        'list_pinterest_boards',
        'List Pinterest boards for a connected Pinterest account',
        {
          socialMediaId: z
            .string()
            .uuid()
            .describe('Pinterest account ID (from list_accounts)'),
        },
        async (input) => {
          const data = await client.get<PinterestBoard[]>(
            `/social-media/${input.socialMediaId}/pinterest-boards`,
          );
    
          return {
            content: [{ type: 'text' as const, text: JSON.stringify(data, null, 2) }],
          };
        },
      );
    
      server.tool(
        'list_youtube_playlists',
        'List YouTube playlists for a connected YouTube account',
        {
          socialMediaId: z
            .string()
            .uuid()
            .describe('YouTube account ID (from list_accounts)'),
        },
        async (input) => {
          const data = await client.get<YouTubePlaylist[]>(
            `/social-media/${input.socialMediaId}/youtube-playlists`,
          );
    
          return {
            content: [{ type: 'text' as const, text: JSON.stringify(data, null, 2) }],
          };
        },
      );
    
      server.tool(
        'list_gbp_locations',
        'List Google Business Profile locations for a connected GBP account',
        {
          socialMediaId: z
            .string()
            .uuid()
            .describe('GBP account ID (from list_accounts)'),
        },
        async (input) => {
          const data = await client.get<GbpLocation[]>(
            `/social-media/${input.socialMediaId}/gbp-locations`,
          );
    
          return {
            content: [{ type: 'text' as const, text: JSON.stringify(data, null, 2) }],
          };
        },
      );
  • The GbpLocation type definition used as the return type for list_gbp_locations. Fields: id, locationId, title, address, mapsUri.
    export interface GbpLocation {
      id: string;
      locationId: string;
      title: string;
      address: string | null;
      mapsUri: string | null;
    }
  • gbpLocationId parameter in the create_post tool references list_gbp_locations as the source for GBP location resource names.
    gbpLocationId: z.string().optional().describe('GBP location resource name (from list_gbp_locations)'),
  • src/index.ts:7-7 (registration)
    Import of registerAccountTools which registers the list_gbp_locations tool.
    import { registerAccountTools } from './tools/accounts.js';
Behavior3/5

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

With no annotations, the description only indicates a read operation ('List'), but provides no details about pagination, rate limits, or output format.

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?

A single, front-loaded sentence with no wasted words; highly efficient.

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

Completeness3/5

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

For a simple list tool, the description is adequate but omits the prerequisite of needing a connected account from list_accounts, which is important for correct 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?

The input schema is fully described (100% coverage), so the description adds no extra meaning beyond what the parameter description already provides.

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 explicitly states the action 'List' and the resource 'Google Business Profile locations', clearly distinguishing it from sibling tools like list_accounts or list_pinterest_boards.

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

Usage Guidelines2/5

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

No guidance on when to use this tool vs alternatives; it does not mention that a preceding call to list_accounts is needed to obtain the socialMediaId parameter.

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/peturgeorgievv-factory/postfast-mcp'

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