Skip to main content
Glama

Query Table

query_table
Read-onlyIdempotent

POST a PxWeb query to a Moldova National Bureau of Statistics (Statbank) 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 — narrow each dimension's values using codes from table_meta.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
bodyYes{query: [{code, selection: {filter, values}}], response: {format: "json-stat2"}}
pathYesPath ending in the ".px" table id.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedInput schema / examples
      Previous value: -[
      -  {
      -    "body": {
      -      "query": [
      -        {
      -          "code": "PERIOD",
      -          "selection": {
      -            "filter": "item",
      -            "values": [
      -              "2020",
      -              "2021",
      -              "2022"
      -            ]
      -          }
      -        },
      -        {
      -          "code": "SEX",
      -          "selection": {
      -            "filter": "item",
      -            "values": [
      -              "1",
      -              "2"
      -            ]
      -          }
      -        }
      -      ],
      -      "response": {
      -        "format": "json-stat2"
      -      }
      -    },
      -    "path": "20 Populatia si procesele demografice/POP010/POPro/POP010100rcl.px"
      -  }
      -]New value: +[
      +  {
      +    "body": {
      +      "query": [
      +        {
      +          "code": "Ani",
      +          "selection": {
      +            "filter": "item",
      +            "values": [
      +              "2025",
      +              "2026"
      +            ]
      +          }
      +        },
      +        {
      +          "code": "Medii",
      +          "selection": {
      +            "filter": "item",
      +            "values": [
      +              "0"
      +            ]
      +          }
      +        },
      +        {
      +          "code": "Sexe",
      +          "selection": {
      +            "filter": "item",
      +            "values": [
      +              "0"
      +            ]
      +          }
      +        }
      +      ],
      +      "response": {
      +        "format": "json-stat2"
      +      }
      +    },
      +    "path": "20 Populatia si procesele demografice/POP010/POPro/POP010100rcl.px"
      +  }
      +]
  2. Changed1 schema field changed
    • addedInput schema / examples
      Added value: +[
      +  {
      +    "body": {
      +      "query": [
      +        {
      +          "code": "PERIOD",
      +          "selection": {
      +            "filter": "item",
      +            "values": [
      +              "2020",
      +              "2021",
      +              "2022"
      +            ]
      +          }
      +        },
      +        {
      +          "code": "SEX",
      +          "selection": {
      +            "filter": "item",
      +            "values": [
      +              "1",
      +              "2"
      +            ]
      +          }
      +        }
      +      ],
      +      "response": {
      +        "format": "json-stat2"
      +      }
      +    },
      +    "path": "20 Populatia si procesele demografice/POP010/POPro/POP010100rcl.px"
      +  }
      +]
  3. First observed

TDQS

A4.4/5.0
Behavior4/5

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

Annotations already declare the safety profile (readOnly, idempotent, non-destructive, open-world). The description adds real behavioral context beyond them: the json-stat2 response format and the ~10,000 cell cap that forces narrowing. Those are constraints an agent cannot infer from the 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 front-loaded sentences with no waste: purpose first, then the required body skeleton, then the cap constraint. Everything earns its place and the most decision-relevant information leads.

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?

For a tool with a nested object parameter and no output schema, the description supplies the required body format, the response format, and the cell cap. It could say slightly more about the json-stat2 return structure, but combined with annotations and schema it is sufficiently complete to call correctly.

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?

With 100% schema coverage the baseline is 3, but the description adds semantics the schema does not: that dimension values must be valid codes sourced from table_meta and that dimension lists should be narrowed. This goes beyond the schema's restatement of the body shape.

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?

States a specific verb (POST a PxWeb query) and resource (Moldova National Bureau of Statistics Statbank table) plus the return format (json-stat2). It also names the sibling table_meta as the source of valid codes, letting an agent distinguish this data-fetch tool from the metadata tool without opening either schema.

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 makes the workflow clear: query the table, and obtain the dimension codes you need from table_meta. It gives a concrete operating constraint (the ~10,000 cell cap and to narrow each dimension accordingly). It stops short of explicit when-not-to-use guidance, but the context for invoking it is 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.