Skip to main content
Glama

swiss-living-index

Commute cost

commute_cost
Read-onlyIdempotent

Monthly commute cost between two Swiss places: by car at the official Swiss average fuel price (BFS) and by electric car at the home commune official electricity tariff (ElCom H4), plus the public-transport journey time (Swiss timetable). Distance defaults to straight line × 1.3 between the stations (labelled estimate) unless km_one_way is given. Public-transport fares are not open official data and are not included.

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": {
      "from": "<from>",
      "to": "<to>"
    },
    "name": "commute_cost"
  }
}

Input Schema

NameRequiredDescriptionDefault
toYesWork place: Swiss postcode or locality, e.g. "Zürich" or "8001".
fromYesHome place: Swiss postcode or locality, e.g. "Winterthur" or "8400".
fuelNounleaded95 or diesel
ev_kwhNokWh/100 km, default 18
km_one_wayNoRoad distance one way in km, e.g. 25; omit to use the routed distance between from and to.
consumption_lNol/100 km, default 7
days_per_monthNoCommuting days per month, e.g. 20 (default 20).

Output Schema

NameRequiredDescriptionDefault
attributionNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed6 schema fields changed
    • addedInput schema / additionalProperties
      Added value: +false
    • changedInput schema / properties / days_per_month / description
      Previous value: -"default 20"New value: +"Commuting days per month, e.g. 20 (default 20)."
    • changedInput schema / properties / from / description
      Previous value: -"home place"New value: +"Home place: Swiss postcode or locality, e.g. \"Winterthur\" or \"8400\"."
    • addedInput schema / properties / km_one_way / description
      Added value: +"Road distance one way in km, e.g. 25; omit to use the routed distance between from and to."
    • changedInput schema / properties / to / description
      Previous value: -"work place"New value: +"Work place: Swiss postcode or locality, e.g. \"Zürich\" or \"8001\"."
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "properties": {
      +    "attribution": {
      +      "type": "string"
      +    }
      +  },
      +  "type": "object"
      +}
  2. Added

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, openWorld, and non-destructive. The description adds valuable behavioral context: distance defaults to straight line × 1.3 (labelled estimate) unless km_one_way is given, data sources are specified, and a key limitation (PT fares not included) is disclosed.

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?

A single dense paragraph that front-loads the core purpose and packs key defaults and exclusions efficiently. Slightly dense but no wasted sentences.

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?

The tool operates on open data and returns structured results (output schema exists). The description covers data sources, default behavior, and a critical exclusion, making it sufficiently complete for an agent to call it correctly.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so the baseline is 3. The description goes further by explaining the default distance estimation logic (straight line × 1.3 between stations labelled estimate) and reminds that km_one_way overrides it, adding meaning beyond the schema's parameter descriptions.

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 specific verb (cost calculation) and resource (monthly commute between two Swiss places), and details the exact data sources (BFS fuel price, ElCom H4 electricity tariff, Swiss timetable). Clearly distinguishable from siblings like household_budget or get_housing_costs.

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?

Provides clear context for when to use (computing commute costs by car/EV with optional PT journey time) and explicitly notes an exclusion (public-transport fares not included). Does not name an alternative sibling tool, keeping it below the top score.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources