Skip to main content
Glama

노선 운행 간격 분석

analyze_headway

Calculates bus headways on a route, returning stop gaps, spacing ratios, and estimated minutes to identify bunching, service gaps, and unlocated buses.

Instructions

노선에서 운행 중인 버스들의 앞뒤 차 간격을 계산합니다. 각 간격의 정류장 수(gapStops), 균등 배치 대비 비율(ratio, 1이 균등), 추정 시간 간격(estMin, 분)을 돌려줍니다. ratio가 작으면 앞차와 붙어 있는 것(몰림)이고, 크면 간격이 벌어진 것(공백)입니다. 마지막 간격(crossesOrigin)은 노선 끝에서 기점을 지나 첫 차까지의 순환 간격이고, 위치를 모르는 차량은 unlocatedBuses로 따로 돌려줍니다. 판단 기준은 이 도구가 정하지 않으니, 결과의 notes에 적힌 가정과 한계를 함께 안내하세요.

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": {
      "cityCode": "<cityCode>",
      "routeId": "<routeId>"
    },
    "name": "analyze_headway"
  }
}

Input Schema

NameRequiredDescriptionDefault
routeIdYes노선 ID. search_routes 등에서 얻음. 예: 'DJB30300041'
cityCodeYeslist_cities로 얻은 도시 코드. 예: 25(대전)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.4.0

TDQS

A3.7/5.0
Behavior4/5

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

With no annotations, the description carries the full burden and does substantial work: it explains what each returned value means, how to read a small ratio (bunching) versus a large one (a gap), that the last interval is a wrap-around from route end to first bus, and that unlocated vehicles are returned separately. It also warns that the tool does not set thresholds and that assumptions/limits live in the result's notes, which is exactly the kind of behavioral caveat an agent needs.

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?

The description is dense but front-loaded: purpose first, then each returned field and its interpretation, then the caveat. Every sentence carries information, though the field-by-field enumeration is slightly list-like rather than tightly structured.

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?

There is no output schema, so the description's explanation of gapStops, ratio, estMin, crossesOrigin, and unlocatedBuses is essential and present. It also flags the notes-based caveats. Remaining minor gaps are edge cases such as a route with zero or one active bus, which the agent cannot anticipate.

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%, with both cityCode and routeId documented including provenance (list_cities, search_routes) and examples. The description adds nothing about the parameters beyond the schema, so the baseline 3 applies.

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?

The description states a specific verb and resource: it computes the spacing between consecutive buses on a route ('운행 중인 버스들의 앞뒤 차 간격을 계산합니다'). It also enumerates the returned metrics, so an agent can tell this analytic tool apart from siblings that return raw arrivals or locations. It stops short of naming a sibling explicitly, which keeps it at 4.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Usage is implied rather than stated: you call it to assess bunching/gaps on a given route. There is no explicit 'use this instead of get_bus_arrivals when…' routing guidance and no stated prerequisites beyond the schema, so the agent must infer the choice from the purpose statement.

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