Skip to main content
Glama

Search businesses

search_businesses
Destructive

Search businesses. Use resolve_parameters FIRST to get type slugs and location params, except in reverse mode, which resolves nothing.

BILLING: Each result costs the user 1 credit. Apply only the filters the user explicitly requested. Never fetch broad results and filter them yourself, never split one request into multiple narrower searches to approximate a broader area — both patterns waste the user's money.

COORDINATES: Only use center coordinates from resolve_parameters found_locations. Do not use your own coordinates — the geocoding service is more precise than your training data.

By default, returns count only (0 credits). Set spend_credits=true to fetch full results (costs 1 credit per result). Show the count to the user and get their confirmation before setting spend_credits=true.

LOCATION — three MUTUALLY EXCLUSIVE modes. Pick based on the query's shape:

  • zone (country_code + admin1_code/admin2_code/city from resolve_parameters): use when the query describes an administrative area (city, department/county, region/state, country). Uses our authoritative admin tagging of each business — more precise than a polygon drawn around the same area.

  • geo_polygon (array of {lat, lng} points from resolve_parameters): use when the query describes a custom shape that isn't a single administrative unit — a street, a square, a neighbourhood, a corridor, an area spanning multiple regions or countries. No size limit.

  • geo_radius (center from resolve_parameters + radius_km): use for "within X km of a point" queries.

REVERSE, a fourth mode: pass reverse {type, value} to find the businesses attached to one identifier. Having no location, it takes no type and no filter, and country_code is the only search parameter it accepts. The control parameters are unchanged: spend_credits, per_page and cursor work as in every other mode.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "search_businesses"
  }
}

Input Schema

NameRequiredDescriptionDefault
cityNo
typesNoArray of business type slugs from resolve_parameters
cursorNo
fieldsNoReturn only these fields per result. Omit for all fields.
localeNo
reverseNoReverse mode: the businesses attached to one identifier. Excludes every other mode, every type and every filter.
per_pageNo
geo_radiusNoGeo radius search
skip_countNo
admin1_codeNo
admin2_codeNo
geo_polygonNoArray of {lat, lng} points (3-100) from resolve_parameters found_locations.
postal_codeNo
country_codeNo
map_has_phoneNo
map_is_closedNo
spend_creditsNo
map_phone_typeNo
map_has_websiteNo
map_is_main_typeNo
website_has_emailsNo
website_has_tiktokNo
website_has_twitterNo
website_has_youtubeNo
map_first_seen_at_gtNo
map_first_seen_at_ltNo
website_has_facebookNo
website_has_linkedinNo
map_first_seen_at_gteNo
map_first_seen_at_lteNo
map_reviews_count_gteNo
map_reviews_count_lteNo
website_has_ad_pixelsNo
website_has_instagramNo
map_reviews_rating_gteNo
map_reviews_rating_lteNo
website_has_contact_pagesNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.3/5.0
Behavior4/5

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

Adds substantial behavior beyond the annotations: per-result credit cost, that the default returns count only at 0 credits, and that spend_credits=true triggers paid full results. It does not explain why destructiveHint=true is set (credit consumption vs. data mutation) or what happens on insufficient credits, so the annotation's safety profile remains partly unexplained.

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?

Uses labeled blocks (BILLING, COORDINATES, LOCATION, REVERSE) and front-loads the prerequisite and cost model, which is appropriate for a 37-parameter tool. A few lines, such as the warning against manually post-filtering results, are wordy but justified by the money-spending consequence.

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?

No output schema exists, and the description covers the critical return-value distinction (count-only by default vs. full results with spend_credits) and the fields selector. Remaining gaps are error behavior and credit-exhaustion handling, which matter for a paid, destructiveHint-flagged tool but are secondary to correct invocation.

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 coverage is only 14% across 37 parameters, so the description must carry the load. It does well on the hard parts (reverse object, geo_polygon point sourcing from resolve_parameters found_locations, spend_credits default, per_page/cursor working in all modes) but leaves the ~20 map_*/website_* filter parameters and fields/locale/skip_count unexplained.

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, then immediately enumerates the four mutually exclusive search modes (zone, geo_polygon, geo_radius, reverse) so the agent knows exactly what shapes of search exist. It also names its prerequisite sibling, resolve_parameters, which distinguishes it from the resolver without opening either schema.

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

Usage Guidelines5/5

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

Gives explicit when-to-use rules for each location mode tied to query shape ('administrative area', 'custom shape that isn't a single administrative unit', 'within X km of a point'), plus an explicit when-not for reverse mode. It also instructs the agent to show the count and get user confirmation before spend_credits=true, and warns against splitting requests.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources