Skip to main content
Glama
Moe03

Google Maps MCP Server

by Moe03

add_post

Create and publish text content to Google Maps locations. Use this tool to share information, updates, or reviews directly on Google Maps through the MCP server interface.

Instructions

Adds a simple text post.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
contentYesThe text content of the post to add.

Implementation Reference

  • The main handler function that executes the add_post tool logic: validates the content input, creates a new Post object with a timestamp-based ID, adds it to the in-memory posts array, and returns a success message with the new post ID.
    async function handleAddPost(content: string) {
      console.error(`Handling add_post request with content: \"${content}\"`); // Log to stderr
      if (!content || typeof content !== 'string' || content.trim().length === 0) {
        return {
            content: [{ type: "text", text: "Error: Post content cannot be empty." }],
            isError: true,
        };
      }
      
      // Actually add the post to our array
      const newPost: Post = {
        id: Date.now().toString(),
        content,
        timestamp: Date.now()
      };
      
      posts.push(newPost);
      
      return {
        content: [{ type: "text", text: `Success! Post added with ID: ${newPost.id}` }],
        isError: false,
      };
    }
  • Tool definition including name, description, and input schema (requiring a 'content' string). This is used for validation and provided in listTools response.
    const ADD_POST_TOOL: Tool = {
      name: "add_post",
      description: "Adds a simple text post.",
      inputSchema: {
        type: "object",
        properties: {
          content: {
            type: "string",
            description: "The text content of the post to add.",
          },
        },
        required: ["content"],
      },
    };
  • src/index.ts:77-82 (registration)
    The add_post tool (ADD_POST_TOOL) is registered in the SIMPLE_TOOLS array, which is 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:186-189 (registration)
    Dispatch case in the CallToolRequestSchema handler that extracts the 'content' argument and invokes the handleAddPost function.
    case "add_post": {
      const { content } = request.params.arguments as { content: string };
      return await handleAddPost(content);
    }
Behavior2/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It states the tool 'Adds' a post, implying a write operation, but doesn't cover permissions, side effects (e.g., if it triggers notifications), rate limits, or response format. This leaves significant gaps in understanding the tool's behavior.

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?

The description is a single, efficient sentence with no wasted words, clearly front-loading the core action. It's appropriately sized for a simple tool, making it easy to parse quickly.

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

Completeness2/5

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

For a write tool with no annotations and no output schema, the description is incomplete. It doesn't explain what happens after adding the post (e.g., success response, error handling, or returned data), nor does it address behavioral aspects like authentication needs or side effects, leaving key contextual gaps.

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?

Schema description coverage is 100%, with the parameter 'content' fully documented in the schema. The description adds no additional parameter details beyond what the schema provides, such as content constraints or examples. Baseline 3 is appropriate since the schema handles parameter documentation adequately.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the action ('Adds') and resource ('a simple text post'), making the purpose immediately understandable. However, it doesn't differentiate from sibling tools like 'get_posts' or 'delete_post' beyond the basic verb difference, missing explicit comparison.

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 is provided on when to use this tool versus alternatives like 'delete_post' or 'get_posts'. The description lacks context about prerequisites, such as authentication or post-creation workflows, leaving usage decisions ambiguous.

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/Moe03/mcp-hello-world'

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