Skip to main content
Glama

search_restaurants

Read-only

Search nearby restaurants by free-text query from a saved or specified address and return distance, delivery estimate, rating, and pickup availability for choosing where to order.

Instructions

Search nearby restaurants by free-text query. Searches from the user's default saved address unless address_id or lat/lng is given. Returns store_id, name, distance, delivery_time estimate, rating, and pickup availability (offers_pickup, asap/scheduled_pickup_availability, next_open_time_asap_pickup_ms — use these before promising pickup). Stores with is_link_out=true cannot be ordered through this agent. Restaurant-focused — use find_stores for grocery/retail/pharmacy/pets/alcohol. Filters (dashpass_only, price_tier, distance_preference, max_eta_minutes) narrow server-side — prefer them over asking for 30 results and filtering by hand.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "query": "<query>",
      "intent": "<intent>"
    },
    "name": "search_restaurants"
  }
}

Input Schema

NameRequiredDescriptionDefault
latNoOptional latitude override (pass with lng, and without address_id)
lngNoOptional longitude override (pass with lat, and without address_id)
limitNoMax results (default 8)
queryYesSearch text, e.g. 'grilled chicken bowls'
intentYesOne short line stating who this is for and the goal, e.g. 'Help the user order dinner'. DO NOT include the user's verbatim words, dietary/health/religious details, budgets, names, or other personal specifics — a generic goal is expected.
address_idNoSearch from a saved address (list_addresses). Mutually exclusive with lat/lng; omit for the default address
price_tierNoPrice tiers to include, 1 (cheapest) to 4 — e.g. [1,2] for 'somewhere cheap'
dashpass_onlyNoOnly DashPass stores. Pass when the user says they have DashPass and wants to use it
max_eta_minutesNoDrop stores whose estimated delivery exceeds this many minutes — use when the user is in a hurry
distance_preferenceNoHow far to look: nearby for 'right around here', broad to widen a thin result set

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed7 schema fields changedv0.6.0
    • addedInput schema / properties / address_id
      Added value: +{
      +  "description": "Search from a saved address (list_addresses). Mutually exclusive with lat/lng; omit for the default address",
      +  "type": "string"
      +}
    • addedInput schema / properties / dashpass_only
      Added value: +{
      +  "description": "Only DashPass stores. Pass when the user says they have DashPass and wants to use it",
      +  "type": "boolean"
      +}
    • addedInput schema / properties / distance_preference
      Added value: +{
      +  "description": "How far to look: nearby for 'right around here', broad to widen a thin result set",
      +  "enum": [
      +    "nearby",
      +    "balanced",
      +    "broad"
      +  ],
      +  "type": "string"
      +}
    • changedInput schema / properties / lat / description
      Previous value: -"Optional latitude override"New value: +"Optional latitude override (pass with lng, and without address_id)"
    • changedInput schema / properties / lng / description
      Previous value: -"Optional longitude override"New value: +"Optional longitude override (pass with lat, and without address_id)"
    • addedInput schema / properties / max_eta_minutes
      Added value: +{
      +  "description": "Drop stores whose estimated delivery exceeds this many minutes — use when the user is in a hurry",
      +  "type": "integer"
      +}
    • addedInput schema / properties / price_tier
      Added value: +{
      +  "description": "Price tiers to include, 1 (cheapest) to 4 — e.g. [1,2] for 'somewhere cheap'",
      +  "items": {
      +    "type": "integer"
      +  },
      +  "type": "array"
      +}
  2. First observedv0.1.0

TDQS

A4.6/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true and destructiveHint=false, so the safety profile is covered. The description adds genuine behavioral context beyond that: output fields including pickup availability, the is_link_out ordering restriction, and the fact that filters narrow server-side. It does not cover pagination or result-ranking behavior, keeping it short of a 5.

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 with purpose and location behavior, then the non-orderable store warning, then domain routing, then filter advice — a sensible priority order. It is dense and slightly overloaded with a parenthetical field list, but nearly every clause carries actionable information.

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

Completeness5/5

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

There is no output schema, and the description compensates by enumerating the returned fields (store_id, name, distance, delivery_time, rating, pickup availability). Combined with the 10-parameter schema and the link-out caveat, an agent has enough to call this correctly and interpret the results.

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?

Schema coverage is 100%, so baseline is 3. The description earns above baseline by tying parameters to intent-level meaning — default saved address vs. address_id vs. lat/lng override, and the guidance to use server-side filters rather than client-side trimming. It does not elaborate on price_tier or distance_preference beyond what the schema already says.

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 nearby restaurants by free-text query') and immediately scopes the domain: 'Restaurant-focused — use find_stores for grocery/retail/pharmacy/pets/alcohol.' An agent can distinguish this from find_stores and find_item_across_retailers without opening any 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 routing to a named sibling, states the default location behavior and how to override it, and instructs 'prefer [filters] over asking for 30 results and filtering by hand.' It also flags the exclusion case: stores with is_link_out=true cannot be ordered through this agent, so the agent knows a result is not orderable.

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