Skip to main content
Glama
bama-ir-mcp

bama-ir-mcp

by sepehr071

Search car ads

ba_search
Read-onlyIdempotent

Search used and new car ads on Bama with vehicle, price, mileage, year, location, and condition filters; browse up to 30 compact results per page.

Instructions

Search used and new car ads on Bama (bama.ir) with filters; up to 30 compact ads per page.

Get vehicle values from ba_vehicles and other values from ba_filters. Prices Toman, mileage_km 0 = zero-km. Then ba_ad for one code, ba_market_stats for statistics. No total count: page while has_more is true. Motorcycles and trucks: ba_search_bikes_trucks.

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

Input Schema

NameRequiredDescriptionDefault
bodyNoba_filters kind=body values, e.g. ['suv'].
fuelNoba_filters kind=fuel values.
pageNo0-based page (30 ads).
sortNorelevance
colorNoba_filters kind=color values, e.g. ['white'].
driveNoba_filters kind=drive values.
originNoba_filters kind=origin values.
regionNoba_filters kind=region values, e.g. ['tehran'], ['isfahan,kashan'].
sellerNo
countryNoba_filters kind=country values.
presaleNoOnly presale (حواله) ads.
vehicleNoValues from ba_vehicles: brand, brand,model or brand,model,trim, e.g. ['samand,lx']. Several = any.
year_toNoLatest year, Jalali.
cylinderNoba_filters kind=cylinder values.
price_toNoMaximum price in Toman.
lifestyleNoba_filters kind=lifestyle values.
year_fromNoEarliest year, Jalali.
mileage_toNoMaximum km (0 = zero-km only).
price_fromNoMinimum price in Toman.
with_photoNoOnly ads with photos.
with_priceNoOnly ads with a stated price.
body_statusNoba_filters kind=body_status values (paint condition).
installmentNoOnly installment ads.
mileage_fromNoMinimum km.
transmissionNo
description_charsNoCharacters of each ad's text to include (0 = none).

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed91 schema fields changedv0.2.0
    • removedInput schema / properties / body / anyOf
      Removed value: -[
      -  {
      -    "items": {
      -      "type": "string"
      -    },
      -    "maxItems": 10,
      -    "type": "array"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • changedInput schema / properties / body / description
      Previous value: -"Body values from ba_filters kind=body, e.g. ['suv']."New value: +"ba_filters kind=body values, e.g. ['suv']."
    • addedInput schema / properties / body / items
      Added value: +{
      +  "type": "string"
      +}
    • addedInput schema / properties / body / maxItems
      Added value: +10
    • addedInput schema / properties / body / type
      Added value: +[
      +  "array",
      +  "null"
      +]
    • removedInput schema / properties / body_status / anyOf
      Removed value: -[
      -  {
      -    "items": {
      -      "type": "string"
      -    },
      -    "maxItems": 10,
      -    "type": "array"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • changedInput schema / properties / body_status / description
      Previous value: -"Paint/body condition values from ba_filters kind=body_status, e.g. ['no_paint']."New value: +"ba_filters kind=body_status values (paint condition)."
    • addedInput schema / properties / body_status / items
      Added value: +{
      +  "type": "string"
      +}
    • addedInput schema / properties / body_status / maxItems
      Added value: +10
    • addedInput schema / properties / body_status / type
      Added value: +[
      +  "array",
      +  "null"
      +]
    • removedInput schema / properties / color / anyOf
      Removed value: -[
      -  {
      -    "items": {
      -      "type": "string"
      -    },
      -    "maxItems": 10,
      -    "type": "array"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • changedInput schema / properties / color / description
      Previous value: -"Color values from ba_filters kind=color, e.g. ['white']."New value: +"ba_filters kind=color values, e.g. ['white']."
    • addedInput schema / properties / color / items
      Added value: +{
      +  "type": "string"
      +}
    • addedInput schema / properties / color / maxItems
      Added value: +10
    • addedInput schema / properties / color / type
      Added value: +[
      +  "array",
      +  "null"
      +]
    • removedInput schema / properties / country / anyOf
      Removed value: -[
      -  {
      -    "items": {
      -      "type": "string"
      -    },
      -    "maxItems": 10,
      -    "type": "array"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • changedInput schema / properties / country / description
      Previous value: -"Maker country values from ba_filters kind=country, e.g. ['Chinese']."New value: +"ba_filters kind=country values."
    • addedInput schema / properties / country / items
      Added value: +{
      +  "type": "string"
      +}
    • addedInput schema / properties / country / maxItems
      Added value: +10
    • addedInput schema / properties / country / type
      Added value: +[
      +  "array",
      +  "null"
      +]
    • removedInput schema / properties / cylinder / anyOf
      Removed value: -[
      -  {
      -    "items": {
      -      "type": "string"
      -    },
      -    "maxItems": 10,
      -    "type": "array"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • changedInput schema / properties / cylinder / description
      Previous value: -"Values from ba_filters kind=cylinder, e.g. ['four']."New value: +"ba_filters kind=cylinder values."
    • addedInput schema / properties / cylinder / items
      Added value: +{
      +  "type": "string"
      +}
    • addedInput schema / properties / cylinder / maxItems
      Added value: +10
    • addedInput schema / properties / cylinder / type
      Added value: +[
      +  "array",
      +  "null"
      +]
    • changedInput schema / properties / description_chars / description
      Previous value: -"Include this many characters of each ad's text (0 = none)."New value: +"Characters of each ad's text to include (0 = none)."
    • removedInput schema / properties / drive / anyOf
      Removed value: -[
      -  {
      -    "items": {
      -      "type": "string"
      -    },
      -    "maxItems": 10,
      -    "type": "array"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • changedInput schema / properties / drive / description
      Previous value: -"Drive-train values from ba_filters kind=drive, e.g. ['awd']."New value: +"ba_filters kind=drive values."
    • addedInput schema / properties / drive / items
      Added value: +{
      +  "type": "string"
      +}
    • addedInput schema / properties / drive / maxItems
      Added value: +10
    • addedInput schema / properties / drive / type
      Added value: +[
      +  "array",
      +  "null"
      +]
    • removedInput schema / properties / fuel / anyOf
      Removed value: -[
      -  {
      -    "items": {
      -      "type": "string"
      -    },
      -    "maxItems": 10,
      -    "type": "array"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • changedInput schema / properties / fuel / description
      Previous value: -"Fuel values from ba_filters kind=fuel, e.g. ['gasoline']."New value: +"ba_filters kind=fuel values."
    • addedInput schema / properties / fuel / items
      Added value: +{
      +  "type": "string"
      +}
    • addedInput schema / properties / fuel / maxItems
      Added value: +10
    • addedInput schema / properties / fuel / type
      Added value: +[
      +  "array",
      +  "null"
      +]
    • changedInput schema / properties / installment / description
      Previous value: -"Only installment (اقساطی) ads."New value: +"Only installment ads."
    • removedInput schema / properties / lifestyle / anyOf
      Removed value: -[
      -  {
      -    "items": {
      -      "type": "string"
      -    },
      -    "maxItems": 10,
      -    "type": "array"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • changedInput schema / properties / lifestyle / description
      Previous value: -"Lifestyle values from ba_filters kind=lifestyle (e.g. family, sport)."New value: +"ba_filters kind=lifestyle values."
    • addedInput schema / properties / lifestyle / items
      Added value: +{
      +  "type": "string"
      +}
    • addedInput schema / properties / lifestyle / maxItems
      Added value: +10
    • addedInput schema / properties / lifestyle / type
      Added value: +[
      +  "array",
      +  "null"
      +]
    • removedInput schema / properties / mileage_from / anyOf
      Removed value: -[
      -  {
      -    "minimum": 0,
      -    "type": "integer"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • changedInput schema / properties / mileage_from / description
      Previous value: -"Minimum mileage in km. 0 with mileage_to=0 means zero-km cars."New value: +"Minimum km."
    • addedInput schema / properties / mileage_from / minimum
      Added value: +0
    • addedInput schema / properties / mileage_from / type
      Added value: +[
      +  "integer",
      +  "null"
      +]
    • removedInput schema / properties / mileage_to / anyOf
      Removed value: -[
      -  {
      -    "minimum": 0,
      -    "type": "integer"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • changedInput schema / properties / mileage_to / description
      Previous value: -"Maximum mileage in km."New value: +"Maximum km (0 = zero-km only)."
    • addedInput schema / properties / mileage_to / minimum
      Added value: +0
    • addedInput schema / properties / mileage_to / type
      Added value: +[
      +  "integer",
      +  "null"
      +]
    • removedInput schema / properties / origin / anyOf
      Removed value: -[
      -  {
      -    "items": {
      -      "type": "string"
      -    },
      -    "maxItems": 10,
      -    "type": "array"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • changedInput schema / properties / origin / description
      Previous value: -"Origin values from ba_filters kind=origin (e.g. domestic, imported, assembled)."New value: +"ba_filters kind=origin values."
    • addedInput schema / properties / origin / items
      Added value: +{
      +  "type": "string"
      +}
    • addedInput schema / properties / origin / maxItems
      Added value: +10
    • addedInput schema / properties / origin / type
      Added value: +[
      +  "array",
      +  "null"
      +]
    • changedInput schema / properties / page / description
      Previous value: -"0-based page; each page holds up to 30 ads."New value: +"0-based page (30 ads)."
    • changedInput schema / properties / presale / description
      Previous value: -"Only presale or allocation-letter (حواله) ads."New value: +"Only presale (حواله) ads."
    • removedInput schema / properties / price_from / anyOf
      Removed value: -[
      -  {
      -    "minimum": 0,
      -    "type": "integer"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • addedInput schema / properties / price_from / minimum
      Added value: +0
    • addedInput schema / properties / price_from / type
      Added value: +[
      +  "integer",
      +  "null"
      +]
    • removedInput schema / properties / price_to / anyOf
      Removed value: -[
      -  {
      -    "minimum": 0,
      -    "type": "integer"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • addedInput schema / properties / price_to / minimum
      Added value: +0
    • addedInput schema / properties / price_to / type
      Added value: +[
      +  "integer",
      +  "null"
      +]
    • removedInput schema / properties / region / anyOf
      Removed value: -[
      -  {
      -    "items": {
      -      "type": "string"
      -    },
      -    "maxItems": 10,
      -    "type": "array"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • changedInput schema / properties / region / description
      Previous value: -"State or city values from ba_filters kind=region, e.g. ['tehran'] or ['isfahan,kashan']."New value: +"ba_filters kind=region values, e.g. ['tehran'], ['isfahan,kashan']."
    • addedInput schema / properties / region / items
      Added value: +{
      +  "type": "string"
      +}
    • addedInput schema / properties / region / maxItems
      Added value: +10
    • addedInput schema / properties / region / type
      Added value: +[
      +  "array",
      +  "null"
      +]
    • removedInput schema / properties / seller / anyOf
      Removed value: -[
      -  {
      -    "enum": [
      -      "dealer",
      -      "private"
      -    ],
      -    "type": "string"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • removedInput schema / properties / seller / description
      Removed value: -"Only dealers (showrooms) or only private sellers."
    • addedInput schema / properties / seller / enum
      Added value: +[
      +  "dealer",
      +  "private",
      +  null
      +]
    • addedInput schema / properties / seller / type
      Added value: +[
      +  "string",
      +  "null"
      +]
    • removedInput schema / properties / transmission / anyOf
      Removed value: -[
      -  {
      -    "enum": [
      -      "manual",
      -      "automatic"
      -    ],
      -    "type": "string"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • addedInput schema / properties / transmission / enum
      Added value: +[
      +  "manual",
      +  "automatic",
      +  null
      +]
    • addedInput schema / properties / transmission / type
      Added value: +[
      +  "string",
      +  "null"
      +]
    • removedInput schema / properties / vehicle / anyOf
      Removed value: -[
      -  {
      -    "items": {
      -      "type": "string"
      -    },
      -    "maxItems": 10,
      -    "type": "array"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • changedInput schema / properties / vehicle / description
      Previous value: -"Brand, model or trim values from ba_vehicles, e.g. ['samand'], ['samand,lx'], ['peugeot,206ir,type2']. Several values mean any of them."New value: +"Values from ba_vehicles: brand, brand,model or brand,model,trim, e.g. ['samand,lx']. Several = any."
    • addedInput schema / properties / vehicle / items
      Added value: +{
      +  "type": "string"
      +}
    • addedInput schema / properties / vehicle / maxItems
      Added value: +10
    • addedInput schema / properties / vehicle / type
      Added value: +[
      +  "array",
      +  "null"
      +]
    • changedInput schema / properties / with_price / description
      Previous value: -"Only ads that state a price (hides 'negotiable')."New value: +"Only ads with a stated price."
    • removedInput schema / properties / year_from / anyOf
      Removed value: -[
      -  {
      -    "maximum": 1500,
      -    "minimum": 1300,
      -    "type": "integer"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • changedInput schema / properties / year_from / description
      Previous value: -"Earliest production year, Jalali (e.g. 1395)."New value: +"Earliest year, Jalali."
    • addedInput schema / properties / year_from / maximum
      Added value: +1500
    • addedInput schema / properties / year_from / minimum
      Added value: +1300
    • addedInput schema / properties / year_from / type
      Added value: +[
      +  "integer",
      +  "null"
      +]
    • removedInput schema / properties / year_to / anyOf
      Removed value: -[
      -  {
      -    "maximum": 1500,
      -    "minimum": 1300,
      -    "type": "integer"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • changedInput schema / properties / year_to / description
      Previous value: -"Latest production year, Jalali (e.g. 1400)."New value: +"Latest year, Jalali."
    • addedInput schema / properties / year_to / maximum
      Added value: +1500
    • addedInput schema / properties / year_to / minimum
      Added value: +1300
    • addedInput schema / properties / year_to / type
      Added value: +[
      +  "integer",
      +  "null"
      +]
  2. First observedv0.1.1

TDQS

A4.3/5.0
Behavior4/5

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

Annotations already declare readOnly/idempotent/non-destructive/openWorld, yet the description adds real behavior beyond them: a 30-ad page cap, no total count available so the caller must loop on has_more, compact records with optional ad text via description_chars, and Toman/km unit conventions. It stops short of describing rate limits, error modes, or the full response shape.

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?

Purpose and page-size are front-loaded, and the sibling-routing sentences are terse and useful. The clipped, telegraphic phrasing ('Prices Toman', 'No total count: page while has_more is true') compresses well but reads slightly like notes rather than prose.

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?

For a 26-parameter, three-enum search tool with no output schema, the description covers paging (30/page, has_more), value sourcing, units, and scope exclusions. It does not explain the returned ad fields, but the pagination and filter semantics needed to invoke it correctly are present.

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 88%, so the schema already documents nearly every field, and the description mostly restates units it already carries ('Prices Toman', 'mileage_km 0 = zero-km'). The one genuine addition is telling the agent where valid values come from (ba_vehicles for vehicle, ba_filters kinds for the rest), which lifts it only slightly above the 3 baseline.

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 used and new car ads on Bama') plus scope details (filters, 30 compact ads per page), and explicitly excludes motorcycles/trucks by naming ba_search_bikes_trucks. An agent can distinguish it from all eleven siblings without opening a 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?

Explicitly routes the agent: vehicle values come from ba_vehicles, other filter values from ba_filters, single-ad lookups go to ba_ad, aggregates to ba_market_stats, and two-wheelers/heavy vehicles to ba_search_bikes_trucks. Both when-to-use and when-to-use-something-else are stated.

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