Skip to main content
Glama

Query Table

query_table
Read-onlyIdempotent

POST a PxWeb query to a Kosovo ASKdata table and return observations as json-stat2. body must be {query:[{code, selection:{filter,values}}], response:{format:'json-stat2'}}. PxWeb caps responses at ~10,000 cells — use codes from table_meta to narrow selections across dimensions.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
bodyYes{query: [{code, selection: {filter, values}}], response: {format: "json-stat2"}}
pathYese.g. "ASKdata/Prices/Consumer Price Index/Annual indicators/T4CPI.px"

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedInput schema / examples
      Previous value: -[
      -  {
      -    "body": {
      -      "query": [
      -        {
      -          "code": "Year",
      -          "selection": {
      -            "filter": "item",
      -            "values": [
      -              "2022",
      -              "2023"
      -            ]
      -          }
      -        }
      -      ],
      -      "response": {
      -        "format": "json-stat2"
      -      }
      -    },
      -    "path": "ASKdata/Prices/Consumer Price Index/Annual indicators/T4CPI.px"
      -  }
      -]New value: +[
      +  {
      +    "body": {
      +      "query": [
      +        {
      +          "code": "grupet kryesore të COICOP-it",
      +          "selection": {
      +            "filter": "item",
      +            "values": [
      +              "0"
      +            ]
      +          }
      +        },
      +        {
      +          "code": "viti",
      +          "selection": {
      +            "filter": "item",
      +            "values": [
      +              "0",
      +              "1"
      +            ]
      +          }
      +        }
      +      ],
      +      "response": {
      +        "format": "json-stat2"
      +      }
      +    },
      +    "path": "ASKdata/Prices/Consumer Price Index/Annual indicators/T4CPI.px"
      +  }
      +]
  2. Changed1 schema field changed
    • addedInput schema / examples
      Added value: +[
      +  {
      +    "body": {
      +      "query": [
      +        {
      +          "code": "Year",
      +          "selection": {
      +            "filter": "item",
      +            "values": [
      +              "2022",
      +              "2023"
      +            ]
      +          }
      +        }
      +      ],
      +      "response": {
      +        "format": "json-stat2"
      +      }
      +    },
      +    "path": "ASKdata/Prices/Consumer Price Index/Annual indicators/T4CPI.px"
      +  }
      +]
  3. First observed

TDQS

A4.2/5.0
Behavior4/5

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

Annotations already declare readOnly, openWorld, idempotent, and non-destructive behavior, so the description does not need to restate those. It adds useful behavioral context beyond the annotations: the 10,000-cell response cap, the need to narrow selections, and the json-stat2 output contract. No contradiction with annotations is present.

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?

Two sentences deliver the action, resource, response format, required request body, and a critical operational constraint. Every sentence earns its place, and the most important usage information is front-loaded.

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?

The description covers what the tool returns, how to form the request, how to handle the response-size limit, and where to get dimension codes. The input schema provides path/body examples, and annotations cover the safety profile. It does not enumerate potential error conditions or fully explain all query behavior, but it is sufficient for an agent to invoke the tool correctly in the common case.

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

Parameters3/5

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

Schema description coverage is 100%, and the description mostly repeats the body structure already present in the schema. It does add the meaningful tip about using codes from table_meta to stay under the cell cap, which relates to constructing selection values, but the core parameter semantics are already carried by the schema and examples.

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 opens with a specific action and resource: 'POST a PxWeb query to a Kosovo ASKdata table and return observations as json-stat2.' It clearly identifies what the tool does and its domain, and it distinguishes itself from helpers like table_meta by focusing on query execution rather than metadata inspection.

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?

The description gives concrete invocation context: the required body shape, the expected response format, and a critical guardrail that PxWeb caps responses at ~10,000 cells. It also points to table_meta as a companion for narrowing selections. It stops short of explicit when-not-to-use wording, but the guidance is actionable and clear.

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.