Skip to main content
Glama

Query Table

query_table
Read-onlyIdempotent

POST a PxWeb query to a MakStat (North Macedonia statistics) table and return observations as json-stat2. body must be {query:[{code, selection:{filter,values}}], response:{format:'json-stat2'}}. PxWeb enforces a cell-count limit — narrow each dimension's values using codes from table_meta to avoid rejection.

Input Schema

NameRequiredDescriptionDefault
bodyYes{query: [{code, selection: {filter, values}}], response: {format: "json-stat2"}}
pathYese.g. "Naselenie/VencaniRazvedeni/280_VitStat_Brak_voz_ml.px"

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedInput schema / examples
      Previous value: -[
      -  {
      -    "body": {
      -      "query": [
      -        {
      -          "code": "Voz",
      -          "selection": {
      -            "filter": "item",
      -            "values": [
      -              "1",
      -              "2"
      -            ]
      -          }
      -        },
      -        {
      -          "code": "God",
      -          "selection": {
      -            "filter": "item",
      -            "values": [
      -              "2020",
      -              "2021"
      -            ]
      -          }
      -        }
      -      ],
      -      "response": {
      -        "format": "json-stat2"
      -      }
      -    },
      -    "path": "Naselenie/VencaniRazvedeni/280_VitStat_Brak_voz_ml.px"
      -  }
      -]New value: +[
      +  {
      +    "body": {
      +      "query": [
      +        {
      +          "code": "Возраста на невеста",
      +          "selection": {
      +            "filter": "item",
      +            "values": [
      +              "00"
      +            ]
      +          }
      +        },
      +        {
      +          "code": "Возраст на младоженец",
      +          "selection": {
      +            "filter": "item",
      +            "values": [
      +              "00"
      +            ]
      +          }
      +        },
      +        {
      +          "code": "Година",
      +          "selection": {
      +            "filter": "item",
      +            "values": [
      +              "2024",
      +              "2025"
      +            ]
      +          }
      +        }
      +      ],
      +      "response": {
      +        "format": "json-stat2"
      +      }
      +    },
      +    "path": "Naselenie/VencaniRazvedeni/280_VitStat_Brak_voz_ml.px"
      +  }
      +]
  2. Changed1 schema field changed
    • addedInput schema / examples
      Added value: +[
      +  {
      +    "body": {
      +      "query": [
      +        {
      +          "code": "Voz",
      +          "selection": {
      +            "filter": "item",
      +            "values": [
      +              "1",
      +              "2"
      +            ]
      +          }
      +        },
      +        {
      +          "code": "God",
      +          "selection": {
      +            "filter": "item",
      +            "values": [
      +              "2020",
      +              "2021"
      +            ]
      +          }
      +        }
      +      ],
      +      "response": {
      +        "format": "json-stat2"
      +      }
      +    },
      +    "path": "Naselenie/VencaniRazvedeni/280_VitStat_Brak_voz_ml.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 read-only, idempotent, non-destructive, open-world behavior, so the safety profile is covered. The description adds genuinely useful operational context beyond them: the enforced cell-count limit, the json-stat2 response contract, and the need to narrow selections.

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 dense sentences: action and return format first, required body shape second, practical constraint last. No filler and nothing repeated for its own sake.

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 nested-body query tool with no output schema, it covers the return format, the request contract, and the main failure mode. It could say more about error responses or pagination/size limits, but nothing critical is missing.

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% and the body shape is repeated, so the baseline is 3, but the description adds meaning beyond the schema by explaining how selections should be constructed (codes from table_meta, values narrowed per dimension) and why.

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) plus resource (a PxWeb query to a MakStat table) and the return format (json-stat2). An agent can distinguish it from table_meta, which only supplies metadata/codes.

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?

Gives a clear precondition and workflow: fetch codes from table_meta and narrow each dimension's values to avoid the cell-count rejection. It does not explicitly contrast itself against a sibling data tool, but the routing intent 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.