mcp

v1.2.1
io.github.sedis-ab/mcp Checked 1 day ago Published 1 month ago

Read-only MCP tools for the Sedis PartnerAPI v2 (Bolagsanalys + Fastighetsbenchmark).

These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.

bolagsanalys_list_companies List listed companies (Bolagsanalys)

Read-only. Search Sedis's catalog of listed companies by name fragment or country code and return each company's `companyId` and name. This is the FIRST step of the Bolagsanalys flow: take a `companyId` from here and pass it to `bolagsanalys_get_data` to fetch its quarterly figures. Example: nameContains 'Volvo', countryCode 'SE'. Reference data shared across all tenants; this tool never writes or ingests.

ParameterTypeDescription
countryCodestringISO-3166 alpha-2 country code, e.g. 'SE'.
nameContainsstringCase-insensitive company-name fragment, e.g. 'Volvo'.
pageinteger1-indexed result page (first page = 1), e.g. 1.
pageSizeintegerRows per page (v2 default 50, max 500), e.g. 50.
sortstringComma-separated sort fields; prefix '-' for descending, e.g. '-name'.

bolagsanalys_find_parameter Find a Bolagsanalys parameter

Read-only. Discover the right financial parameter by name fragment or group and return each parameter's `code`, English name, group and description. Use this to resolve the `parameterCode` you then pass to `bolagsanalys_get_data` (alongside a `companyId` from `bolagsanalys_list_companies`). Example: nameContains 'revenue', group 'Income statement'. Shared reference data; read-only — never writes.

ParameterTypeDescription
groupstringParameter group name to filter by, e.g. 'Income statement'.
langstringLanguage for names/descriptions; English default, 'sv' for Swedish.
nameContainsstringCase-insensitive parameter-name fragment, e.g. 'revenue'.
pageinteger1-indexed result page (first page = 1), e.g. 1.
pageSizeintegerRows per page (v2 default 50, max 500), e.g. 50.
sortstringComma-separated sort fields; prefix '-' for descending, e.g. '-name'.

bolagsanalys_get_data Get Bolagsanalys quarterly figures

Read-only. Fetch quarterly figures for one company — optionally narrowed to a single parameter and a quarter range. Pass a `companyId` from `bolagsanalys_list_companies` and (optionally) a `parameterCode` from `bolagsanalys_find_parameter`. Quarter bounds use packed ids: `quarterId`, `fromDate`, `toDate` accept e.g. '20251' or '2025Q1' (these are QUARTERS, not calendar dates). Example: companyId 'SE-VOLV-B', parameterCode 'REV', fromDate '2024Q1', toDate '2025Q4'. Every row keeps its `companyId` and `parameterCode`; read-only — never writes.

ParameterTypeDescription
companyIdstringCompany id from bolagsanalys_list_companies, e.g. 'SE-VOLV-B'. Omit to fetch ALL companies for the parameter/quarter (enables one-call ranking/aggregation).
countbooleanfalse (default) skips totalCount for cheaper bulk paging.
fromDatestringInclusive lower quarter bound, e.g. '20241' or '2024Q1'.
pageinteger1-indexed result page (first page = 1), e.g. 1.
pageSizeintegerRows per page (v2 default 50, max 500), e.g. 50.
parameterCodestringParameter code from bolagsanalys_find_parameter; omit for all parameters.
quarterIdstringSingle packed quarter, e.g. '20251' or '2025Q1'.
sortstringComma-separated sort fields; prefix '-' for descending, e.g. '-name'.
toDatestringInclusive upper quarter bound, e.g. '20254' or '2025Q4'.

bolagsanalys_search_data Search Bolagsanalys figures for many companies (batch)

Read-only. Fetch quarterly figures for a SPECIFIC SET of companies in one call by passing `companyIds` (up to 50, from `bolagsanalys_list_companies`), optionally narrowed to a `parameterCode` (from `bolagsanalys_find_parameter`) and a quarter range. Use this for a specific N-company subset — v2's GET has no companyIdIn, so to fetch ALL companies instead omit `companyId` on `bolagsanalys_get_data`. Quarter bounds use packed ids: `quarterId`, `fromDate`, `toDate` accept e.g. '20251' or '2025Q1' (QUARTERS, not calendar dates). The cap is 50 — more is rejected. Returns the same envelope as `bo…

ParameterTypeDescription
companyIdstringSingle company id; OR'd with companyIds.
companyIdsarrayUp to 50 company ids (from bolagsanalys_list_companies) to fetch in one call; over 50 is rejected.
countbooleanfalse (default) skips totalCount for cheaper bulk paging.
fromDatestringInclusive lower quarter bound, e.g. '20241' or '2024Q1'.
pageinteger1-indexed result page (first page = 1), e.g. 1.
pageSizeintegerRows per page (v2 default 50, max 500), e.g. 50.
parameterCodestringParameter code from bolagsanalys_find_parameter; omit for all parameters.
quarterIdstringSingle packed quarter, e.g. '20251' or '2025Q1'.
sortstringComma-separated sort fields; prefix '-' for descending, e.g. '-name'.
toDatestringInclusive upper quarter bound, e.g. '20254' or '2025Q4'.

fastighetsbenchmark_find_parameter Find a Fastighetsbenchmark parameter

Read-only. Discover the right real-estate benchmark parameter by name fragment or group and return each parameter's `code`, English name, `dataType` (decimal/boolean/enum/date) and — for enum parameters — its `enumValues` legal-value domain. Use this to resolve the `parameterCode` you pass to `fastighetsbenchmark_get_comp_timeseries`, and read `dataType` to know which CompDatum value member to trust. Example: nameContains 'Total return'. Shared reference data; read-only — never writes.

ParameterTypeDescription
groupstringParameter group name to filter by, e.g. 'Return'.
langstringLanguage for names/descriptions; English default, 'sv' for Swedish.
nameContainsstringCase-insensitive parameter-name fragment, e.g. 'Total return'.
pageinteger1-indexed result page (first page = 1), e.g. 1.
pageSizeintegerRows per page (v2 default 50, max 500), e.g. 50.
sortstringComma-separated sort fields; prefix '-' for descending, e.g. '-name'.

fastighetsbenchmark_search_property_units Search your property units (Fastighet)

Read-only. Find YOUR property units (Fastighet) by exact name, name fragment, property-type id, municipality, or comparison-zone membership, returning each unit's `sedisId` — the stable, case-sensitive key to use in every later call. `name` is the customer's own designation; an official property designation (fastighetsbeteckning, e.g. 'Klara 1:1') is not a name and is not searchable. Look up property-type and municipality ids with `fastighetsbenchmark_list_property_types` / `fastighetsbenchmark_list_municipalities`. This is the §8 A6 flow's object-finding step: take a comparison zone from `…

ParameterTypeDescription
belongsToJamforelseobjektSedisIdstringComparison-zone sedisId (from list_jamforelseobjekt) — returns only your units in that zone, e.g. 'JO-A'.
includeGeometrybooleanfalse (default, lean) omits geometry; true opts the heavy geometry member into the response via ?fields=.
langstringLanguage for names/descriptions; English default, 'sv' for Swedish.
municipalityIdintegerMunicipality id to filter by; look ids up with fastighetsbenchmark_list_municipalities (e.g. Stockholm = 21).
namestringExact property-unit name (your own designation), case-insensitive — returns that one unit, e.g. 'Kontoret Gladan 4'.
nameContainsstringCase-insensitive property-unit-name fragment, e.g. 'Office'.
pageinteger1-indexed result page (first page = 1), e.g. 1.
pageSizeintegerRows per page (v2 default 50, max 500), e.g. 50.
propertyTypeintegerProperty-type id (int, NOT a name); look ids up with fastighetsbenchmark_list_property_types, e.g. 2.
propertyTypeNamestringProperty-type by NAME (locale-aware), e.g. 'Office'/'Kontor'; alternative to the numeric propertyType id.
sortstringComma-separated sort fields; prefix '-' for descending, e.g. '-name'.

fastighetsbenchmark_list_samlingar List your collections (Samling)

Read-only. List YOUR collections (Samling). Each row exposes its members as `containingCompSedisIds` — an array of ids, not nested objects — so you can reference-then-resolve: take those ids and pass them to `fastighetsbenchmark_get_comp_timeseries` via `sedisIdIn` only for the collections you actually need (this keeps payloads bounded). Example: nameContains 'Stockholm offices'. Tenant-scoped to your data; read-only — never writes (creating/replacing/deleting a Samling is not exposed here).

ParameterTypeDescription
nameContainsstringCase-insensitive collection-name fragment, e.g. 'Stockholm offices'.
pageinteger1-indexed result page (first page = 1), e.g. 1.
pageSizeintegerRows per page (v2 default 50, max 500), e.g. 50.
sortstringComma-separated sort fields; prefix '-' for descending, e.g. '-name'.

fastighetsbenchmark_list_jamforelseobjekt List your comparison zones (Jämförelseobjekt)

Read-only. List YOUR comparison zones (Jämförelseobjekt — your clones of a Sedis-owned aggregate), returning each zone's `sedisId`. This is the FIRST step of the §8 A6 flow: find a zone by name here, then pass its `sedisId` to `fastighetsbenchmark_search_property_units` as `belongsToJamforelseobjektSedisId` to find your units in it. Lean by default: set `detail: true` to opt into the tenant-filtered `containsPropertyUnits` lineage. Example: nameContains 'Stockholm'. Tenant-scoped to your data; read-only — never writes.

ParameterTypeDescription
detailbooleanfalse (default, lean) omits lineage; true opts the tenant-filtered containsPropertyUnits array in via ?fields=.
nameContainsstringCase-insensitive comparison-zone-name fragment, e.g. 'Stockholm'.
pageinteger1-indexed result page (first page = 1), e.g. 1.
pageSizeintegerRows per page (v2 default 50, max 500), e.g. 50.
sortstringComma-separated sort fields; prefix '-' for descending, e.g. '-name'.

fastighetsbenchmark_get_comp_timeseries Get the CompDatum time-series

Read-only. Pull the actual benchmarking numbers (CompDatum time-series) for one or more Comps. This is the FINAL step of the §8 A6 flow: pass the `sedisId`s you found (from `fastighetsbenchmark_search_property_units`, `_list_samlingar`'s `containingCompSedisIds`, or `_list_jamforelseobjekt`) as a comma-separated `sedisIdIn`, plus a `parameterCode` from `fastighetsbenchmark_find_parameter` and an ISO date range. Each row is SELF-DESCRIBING via `dataType` (decimal/boolean/enum/date) — read the matching member (`figure`/`boolean`/`enum`/`date`); an enum resolves to `{ value, name, enumType }`,…

ParameterTypeDescription
sedisIdIn *stringComma-separated Comp sedisIds to fetch (multi-value), e.g. 'PU-1,PU-2'.
countbooleanfalse (default) skips totalCount for cheaper high-volume bulk paging, e.g. false.
fromDatestringInclusive lower ISO date bound (yyyy-MM-dd), e.g. '2016-01-01'.
pageinteger1-indexed result page (first page = 1), e.g. 1.
pageSizeintegerRows per page (v2 default 50, max 500), e.g. 50.
parameterCodestringCompParameter code from fastighetsbenchmark_find_parameter; omit for all parameters, e.g. 'NX71'.
toDatestringInclusive upper ISO date bound (yyyy-MM-dd), e.g. '2026-12-31'.

fastighetsbenchmark_list_reference_zones List reference zones (shared)

Read-only. List the SHARED Sedis-owned reference zones — the same for every key, with NO tenant filter (these are not your private data). Each row exposes its `sedisId`, `name`, and `sourceName` (the external-reference provider, e.g. 'Nils Holgersson'). Use a reference zone as a market benchmark to compare against your own comparison zones and property units. Example: nameContains 'Stockholm'. Shared reference data; read-only — never writes.

ParameterTypeDescription
nameContainsstringCase-insensitive reference-zone-name fragment, e.g. 'Stockholm'.
pageinteger1-indexed result page (first page = 1), e.g. 1.
pageSizeintegerRows per page (v2 default 50, max 500), e.g. 50.
sortstringComma-separated sort fields; prefix '-' for descending, e.g. '-name'.

fastighetsbenchmark_list_municipalities List municipalities (shared)

Read-only. Look up municipality ids — the `municipalityId` filter of `fastighetsbenchmark_search_property_units`. Shared reference data, the same for every key. Each row has `id`, `name`, `countryCode` and `code` (the official municipality code; for Sweden the SCB kommunkod, e.g. '0180'). Example: nameContains 'Stockholm' → id 21. Read-only — never writes.

ParameterTypeDescription
codestringExact official municipality code (Sweden: SCB kommunkod), e.g. '0180'.
countryCodestringISO 3166-1 alpha-2 country, e.g. 'SE'.
nameContainsstringCase-insensitive municipality-name fragment, e.g. 'Stockholm'.
pageinteger1-indexed result page (first page = 1), e.g. 1.
pageSizeintegerRows per page (v2 default 50, max 500), e.g. 50.
sortstringComma-separated sort fields; prefix '-' for descending, e.g. '-name'.

fastighetsbenchmark_list_property_types List property types (shared)

Read-only. Look up property-type ids — the `propertyType` filter of `fastighetsbenchmark_search_property_units` and the domain of the EB0 parameter. Shared reference data, the same for every key; names are Swedish. Example: nameContains 'Kontor'. Read-only — never writes.

ParameterTypeDescription
nameContainsstringCase-insensitive property-type-name fragment (names are Swedish), e.g. 'Kontor'.
pageinteger1-indexed result page (first page = 1), e.g. 1.
pageSizeintegerRows per page (v2 default 50, max 500), e.g. 50.
sortstringComma-separated sort fields; prefix '-' for descending, e.g. '-name'.

set_session Set the Sedis session token (after re-proving 2FA)

Paste the freshly-minted session token from the Sedis reprove page to refresh this session WITHOUT restarting the client. Use this when a tool returns 'Session re-verification required': open the reproveUrl, complete 2FA, copy the new token, call this tool with it, then retry the original call. The token is cached locally (owner-only file) and sent as the X-Api-Session header on every subsequent call; it is never logged or echoed back.

ParameterTypeDescription
token *stringThe freshly-minted session token from the reprove page (e.g. starts with 'sedis_sess_…'). Open the reproveUrl shown in a 'Session re-verification required' error, complete 2FA, copy the token, and p…

clear_session Clear the cached Sedis session token

Forget the locally-cached session token (removes it from memory and the on-disk cache). After this, calls send no X-Api-Session header until you set_session again. Use it to sign out of the current session.