Skip to main content
Glama
Moe03

Google Maps MCP Server

by Moe03

get_posts

Retrieve location-based posts from Google Maps to access user reviews, photos, and updates for places of interest.

Instructions

Retrieves all posts.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The main handler function that executes the get_posts tool logic. Logs the number of posts and returns a JSON string of all posts.
    async function handleGetPosts() { console.error(`Handling get_posts request, found ${posts.length} posts`); return { content: [{ type: "text", text: JSON.stringify(posts, null, 2) }], isError: false, }; }
  • Tool schema definition with name, description, and empty input schema (no parameters required).
    const GET_POSTS_TOOL: Tool = { name: "get_posts", description: "Retrieves all posts.", inputSchema: { type: "object", properties: {}, required: [], }, };
  • src/index.ts:77-82 (registration)
    Registration of the get_posts tool (as GET_POSTS_TOOL) in the array of tools returned by the ListTools handler.
    const SIMPLE_TOOLS = [ GET_WEATHER_TOOL, ADD_POST_TOOL, GET_POSTS_TOOL, DELETE_POST_TOOL, ] as const;
  • src/index.ts:191-193 (registration)
    Dispatch/registration of get_posts tool call to the handleGetPosts handler in the CallToolRequestSchema switch statement.
    case "get_posts": { return await handleGetPosts(); }
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/Moe03/mcp-hello-world'

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