get_posts
Retrieve all posts via the Google Maps MCP Server to access structured data and enhance functionality for geocoding, place search, and routing.
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 logs the number of posts and returns all posts as a formatted JSON string in the tool response format.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)The Tool object defining the metadata, description, and empty input schema for the get_posts tool.const GET_POSTS_TOOL: Tool = { name: "get_posts", description: "Retrieves all posts.", inputSchema: { type: "object", properties: {}, required: [], }, };
- src/index.ts:77-82 (registration)The array where GET_POSTS_TOOL is registered alongside other tools, used in the ListTools response.const SIMPLE_TOOLS = [ GET_WEATHER_TOOL, ADD_POST_TOOL, GET_POSTS_TOOL, DELETE_POST_TOOL, ] as const;
- src/index.ts:191-193 (registration)The switch case in the CallToolRequestSchema handler that registers and invokes the get_posts handler.case "get_posts": { return await handleGetPosts(); }