Skip to main content
Glama

Question to search

dv_parse_query
Read-onlyIdempotent

Parse plain Persian search requests into Divar query arguments—city, neighborhoods, price limits, category, leftover words—ready for dv_search.

Instructions

Turn a plain Persian request into dv_search arguments: city, neighbourhoods, price bounds, category and leftover words.

A rule-based helper, not a language model: it finds a city and its neighbourhoods by name, amounts with میلیارد / میلیون / هزار (with زیر, کمتر از, تا, بالای, حداقل or از ... تا ...), a category from Divar's own guess for the leftover words, and moves rental words (اجاره, رهن) to the matching rent category. search can be passed to dv_search as it is; check notes for what was assumed. An area like '80 متری' becomes a size filter of ±10%. Rooms, year or mileage are not extracted: use dv_filters.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
textYesA search as a person would write it, e.g. 'آپارتمان اجاره ونک زیر ۸ میلیارد' or 'پراید کرج تا ۲۰۰ میلیون'.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.4/5.0
Behavior4/5

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

Annotations already declare it read-only, idempotent and non-destructive, so the safety profile is covered. The description adds substantive behavior beyond that: it is rule-based rather than an LLM, it discloses its extraction limits, and it points the agent at `notes` to see what was assumed.

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?

Opens with the core transformation, then lists extraction rules and caveats; every clause maps to a real parsing behavior an agent needs. It is dense but each sentence earns its place, with only mild redundancy in the price-modifier enumeration.

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 usefully names the return keys (`search`, `notes`) and tells the agent how to consume them. Combined with the disclosed limitations and the pointer to dv_filters, an agent has everything needed to call and use the result correctly.

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% and the single `text` parameter is already exemplified in the schema, so baseline is a 3. The description earns above baseline by explaining what the text is parsed into (amount modifiers زیر/تا/بالای, rental words moving to a rent category, '80 متری' becoming a ±10% size filter).

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 transformation ('turn a plain Persian request into dv_search arguments') and enumerates exactly which fields it extracts (city, neighbourhoods, price bounds, category, leftover words). It is clearly distinguishable from siblings dv_search (the consumer) and dv_filters (the fallback for rooms/year/mileage).

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?

Explicitly routes the agent: use dv_filters for rooms/year/mileage, and the produced `search` can be passed directly to dv_search. What is missing is an explicit when-not (e.g., skip this tool if you already have structured arguments), though that is strongly implied.

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