Riksdagsmonitor Intelligence Platform โ€” API Documentation - v0.8.68
    Preparing search index...

    Client for accessing Statistics Sweden (SCB) data via MCP server. Provides domain-based queries and indicator lookups.

    Index

    Constructors

    Properties

    serverUrl: string
    timeout: number
    maxRetries: number

    Methods

    • Search SCB tables by query string.

      Parameters

      • query: string

        Search terms (e.g., 'arbetslรถshet sysselsรคttning')

      • limit: number = 5

        Maximum number of results (default: 5)

      Returns Promise<SCBTableInfo[]>

      Array of matching table info

    • Fetch data from a specific SCB table via the query_table MCP tool.

      The pxweb-mcp server expects table_id and value_codes parameters (not the legacy tableId/selection names).

      Parameters

      • tableId: string

        SCB table identifier (e.g., 'TAB5765')

      • OptionalvalueCodes: Record<string, string>

        Optional value_codes filters passed directly to pxweb-mcp (e.g., { Tid: 'top(4)', Region: '00', Kon: '1+2' })

      Returns Promise<SCBDataPoint[]>

      Array of data points

    • Build an SCBIndicator from raw data points. Computes trend by comparing latest two values.

      Parameters

      • label: string

        Human-readable indicator label

      • dataPoints: readonly SCBDataPoint[]

        Raw data points sorted by period descending

      • tableId: string

        Source SCB table ID

      Returns SCBIndicator

      SCBIndicator or null if no data

    • Parameters

      • toolName: string
      • params: Record<string, unknown>
      • attempt: number = 0

      Returns Promise<unknown>