Skip to main content
Glama

Query Table

query_table
Read-onlyIdempotent

POST a PxWeb selection query to an ÅSUB table and return the data as json-stat2. Path must end in ".px"; body is a PxWeb query object with a "query" array of {code, selection: {filter, values}} entries plus {response: {format: "json-stat2"}}. Narrow each dimension's values to stay under PxWeb's per-response cell limit.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
bodyYes{query: [{code, selection: {filter, values}}], response: {format: "json-stat2"}}
pathYese.g. "Statistik/BE/Befolkningsrörelsen/BE006.px"

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • addedInput schema / examples
      Added value: +[
      +  {
      +    "body": {
      +      "query": [
      +        {
      +          "code": "År",
      +          "selection": {
      +            "filter": "item",
      +            "values": [
      +              "2023",
      +              "2024"
      +            ]
      +          }
      +        },
      +        {
      +          "code": "Region",
      +          "selection": {
      +            "filter": "item",
      +            "values": [
      +              "AX"
      +            ]
      +          }
      +        }
      +      ],
      +      "response": {
      +        "format": "json-stat2"
      +      }
      +    },
      +    "path": "Statistik/BE/Befolkningsrörelsen/BE006.px"
      +  }
      +]
  2. First observed

TDQS

A4.5/5.0
Behavior4/5

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

Annotations already indicate safe, idempotent, read-only behavior. Description adds context about the .px path suffix and the per-response cell limit constraint, which are not in 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?

Three focused sentences with zero waste. The first sentence delivers the core action; the second specifies format; the third provides a critical usage constraint.

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?

Given no output schema, the description explains the request format well but does not detail the json-stat2 response structure. However, the tool is straightforward and the response format is standard.

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

Parameters5/5

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

With 100% schema coverage, description adds substantial meaning: path must end in '.px', body is a PxWeb query object with specific structure, and gives an example. This goes beyond what the schema alone provides.

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 the verb 'POST' and the resource 'ÅSUB table', and specifies the return format 'json-stat2'. It distinguishes from siblings like 'table_meta' by focusing on data retrieval.

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 explicit guidance to narrow dimension values to avoid cell limits. Does not explicitly compare to sibling tools, but implies when to use (for data queries vs. metadata).

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.