Skip to main content
Glama
Jem-HR
by Jem-HR

send_location

Share location coordinates via WhatsApp messages to provide directions or meeting points using latitude and longitude data.

Instructions

Send a location message.

Args: to: Phone number or WhatsApp ID latitude: Latitude of the location longitude: Longitude of the location name: Optional location name address: Optional location address reply_to_message_id: Message ID to reply to

Returns: Dictionary with success status and message ID

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
toYes
latitudeYes
longitudeYes
nameNo
addressNo
reply_to_message_idNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The send_location tool handler function registered with @mcp.tool() decorator. Takes parameters (to, latitude, longitude, name, address, reply_to_message_id), calls wa_client.send_location(), and returns success status with message ID.
    @mcp.tool()
    async def send_location(
        to: str,
        latitude: float,
        longitude: float,
        name: Optional[str] = None,
        address: Optional[str] = None,
        *,
        reply_to_message_id: Optional[str] = None,
    ) -> dict:
        """
        Send a location message.
        
        Args:
            to: Phone number or WhatsApp ID
            latitude: Latitude of the location
            longitude: Longitude of the location
            name: Optional location name
            address: Optional location address
            reply_to_message_id: Message ID to reply to
        
        Returns:
            Dictionary with success status and message ID
        """
        try:
            result = wa_client.send_location(
                to=to,
                latitude=latitude,
                longitude=longitude,
                name=name,
                address=address,
                reply_to_message_id=reply_to_message_id,
            )
            
            logger.info(f"Location sent to {to}")
            message_id = getattr(result, 'id', str(result)) if result else None
            return {"success": True, "message_id": message_id}
        except Exception as e:
            logger.error(f"Failed to send location: {str(e)}")
            return {"success": False, "error": str(e)}
Behavior2/5

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

With no annotations provided, the description carries full burden for behavioral disclosure. While 'Send' implies a write operation, it doesn't specify whether this requires specific permissions, whether it's rate-limited, what happens on failure, or if the location is shared immediately or queued. The return value mention is helpful but minimal.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is efficiently structured with a clear purpose statement followed by organized parameter and return sections. Every sentence serves a purpose with no redundant information. The formatting with 'Args:' and 'Returns:' headers makes it scannable, though it could be more front-loaded with critical context.

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 messaging tool with 6 parameters, no annotations, and an output schema, the description covers the basics but has significant gaps. It documents parameters adequately but lacks behavioral context about permissions, limitations, or error handling. The presence of an output schema reduces the need to describe return values, but more operational guidance would be beneficial.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

With 0% schema description coverage, the description compensates well by listing all 6 parameters with brief explanations. It clarifies that 'to' accepts 'Phone number or WhatsApp ID', distinguishes between required coordinates and optional metadata, and explains reply_to_message_id purpose. However, it doesn't provide format details or constraints beyond basic types.

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 tool's purpose as 'Send a location message' which is a specific verb+resource combination. It distinguishes itself from siblings like send_message or send_contact by specifying it sends location data rather than text or contact information. However, it doesn't explicitly contrast with request_location which might be a complementary tool.

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?

The description provides no guidance on when to use this tool versus alternatives. It doesn't mention when to choose send_location over send_message with location text, or how it relates to request_location. There's no context about appropriate use cases or prerequisites beyond what's implied by the parameters.

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/Jem-HR/pywa-mcp-server'

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