Skip to main content
Glama

Rank bus listings

rank_buses
Read-onlyIdempotent

Scores real bus listings by trust, bus type, departure time, and fare, drops buses that already left, then returns a ranked table with a booking link per bus.

Instructions

Rank real bus listings for the traveller and give each one a booking link.

Use after plan_bus_trip, once real results are visible (opened in a browser or pasted by the user). Scores each bus for trust (government operator, copycat names, rating weighted by reviews, live tracking, boarding point), checks the bus type (semi-sleeper is not a sleeper), drops buses that already left today, and returns a ranked table with a link per bus.

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>",
      "travel_date": "<travel_date>",
      "buses": "<buses>"
    },
    "name": "rank_buses"
  }
}

Input Schema

NameRequiredDescriptionDefault
busesYesBuses copied from a booking site's results page (what you or the user can see). Never invent entries.
originYesStarting city, as for plan_bus_trip.
sort_byNo'best' balances trust, fit, price and seats; 'earliest' puts the soonest catchable bus first.best
bus_typeNoSeat/AC preference to rank by.any
around_timeNoTime the traveller wants to leave, HH:MM (e.g. '09:00' for 'around 9 am'). Buses near it rank higher.
destinationYesDestination city.
travel_dateYesDeparture date as YYYY-MM-DD (IST).

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.7.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, but the description adds genuinely non-obvious behavior: it scores each bus on trust signals (government operator, copycat names, review-weighted rating, live tracking, boarding point), validates bus type, and silently drops buses that already left today. That filtering effect is important disclosure for a 'read-only' tool. It stops short of saying what happens if every bus is filtered out or how ties are broken.

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 paragraphs, front-loaded with the action and output, then the precondition and the ranking behavior. Every clause carries information (trust signals, type check, expiry drop, return shape) with no 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?

For a 7-parameter tool with a nested up-to-40-item bus array and no output schema, the description covers purpose, precondition, ranking logic, filtering side effect, and return shape. Remaining gaps are minor but real: no guidance on handling duplicate listings across the same bus on multiple platforms, and no mention of what the response looks like when entries are dropped or the list is empty.

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 does add some meaning beyond the schema by explaining that 'semi-sleeper is not a sleeper' and that review_count weight and live tracking feed the trust score, which helps the agent populate nested bus fields correctly, but it doesn't clarify sort_by trade-offs or the around_time tolerance in any detail beyond the schema text.

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?

The description opens with a specific verb+resource ('Rank real bus listings') and states the output ('a ranked table with a link per bus'). It is clearly separable from siblings like plan_bus_trip (planning) and check_operator (single-operator lookup) without opening any schema.

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 gives an explicit prerequisite and timing: 'Use after plan_bus_trip, once real results are visible (opened in a browser or pasted by the user).' That is clear when-to-use context. The main gap is that it never names the near-identical sibling rank_pasted_results, so the agent must infer which of the two to invoke for pasted data.

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