Skip to main content
Glama

Search buses

mb_search_buses
Read-onlyIdempotent

Search intercity buses by origin, destination, and date to compare companies, terminals, departure times, seat prices, and available seats.

Instructions

Intercity buses on a date: company, terminal, times, price per seat, free seats, bus type, stops, refund penalties.

A city id covers all its terminals. price_toman is per seat. Top-level refund_penalties apply to every bus unless a bus lists its own (until_hours_before: step applies until then, null = up to departure). Next: mb_bus_seats with a bus_id; other days: mb_bus_price_calendar.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "origin": "<origin>",
      "destination": "<destination>",
      "date": "<date>"
    },
    "name": "mb_search_buses"
  }
}

Input Schema

NameRequiredDescriptionDefault
dateYesDeparture date YYYY-MM-DD.
sortNoOrder of the buses.earliest
limitNoMax buses.
originYesBus city or terminal id from mb_find_place(mode='bus'), e.g. 11320000 (Tehran).
vip_onlyNoOnly VIP buses.
companiesNoOnly these company ids from `companies` of a result, e.g. [4, 16].
destinationYesBus city or terminal id from mb_find_place(mode='bus'), e.g. 11320000 (Tehran).
depart_afterNoLocal time HH:MM, e.g. '18:00'.
depart_beforeNoLocal time HH:MM, e.g. '18:00'.
include_sold_outNoAlso list buses with no free seat.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed15 schema fields changedv0.5.0
    • removedInput schema / properties / companies / anyOf
      Removed value: -[
      -  {
      -    "items": {
      -      "minimum": 1,
      -      "type": "integer"
      -    },
      -    "maxItems": 10,
      -    "type": "array"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • changedInput schema / properties / companies / description
      Previous value: -"Only these company ids, from `companies` of a result or mb_companies(mode='bus'), e.g. [4, 16]."New value: +"Only these company ids from `companies` of a result, e.g. [4, 16]."
    • addedInput schema / properties / companies / items
      Added value: +{
      +  "minimum": 1,
      +  "type": "integer"
      +}
    • addedInput schema / properties / companies / maxItems
      Added value: +10
    • addedInput schema / properties / companies / type
      Added value: +[
      +  "array",
      +  "null"
      +]
    • changedInput schema / properties / date / description
      Previous value: -"Departure date YYYY-MM-DD, e.g. '2026-10-20'."New value: +"Departure date YYYY-MM-DD."
    • removedInput schema / properties / depart_after / anyOf
      Removed value: -[
      -  {
      -    "pattern": "^([01]\\d|2[0-3]):[0-5]\\d$",
      -    "type": "string"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • addedInput schema / properties / depart_after / pattern
      Added value: +"^([01]\\d|2[0-3]):[0-5]\\d$"
    • addedInput schema / properties / depart_after / type
      Added value: +[
      +  "string",
      +  "null"
      +]
    • removedInput schema / properties / depart_before / anyOf
      Removed value: -[
      -  {
      -    "pattern": "^([01]\\d|2[0-3]):[0-5]\\d$",
      -    "type": "string"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • addedInput schema / properties / depart_before / pattern
      Added value: +"^([01]\\d|2[0-3]):[0-5]\\d$"
    • addedInput schema / properties / depart_before / type
      Added value: +[
      +  "string",
      +  "null"
      +]
    • changedInput schema / properties / destination / description
      Previous value: -"Bus city or terminal id from mb_find_place(mode='bus'), e.g. 11320000 (Tehran, all terminals) or 31310000 (Mashhad)."New value: +"Bus city or terminal id from mb_find_place(mode='bus'), e.g. 11320000 (Tehran)."
    • changedInput schema / properties / origin / description
      Previous value: -"Bus city or terminal id from mb_find_place(mode='bus'), e.g. 11320000 (Tehran, all terminals) or 31310000 (Mashhad)."New value: +"Bus city or terminal id from mb_find_place(mode='bus'), e.g. 11320000 (Tehran)."
    • removedInput schema / title
      Removed value: -"mb_search_busesArguments"
  2. Changed11 schema fields changedv0.3.0
    • removedInput schema / properties / companies / title
      Removed value: -"Companies"
    • removedInput schema / properties / date / title
      Removed value: -"Date"
    • removedInput schema / properties / depart_after / title
      Removed value: -"Depart After"
    • removedInput schema / properties / depart_before / title
      Removed value: -"Depart Before"
    • removedInput schema / properties / destination / title
      Removed value: -"Destination"
    • removedInput schema / properties / include_sold_out / title
      Removed value: -"Include Sold Out"
    • removedInput schema / properties / limit / title
      Removed value: -"Limit"
    • removedInput schema / properties / origin / title
      Removed value: -"Origin"
    • removedInput schema / properties / sort / title
      Removed value: -"Sort"
    • removedInput schema / properties / vip_only / title
      Removed value: -"Vip Only"
    • changedOutput schema / (root)
      Previous value: -{
      -  "additionalProperties": true,
      -  "title": "mb_search_busesDictOutput",
      -  "type": "object"
      -}New value: +null
  3. First observedv0.1.0

TDQS

A3.8/5.0
Behavior3/5

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

Annotations already declare readOnlyHint, idempotentHint, openWorldHint and destructiveHint=false, so the safety profile needs no restating. The description adds genuine behavioral context the annotations cannot: a city id covers all its terminals, price_toman is per seat rather than per booking, and refund_penalties are inherited unless a bus overrides them. Pagination and limit behavior are left to the schema, so this sits at a solid 3 rather than higher.

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 sentences, tightly front-loaded: what is returned first, then two interpretive rules, then routing. No filler and no repetition of schema detail.

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 burden of telling the agent what comes back — and it does, field by field, plus the refund-penalty inheritance rule that would otherwise be invisible. It does not describe limit/pagination interaction across pages, which is the only remaining gap for a 10-parameter search.

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 baseline is 3. The description contributes one real semantic clarification beyond the schema — that origin/destination city ids cover all terminals — while the per-seat pricing note concerns results rather than inputs.

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?

"Intercity buses on a date" plus an enumeration of the returned fields (company, terminal, times, price per seat, free seats, bus type, stops, refund penalties) makes the resource and result shape unmistakable, and the bus framing separates it from mb_search_trains/mb_search_flights/mb_search_taxis. The action verb itself is only implied rather than stated, which keeps it short of a 5.

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 routes the agent forward explicitly: mb_bus_seats with a bus_id for seat selection, mb_bus_price_calendar for other days. It does not state any negative cases (e.g. when to prefer mb_alternative_routes), but the sequencing guidance is concrete and actionable.

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