Skip to main content
Glama

Find cities

dv_cities
Read-onlyIdempotent

Look up Divar city IDs, names, URL slugs, province IDs, and centres from a city name or slug, with Persian letter variants matched. Use it first to get the city needed by other Divar tools.

Instructions

City ids for a name (1,177 cities; Tehran is 1, Mashhad 3). Returns id, name, URL slug, province id and centre.

Use first when you need a city for another tool (they also accept the name directly). Persian letter variants (ي/ی, ك/ک) are matched. Next: dv_districts for the neighbourhoods of a city, dv_search to look for ads.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
limitNoMax cities to return.
queryNoCity name or slug, Persian or Latin, e.g. 'مشهد', 'kar'. Omit for the 7 biggest cities.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.5/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 safety is covered. The description adds genuinely useful behavior beyond that: dataset size (1,177 cities), Persian letter-variant normalization (ي/ی, ك/ک), and the default behaviour when query is omitted. It does not discuss pagination or result ordering, which keeps 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.

Conciseness5/5

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

Two compact paragraphs, each sentence load-bearing: the first states purpose and returns, the second states fallback behaviour and routing. No filler, and the most important fact is front-loaded.

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?

With no output schema, the description compensates by naming the returned fields, and for a 2-parameter optional-query lookup it covers selection, defaults, and follow-up tools. Nothing an agent needs to call it correctly is missing.

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 the schema already explains limit and query fully, including the 'omit for the 7 biggest cities' default. The description only adds illustrative ID values (Tehran 1, Mashhad 3), which is a marginal gain. Baseline 3 applies.

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?

The description gives a specific verb+resource ('City ids for a name') and immediately enumerates what is returned (id, name, URL slug, province id, centre). It is unambiguous against siblings like dv_districts or dv_search, which are named as follow-ups rather than competitors.

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?

Explicit routing: 'Use first when you need a `city` for another tool', plus a note that other tools also accept the name directly, and a 'Next:' chain pointing to dv_districts and dv_search. Both when-to-use and what-to-use-next are stated.

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