Skip to main content
Glama
bama-ir-mcp

bama-ir-mcp

by sepehr071

Used-car market price stats

ba_market_stats
Read-onlyIdempotent

Computes asking-price statistics (min, quartiles, median, max) per year for car models from live Bama ads, using filters like mileage, region, seller, and transmission.

Instructions

Price statistics (min, quartiles, median, max, per year) for a car model from live Bama ads.

Samples the newest matching ads with a fixed price (no negotiable, installment or presale), Toman. Asking prices, not sale prices. Narrow with year, mileage, region; ba_search sort=cheapest shows the ads.

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

Input Schema

NameRequiredDescriptionDefault
pagesNoPages to sample (30 ads each); more is slower.
regionNoba_filters kind=region values.
sellerNo
vehicleNoValues from ba_vehicles: brand, brand,model or brand,model,trim, e.g. ['samand,lx']. Several = any.
year_toNoLatest year, Jalali.
year_fromNoEarliest year, Jalali.
mileage_toNoMaximum km (0 = zero-km only).
mileage_fromNoMinimum km.
transmissionNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed35 schema fields changedv0.2.0
    • 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."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 (0 = zero-km only)."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"
      +]
    • changedInput schema / properties / pages / description
      Previous value: -"How many result pages to sample (30 ads each). More is slower."New value: +"Pages to sample (30 ads each); more is slower."
    • 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."New value: +"ba_filters kind=region values."
    • 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"
      -  }
      -]
    • 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"
      +]
    • 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."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."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/5.0
Behavior4/5

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

Annotations already declare readOnly/idempotent/openWorld, so the lower bar applies, yet the description still adds substantive behavioral context: it samples only the newest ads, excludes negotiable/installment/presale listings, and reports asking prices rather than sale prices in Toman. That sampling-and-basis disclosure meaningfully changes how an agent should interpret the numbers, which is exactly the kind of context annotations cannot carry.

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?

Three short sentences, front-loaded with the output shape, then the data basis, then how to narrow and where to go instead. The clipped 'Toman' fragment is slightly terse but costs nothing and the whole thing is dense with information rather than filler.

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 carries the return-value burden and does name the statistics produced and their per-year grouping, plus the price basis and currency. It stops short of describing the response structure (e.g., how years are keyed, what happens with sparse samples), which would complete it for a 9-parameter aggregation tool.

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 78%, so the schema already documents year ranges, mileage bounds, vehicle value format, region values and page limits. The description only gestures at 'narrow with year, mileage, region' and never mentions seller, transmission or pages, so it adds little meaning beyond the structured fields.

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 computation (min, quartiles, median, max, per year) over a specific resource (a car model's live Bama ads), which is far more than a restatement of the name. It implicitly contrasts with ba_search, which returns individual ads, but does not distinguish itself from the similarly named sibling ba_market_pulse, leaving one plausible confusion unresolved.

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?

Gives a clear use condition (aggregate price distribution for a model) and an explicit alternative for the raw case: 'ba_search sort=cheapest shows the ads.' It also names the narrowing dimensions. What is missing is an explicit when-not / prerequisite statement, so it earns a 4 rather than a 5.

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