Skip to main content
Glama

Find cities

dv_cities
Read-onlyIdempotent

Find city IDs and slugs by name or slug for Iranian cities, returning ID, name, province, and centre so you can target Divar searches and district lookups.

Instructions

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

Other tools also take the city name directly. Next: dv_districts, dv_search.

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_cities"
  }
}

Input Schema

NameRequiredDescriptionDefault
limitNo
queryNoName or slug, e.g. 'مشهد', 'kar'. Omit for the 7 biggest cities.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changedv0.3.0
    • removedInput schema / properties / limit / description
      Removed value: -"Max cities to return."
    • changedInput schema / properties / query / description
      Previous value: -"City name or slug, Persian or Latin, e.g. 'مشهد', 'kar'. Omit for the 7 biggest cities."New value: +"Name or slug, e.g. 'مشهد', 'kar'. Omit for the 7 biggest cities."
  2. First observedv0.1.0

TDQS

A4.2/5.0
Behavior4/5

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

Annotations already declare readOnly, idempotent, non-destructive and open-world, so the safety profile is covered. The description adds genuinely new context beyond that: the 1,177-city dataset size, the returned field set (id, name, URL slug, province id, centre), and default-result behavior. It does not state matching semantics (exact vs. partial/prefix) or what happens when nothing matches.

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 short sentences with examples front-loaded, followed by a single routing line to next tools. No filler, no restatement of the title.

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?

With no output schema, the description correctly compensates by enumerating returned fields, and it covers dataset scale and next steps for a simple two-parameter lookup. Remaining gaps are narrow: limit behavior and no-match handling.

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 50%: `query` is well documented in the schema while `limit` is undocumented in both places, and the description says nothing about limit or pagination. The description does reinforce the name/slug flexibility and the default-to-7-biggest-cities behavior, but only marginally beyond the schema.

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?

"City ids for a name" states the exact input→output mapping, and the description adds concrete scope (1,177 cities) plus worked examples (Tehran=1, Mashhad=3) that make the tool unmistakable. It also explicitly separates itself from siblings by noting "Other tools also take the city name directly."

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?

It signals that this lookup is often unnecessary because other tools accept the city name directly, and it names follow-on tools (dv_districts, dv_search). What's missing is an explicit trigger such as "use this when you need a city id before calling an id-only tool."

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