SK

skill-gemini-google-maps-tool

Links the Gemini model to Google Maps to retrieve location data for business searches or itineraries.

Install

mkdir -p .claude/skills/skill-gemini-google-maps-tool && curl -L -o skill.zip "https://agentskills.codes/api/skills/download/311" && unzip -o skill.zip -d .claude/skills/skill-gemini-google-maps-tool && rm skill.zip

Installs to .claude/skills/skill-gemini-google-maps-tool

Activation

This is the description your AI agent reads to decide when to run this skill — the better it matches your request, the more reliably it fires.

Query Gemini with Google Maps grounding
39 charsno explicit “when” trigger
Beginner

Key capabilities

  • Query Gemini with Google Maps grounding
  • Generate travel itineraries with place-specific data
  • Retrieve location-aware business recommendations
  • Output results in JSON or Markdown format
  • Enable shell tab-completion

How it works

The tool connects the Gemini model to the Google Maps database of 250+ million places to provide location-aware responses. It supports grounding metadata and coordinate-based context for personalized results.

Inputs & outputs

You give it
A natural language query about places or locations
You get back
A grounded response with location details and source citations

When to use skill-gemini-google-maps-tool

  • Getting local business recommendations
  • Generating travel itineraries
  • Integrating maps data into apps

About this skill

When to use

  • When you need location-aware AI responses about places
  • When you need recommendations for restaurants, hotels, attractions
  • When you need accurate, up-to-date information from Google Maps

Gemini Google Maps Tool Skill

Purpose

Comprehensive guide for using gemini-google-maps-tool, a CLI and Python library that connects Gemini to Google Maps' database of 250+ million places worldwide for location-aware responses with accurate, up-to-date information.

When to Use This Skill

Use this skill when:

  • Querying for location-based recommendations (restaurants, hotels, attractions)
  • Generating itineraries with place-specific information
  • Building applications that need location-aware AI responses
  • Integrating Google Maps data into AI workflows
  • Creating travel, food, or local business applications

Do NOT use this skill for:

  • General Gemini queries without location context
  • Tasks that don't involve places or geographical information
  • Direct Google Maps API queries (this uses Gemini with Maps grounding)

CLI Tool: gemini-google-maps-tool

A production-ready CLI and Python library for querying Gemini with Google Maps grounding.

Installation

# Install globally with uv tool
uv tool install gemini-google-maps-tool

# Or from source
git clone https://github.com/dnvriend/gemini-google-maps-tool.git
cd gemini-google-maps-tool
uv tool install .

Prerequisites

Quick Start

# Set API key
export GEMINI_API_KEY="your-api-key"

# Basic query
gemini-google-maps-tool query "Best coffee shops in Amsterdam"

# With location context
gemini-google-maps-tool query "Italian restaurants nearby" \
  --lat-lon "52.37,4.89"

# Markdown output with sources
gemini-google-maps-tool query "Museums in Paris" --text

Progressive Disclosure

<details> <summary><strong>📖 Core Commands (Click to expand)</strong></summary>

query - Query Gemini with Google Maps Grounding

Query Gemini with Google Maps integration for location-aware information about places, businesses, directions, and attractions.

Usage:

gemini-google-maps-tool query "QUERY" [OPTIONS]

Arguments:

  • QUERY: The search query (required unless using --stdin)
  • --lat-lon LAT,LON: Location coordinates in format "lat,lon" (e.g., "37.78193,-122.40476")
  • --model {flash|flash-lite}: Model selection
    • flash: gemini-2.5-flash (more powerful, higher cost)
    • flash-lite: gemini-2.5-flash-lite (default, faster, cost-effective)
  • -v, --verbose: Enable INFO logging (operation-level details)
  • -vv: Enable DEBUG logging (detailed API calls, validation)
  • -vvv: Enable TRACE logging (full HTTP traces, library internals)
  • --text / -t: Output markdown text instead of JSON
  • --stdin / -s: Read query from stdin

Examples:

# Basic query
gemini-google-maps-tool query "Best coffee shops in Amsterdam"

# With location context
gemini-google-maps-tool query "Italian restaurants nearby" \
  --lat-lon "52.37,4.89"

# Using different model
gemini-google-maps-tool query "Plan a day in NYC" --model flash

# Markdown output with sources
gemini-google-maps-tool query "Best museums in Paris" --text

# Verbose mode with grounding metadata
gemini-google-maps-tool query "Sushi restaurants" -v

# Debug mode with full details
gemini-google-maps-tool query "Hotels in London" -vv

# Trace mode with HTTP details
gemini-google-maps-tool query "Attractions in Rome" -vvv

# Reading from stdin (for pipelines)
echo "Best bakeries in San Francisco" | \
  gemini-google-maps-tool query --stdin

# Pipeline with jq
gemini-google-maps-tool query "Coffee shops" | \
  jq '.response_text'

Output Formats:

JSON (default):

{
  "response_text": "Here are some great coffee shops...",
  "grounding_metadata": {
    "grounding_chunks": [
      {
        "title": "Blue Bottle Coffee",
        "uri": "https://maps.google.com/?cid=...",
        "place_id": "places/ChIJ..."
      }
    ]
  }
}

Markdown (with --text):

Here are some great coffee shops...

---

## Sources

1. [Blue Bottle Coffee](https://maps.google.com/?cid=...)
2. [Philz Coffee](https://maps.google.com/?cid=...)

completion - Generate Shell Completion Scripts

Generate shell completion scripts for Bash, Zsh, or Fish to enable tab-completion for commands and options.

Usage:

gemini-google-maps-tool completion {bash|zsh|fish}

Arguments:

  • SHELL: Shell type (required) - bash, zsh, or fish

Examples:

# Bash - temporary (current session)
eval "$(gemini-google-maps-tool completion bash)"

# Bash - persistent
echo 'eval "$(gemini-google-maps-tool completion bash)"' >> ~/.bashrc

# Zsh - temporary
eval "$(gemini-google-maps-tool completion zsh)"

# Zsh - persistent
echo 'eval "$(gemini-google-maps-tool completion zsh)"' >> ~/.zshrc

# Fish - install to completions directory
gemini-google-maps-tool completion fish > \
  ~/.config/fish/completions/gemini-google-maps-tool.fish

# File-based (better performance)
gemini-google-maps-tool completion bash > \
  ~/.gemini-google-maps-tool-complete.bash
echo 'source ~/.gemini-google-maps-tool-complete.bash' >> ~/.bashrc

Output: Shell-specific completion script that can be evaluated or saved to a file.

</details> <details> <summary><strong>⚙️ Advanced Features (Click to expand)</strong></summary>

Multi-Level Verbosity Logging

Progressive detail control for debugging and monitoring:

  • No flag (default): WARNING level - only critical issues
  • -v: INFO level - high-level operations, important events
  • -vv: DEBUG level - detailed operations, API calls, validation steps
  • -vvv: TRACE level - full request/response, library internals, HTTP traces

Examples:

# INFO: See which files are processed
gemini-google-maps-tool query "Best restaurants" -v

# DEBUG: See API call details and validation
gemini-google-maps-tool query "Hotels nearby" -vv

# TRACE: See full HTTP requests/responses
gemini-google-maps-tool query "Museums" -vvv

Google Maps Grounding

What is it? Google Maps grounding connects Gemini to Google Maps' database of 250+ million places worldwide, providing:

  • Location-aware responses with accurate, up-to-date information
  • Personalized recommendations tailored to specific areas
  • Automatic citation generation with structured sources
  • Seamless integration via Gemini's API

Grounding Metadata: With -v or --text, responses include:

  • Grounding Chunks: Google Maps sources (title, URI, place_id)
  • Grounding Supports: Text segments linked to sources
  • Widget Context Token: For interactive maps integration

Example:

gemini-google-maps-tool query "Best pizza in Brooklyn" -v

Returns JSON with:

{
  "response_text": "...",
  "grounding_metadata": {
    "grounding_chunks": [
      {
        "title": "Roberta's Pizza",
        "uri": "https://maps.google.com/?cid=...",
        "place_id": "places/ChIJ..."
      }
    ],
    "grounding_supports": [...],
    "google_maps_widget_context_token": "..."
  }
}

Location Context

Provide location coordinates for personalized, location-aware responses:

Format: --lat-lon "latitude,longitude"

Examples:

# Amsterdam center
gemini-google-maps-tool query "Coffee shops nearby" \
  --lat-lon "52.37,4.89"

# San Francisco
gemini-google-maps-tool query "Italian restaurants" \
  --lat-lon "37.78,-122.40"

# Tokyo
gemini-google-maps-tool query "Sushi restaurants" \
  --lat-lon "35.68,139.76"

Coordinate Ranges:

  • Latitude: -90 to 90
  • Longitude: -180 to 180

Model Selection

Choose between two Gemini models:

flash-lite (default):

  • Model: gemini-2.5-flash-lite
  • Faster, more cost-effective
  • Best for simple location queries
  • Recommended for most use cases

flash:

  • Model: gemini-2.5-flash
  • More powerful and capable
  • Best for complex queries and itinerary planning
  • Higher cost

Examples:

# Default (flash-lite)
gemini-google-maps-tool query "Best restaurants"

# Explicit flash-lite
gemini-google-maps-tool query "Hotels" --model flash-lite

# Use flash for complex queries
gemini-google-maps-tool query "Plan a 3-day trip to Paris" \
  --model flash

Python Library Usage

Import and use programmatically in Python applications:

Basic Usage:

from gemini_google_maps_tool import get_client, query_maps

# Initialize client
client = get_client()

# Execute query
result = query_maps(
    client=client,
    query="Best coffee shops near me",
)

print(result.response_text)

With Location and Grounding:

from gemini_google_maps_tool import get_client, query_maps

client = get_client()

result = query_maps(
    client=client,
    query="Italian restaurants nearby",
    lat_lon=(37.78193, -122.40476),
    model="gemini-2.5-flash",
    include_grounding=True,
)

# Access response
print(result.response_text)

# Access grounding metadata
if result.grounding_metadata:
    for chunk in result.grounding_metadata.grounding_chunks:
        print(f"Source: {chunk.title} - {chunk.uri}")

Error Handling:

from gemini_google_maps_tool import (
    get_client,
    query_maps,
    ClientError,
    QueryError,
)

try:
    client = get_client()
    result = query_maps(client, "Best restaurants")
    print(result.response_text)
except ClientError as e:
    print(f"Client error: {e}")
except QueryError as e:
    print(f"Query error: {e}")
</details> <details> <summary><strong>🔧 Troubleshooting (Click to expand)</strong></summary>

Common Issues

Issue: GEMINI_API_KEY not set

Error: GEMINI_API_KEY environment variable is required.

Solution:

# Set for current session
export GEMINI_API_KEY="your-api-key"

# O

---

*Content truncated.*

When not to use it

  • General Gemini queries without location context
  • Tasks unrelated to geographical information
  • Direct Google Maps API queries

Prerequisites

Python 3.14+uv package managerGemini API Key

Limitations

  • Requires active Gemini API key
  • Costs $25 per 1,000 grounded prompts
  • Subject to API rate limits and content filtering

How it compares

Unlike standard LLM queries, this tool provides real-time, grounded data from Google Maps with automatic source citations.

Compared to similar skills

skill-gemini-google-maps-tool side by side with the closest alternatives in the catalog.

SkillInstallsUpdatedSafetyDifficulty
skill-gemini-google-maps-tool (this skill)68moReviewBeginner
web-search339moReviewBeginner
perplexity146moNo flagsBeginner
perplexity-search137moReviewIntermediate

Try saying

Example prompts that trigger this skill in your AI assistant.

You might also like

web-search

Igosuki

This skill should be used when users need to search the web for information, find current content, look up news articles, search for images, or find videos. It uses DuckDuckGo's search API to return results in clean, formatted output (text, markdown, or JSON). Use for research, fact-checking, finding recent information, or gathering web resources.

33188

perplexity

davila7

Web search and research using Perplexity AI. Use when user says "search", "find", "look up", "ask", "research", or "what's the latest" for generic queries. NOT for library/framework docs (use Context7) or workspace questions.

14175

perplexity-search

davila7

Perform AI-powered web searches with real-time information using Perplexity models via LiteLLM and OpenRouter. This skill should be used when conducting web searches for current information, finding recent scientific literature, getting grounded answers with source citations, or accessing information beyond the model's knowledge cutoff. Provides access to multiple Perplexity models including Sonar Pro, Sonar Pro Search (advanced agentic search), and Sonar Reasoning Pro through a single OpenRouter API key.

13135

exa-search

benjaminjackson

Search the web for content matching a query with AI-powered semantic search. Use for finding relevant web pages, research papers, news articles, code repositories, or any web content by meaning rather than just keywords.

9106

exa-research

benjaminjackson

Use when the user mentions Exa research OR when the workflow benefits from complex, multi-step research and other exa-ai approaches are not yielding satisfactory results.

894

websearch-quick

thomasholknielsen

Fast, targeted single-pass search strategy for simple factual lookups. 1-iteration workflow with authoritative source verification and minimal citations. Use for version lookups, documentation finding, simple definitions, existence checks. Keywords: what version, find docs, link to, what is, does X support.

977

Search skills

Search the agent skills registry