Skip to main content
Glama
vinvuk

Apiverket MCP Server

Query Apiverket API

govdata_query
Read-onlyIdempotent

Call any Apiverket API endpoint to access Swedish government data, providing endpoint path and optional parameters for weather, jobs, transport, and other public information.

Instructions

Call any Apiverket API endpoint to retrieve Swedish government data.

Use govdata_discover first to find the right endpoint path and required parameters. Then call this tool with the endpoint path and any path/query parameters.

Args:

  • endpoint (string, required): The API path (e.g. "/v1/weather/{city}")

  • path_params (object, optional): Values for path parameters like {city}, {code}, {id}

  • query_params (object, optional): Query string parameters (q, limit, offset, lat, lon, etc.)

Examples:

  • Current weather in Stockholm: endpoint="/v1/weather/{city}", path_params={"city": "stockholm"}

  • Search jobs: endpoint="/v1/jobs/search", query_params={"q": "developer", "limit": 5}

  • Train departures from Stockholm Central: endpoint="/v1/transport/trains/{station}", path_params={"station": "Cst"}

  • Exchange rates: endpoint="/v1/rates"

  • Population by municipality: endpoint="/v1/population/{municipalityCode}", path_params={"municipalityCode": "0180"}

  • Police events in Stockholm: endpoint="/v1/police/events", query_params={"location": "Stockholm", "limit": 10}

  • Find EV chargers near a location: endpoint="/v1/infrastructure/ev-chargers", query_params={"lat": 59.33, "lon": 18.07}

Returns: The API response as JSON, containing a "meta" envelope with request info and a "data" object with the actual data.

Error handling:

  • Returns clear error messages if the API is unreachable, the endpoint doesn't exist, or parameters are invalid

  • Large responses are automatically truncated with pagination guidance

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
endpointYesAPI endpoint path from the discover tool (e.g. '/v1/weather/{city}', '/v1/rates', '/v1/police/events')
path_paramsNoPath parameter values to substitute in the endpoint URL. Example: { "city": "stockholm" } for /v1/weather/{city}
query_paramsNoQuery string parameters. Example: { "q": "developer", "limit": 5 } for search endpoints
Behavior4/5

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

Annotations declare readOnlyHint=true, destructiveHint=false, idempotentHint=true. The description adds value by explaining the return format ('meta envelope with data'), error handling (clear messages, automatic truncation with pagination guidance), and that large responses are truncated. No contradiction with annotations.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is well-structured with clear sections (Args, Examples, Returns, Error handling). It is appropriately sized—every sentence provides necessary information without redundancy. Examples are concrete and diverse.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Despite no output schema, the description explains the return structure and error behavior. It covers all 3 parameters thoroughly, references the sibling tool, and gives ample examples. The tool's complexity is well-addressed.

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%. The description enhances understanding with examples showing how path_params substitute in the URL and query_params are for query strings. It also explains what types of parameters are expected ('string' for path_params; 'string, number, boolean' for query_params), adding meaning beyond the schema.

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?

The description clearly states 'Call any Apiverket API endpoint to retrieve Swedish government data.' It specifies the verb 'Call' and the resource 'any endpoint'. It distinguishes from the sibling tool 'govdata_discover' by directing users to use discover first for finding endpoints, then query for calling them.

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

Usage Guidelines5/5

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

The description explicitly says 'Use govdata_discover first to find the right endpoint path and required parameters. Then call this tool...' This provides clear when-to-use guidance and names the alternative tool.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/vinvuk/apiverket-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server