Skip to main content
Glama

search_businesses

Find businesses by query and location using free OpenStreetMap data, returning matching records for B2B lead discovery.

Instructions

    Search for businesses matching a query using free, open data sources.

    Uses OpenStreetMap / Overpass API for live discovery (no API key required).
    Falls back to demo data when the network is unavailable or DEMO_MODE=true.

    Args:
        query:    Free-text search term, e.g. "coffee shop", "software company",
                  "law firm", "restaurant". Pass "*" for a broad sweep.
        location: City, region, or "lat,lon" coordinates to centre the search,
                  e.g. "London", "Austin, TX", "48.8566,2.3522".
                  Required for live OSM search — omitting it falls back to demo data.
        category: Optional industry hint, e.g. "Technology", "Healthcare",
                  "Food & Beverage". Narrows the Overpass tag filter.
        limit:    Maximum results to return (1–50, default 10).

    Returns:
        dict with keys:
          query, location, category  — echoed inputs
          total_found (int)          — number of matching results
          businesses (list[dict])    — business records
          provider (str)             — data source used
          retrieved_at (str)         — ISO-8601 timestamp
          attribution (str|null)     — ODbL attribution (show this when displaying OSM data)
          note (str|null)            — caveat about data quality or mode

    Attribution:
        When provider is "openstreetmap", you MUST display the attribution string
        "Data © OpenStreetMap contributors, ODbL 1.0" wherever results appear.

    Compliance:
        - OpenStreetMap data is used under the ODbL licence.
        - No data is sent to third parties.
        - is_ai_generated=False for all records from this tool.
    

Input Schema

NameRequiredDescriptionDefault
limitNo
queryYes
categoryNo
locationNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.4/5.0
Behavior4/5

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

With no annotations, the description carries the full burden and does well: it discloses the data source and licence, the degraded demo fallback, the 1-50 result cap, the provider field revealing which mode ran, and a mandatory attribution obligation. It omits rate limits, ordering of results, and latency expectations for a live external API.

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?

Front-loaded one-line purpose followed by Args and Returns blocks that are easy to scan. The Returns section is justified because no output schema exists, though the compliance bullet list partially repeats the attribution note already stated above.

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

Completeness4/5

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

Covers what the agent needs: inputs with formats, echoed outputs, provider/mode signaling, caveat note field, and the attribution duty. Only minor gaps remain, such as result ordering and failure handling beyond the demo fallback.

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

Parameters5/5

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

Schema description coverage is 0%, so the description must compensate and does: all four parameters get meaning, worked examples ("coffee shop", "Austin, TX", "48.8566,2.3522"), the "*" wildcard convention, the accepted limit range and default, and the critical fact that omitting location silently degrades to demo data.

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

Purpose5/5

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

States a specific verb and resource (search businesses) and names the exact mechanism and data source: live OpenStreetMap/Overpass discovery with a demo-data fallback. An agent can tell this is the discovery entry point rather than a detail/export sibling like get_business_details or export_leads.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Clear operational context: no API key required, demo mode when the network is unavailable, and location is required for live OSM search. It does not, however, explicitly route the agent to siblings (e.g. after finding candidates, use get_business_details or score_lead), so the when-not-to-use side is only implied.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.