Skip to main content
Glama

Search ads

dv_search
Read-onlyIdempotent

Search Divar classified ads across one or more cities by category, text, price, and other filters, returning compact ad cards with prices in Toman.

Instructions

Search Divar ads in one or more cities by category, text and filters; compact cards, prices in Toman.

Filters the category lacks come back in ignored. Next: dv_post, dv_compare, dv_cheapest, dv_market.

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": "dv_search"
  }
}

Input Schema

NameRequiredDescriptionDefault
cityNoCity name or id; several comma-separated, e.g. 'تهران,کرج'.تهران
sortNo'newest' is Divar's order (pages by cursor); 'cheapest' / 'expensive' sort only the ads fetched in this call.newest
limitNoMax ads in the answer.
pagesNoResult pages to merge, about 25 ads each.
queryNoFree text in title or description, e.g. 'پراید 111'.
cursorNo`next_cursor` of the previous call, for older ads.
recentNoPublished within '3h', '12h', '1d', '3d' or '7d'.
excludeNoDrop ads whose title has any of these words.
filtersNoCategory filters (keys from dv_filters), e.g. {'size': {'min': 80, 'max': 120}, 'parking': true}. Unknown keys are returned in `ignored`.
categoryNoCategory slug or Persian name, e.g. 'light' (cars), 'apartment-rent', 'mobile-phones'.
keywordsNoWords that must all be in the title.
districtsNoNeighbourhood names or ids, e.g. ['ونک'].
has_photoNoOnly ads with photos.
max_priceNoToman; monthly rent in rent categories.
min_priceNoToman; monthly rent in rent categories.
thumbnailsNoInclude each ad's thumbnail URL in `image` (about 40 tokens per ad).
brand_modelNoVehicles, phones: brand/model, e.g. ['پژو 206'].
max_depositNoRent deposit (ودیعه), Toman.
min_depositNoRent deposit (ودیعه), Toman.
max_age_hoursNoOnly ads bumped within this many hours.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed7 schema fields changedv0.3.0
    • changedInput schema / properties / category / description
      Previous value: -"Category slug or Persian name, e.g. 'light' (cars), 'apartment-sell', 'apartment-rent', 'mobile-phones'."New value: +"Category slug or Persian name, e.g. 'light' (cars), 'apartment-rent', 'mobile-phones'."
    • changedInput schema / properties / city / description
      Previous value: -"City name or id; several comma-separated, e.g. 'تهران', 'mashhad', 'تهران,کرج'."New value: +"City name or id; several comma-separated, e.g. 'تهران,کرج'."
    • changedInput schema / properties / districts / description
      Previous value: -"Neighbourhood names or ids in the one city, e.g. ['ونک']."New value: +"Neighbourhood names or ids, e.g. ['ونک']."
    • changedInput schema / properties / filters / description
      Previous value: -"Other category filters (keys from dv_filters): {'size': {'min': 80, 'max': 120}, 'rooms': ['دو'], 'parking': true}. Unknown keys are returned in `ignored`."New value: +"Category filters (keys from dv_filters), e.g. {'size': {'min': 80, 'max': 120}, 'parking': true}. Unknown keys are returned in `ignored`."
    • changedInput schema / properties / max_deposit / description
      Previous value: -"Rent categories: deposit (ودیعه) in Toman."New value: +"Rent deposit (ودیعه), Toman."
    • changedInput schema / properties / min_deposit / description
      Previous value: -"Rent categories: deposit (ودیعه) in Toman."New value: +"Rent deposit (ودیعه), Toman."
    • changedInput schema / properties / sort / description
      Previous value: -"'newest' is Divar's own order (default, pages by cursor). 'cheapest' / 'expensive' sort the ads fetched in this call by price (Divar cannot sort by price)."New value: +"'newest' is Divar's order (pages by cursor); 'cheapest' / 'expensive' sort only the ads fetched in this call."
  2. First observedv0.1.0

TDQS

A3.7/5.0
Behavior4/5

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

Annotations already declare readOnly, idempotent, openWorld and non-destructive, so the safety profile is covered. The description adds genuinely useful non-obvious behavior: unsupported category filters are returned in `ignored` rather than silently dropped, and results are compact cards with Toman pricing. It stops short of describing card fields, cross-city deduplication, or result-volume behavior.

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

Conciseness5/5

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

Two sentences, front-loaded with the verb and scope, then the one behavioral caveat (`ignored`), then the routing chain. No filler, no restatement of the tool name or annotations.

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 20-parameter, nested-object tool with no output schema, the description leaves the response shape largely opaque ('compact cards' without listing card fields) and says nothing about pagination behavior beyond what the `cursor`/`pages` schema text implies. The `ignored` caveat and Toman note are the right kind of addition, but more return-shape detail was warranted here.

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 description coverage is 100%, so every one of the 20 parameters is already documented in the schema down to enum semantics and the cursor/pages interplay. The description only echoes the high-level axes (city, category, text, filters, Toman prices) and adds no syntax or edge-case detail beyond the schema, so the baseline 3 applies.

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?

States a specific verb and resource ('Search Divar ads') plus the scope axes (cities, category, text, filters) and the output shape ('compact cards, prices in Toman'). It routes onward to dv_post/dv_compare/dv_cheapest/dv_market but never distinguishes itself from close siblings like dv_count, dv_find_deals, or dv_best_for_budget.

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

Usage Guidelines3/5

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

'Next: dv_post, dv_compare, dv_cheapest, dv_market' gives a follow-up path, which implies this is the entry-point search tool. There is no explicit when-not guidance and no statement of when a sibling (e.g. dv_count for counts, dv_cheapest for lowest price) should be chosen over this one.

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