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
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/index.ts:121-131 (handler)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, }; }
- src/index.ts:52-60 (schema)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(); }