Skip to main content
Glama

swiss-living-index

Canton metric history

get_trend
Read-onlyIdempotent

Historical year-series for a metric in one canton (e.g. sunshine back to 1884, migration to 1981, rent to 2010). metric = key from list_metrics with history: rent_mean, net_migration_per_1000, foreigner_pct, sunshine_hours, balance_per_capita, beds_per_1000, jobs, unemployment_pct (SECO yearly averages to 1993). Optional from_year.

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": {
      "canton": "<canton>",
      "metric": "<metric>"
    },
    "name": "get_trend"
  }
}

Input Schema

NameRequiredDescriptionDefault
cantonYesCanton as 2-letter abbreviation, e.g. "ZH", "GE", "TI".
metricYesMetric key with a year series, e.g. "rent_mean", "sunshine_hours", "unemployment_pct".
from_yearNoFirst year to return, e.g. 2000; omit for the whole series.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed5 schema fields changed
    • addedInput schema / additionalProperties
      Added value: +false
    • addedInput schema / properties / canton / description
      Added value: +"Canton as 2-letter abbreviation, e.g. \"ZH\", \"GE\", \"TI\"."
    • addedInput schema / properties / from_year / description
      Added value: +"First year to return, e.g. 2000; omit for the whole series."
    • addedInput schema / properties / metric / description
      Added value: +"Metric key with a year series, e.g. \"rent_mean\", \"sunshine_hours\", \"unemployment_pct\"."
    • addedInput schema / properties / metric / enum
      Added value: +[
      +  "rent_mean",
      +  "net_migration_per_1000",
      +  "foreigner_pct",
      +  "sunshine_hours",
      +  "population",
      +  "heat_days",
      +  "tropical_nights",
      +  "frost_days",
      +  "balance_per_capita",
      +  "beds_per_1000",
      +  "crime_per_1000",
      +  "electricity_rp_kwh",
      +  "jobs",
      +  "unemployment_pct",
      +  "violent_crime_per_1000",
      +  "population_growth_pct",
      +  "net_debt_per_capita",
      +  "birth_rate_per_1000",
      +  "ev_share_new_cars_pct",
      +  "cars_per_1000",
      +  "ev_share_stock_pct",
      +  "motorbikes_per_1000",
      +  "goods_vehicles_per_1000",
      +  "cross_border_share_of_jobs_pct",
      +  "median_net_income_chf",
      +  "pv_w_per_capita",
      +  "organic_area_share_pct",
      +  "naturalisations_total",
      +  "naturalisation_rate"
      +]
  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/non-destructive, so the safety profile is covered. The description adds substantive context beyond that: data provenance ("SECO yearly averages to 1993") and per-metric start years, which tell the agent what coverage to expect. It omits return shape and ordering, which matters since there is no output schema.

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?

Front-loaded with the core statement, then progressively adds the metric constraint, examples, and the optional parameter. The inline metric list is dense but each item is functional; nothing is redundant 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 read-only 3-parameter query with no output schema, it covers input constraints, coverage ranges, and a caveat about SECO data. What's missing is a note on response shape (year/value pairs, ordering, behavior when a metric lacks history for the requested canton).

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 baseline is 3, but the description adds real value by constraining the 29-value metric enum to the subset that actually has a year series, which the schema does not convey. from_year is only restated ("omit for the whole series") rather than enriched.

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 a specific verb and resource ("Historical year-series for a metric in one canton") plus concrete examples of series depth (sunshine back to 1884, migration to 1981, rent to 2010). This clearly separates it from siblings like rank_by_metric or compare_cantons, which operate across cantons rather than across time.

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 the key routing prerequisite — metric must be a key from list_metrics that has a history — and names the eight metrics that qualify. It does not explicitly say when to prefer this over compare_cantons or rank_by_metric, so the exclusions are implied rather than stated.

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