Skip to main content
Glama

Latvia Statistics Table Query

latvia-statistics.series.table_query
Read-onlyIdempotent

Run a statistical query against a Latvia statistics table — specify dimension filters to slice data by indicator, time period, region, etc. Returns JSON-stat2 format with labeled dimensions and numeric values. Call latvia-statistics.table_metadata first to discover valid dimension codes and value codes. Example: population at start of year (INDICATOR='POP_SY'), latest year (TIME filter='top' values=['1']). Data: data.stat.gov.lv, no auth required, CC BY 4.0 (Central Statistical Bureau of Latvia).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
queryYesArray of dimension filters. Each filter selects which values to include for one dimension. Example: [{code:'INDICATOR',selection:{filter:'item',values:['POP_SY']}}, {code:'ContentsCode',selection:{filter:'item',values:['IRS010']}}, {code:'TIME',selection:{filter:'top',values:['1']}}]. Response is JSON-stat2 format with dimension labels and numeric values array.
table_pathYesFull path to the leaf table to query — same as latvia-statistics.table_metadata table_path. Example: 'POP/IR/IRS/IRS010'.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
errorNoPresent only when the call failed. Includes error code, message, request_id, and any provider-specific extras.
resultNoTool response payload. Shape varies per tool — consult the tool description and inputSchema. May be an object, array, string, or number depending on the upstream provider response.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.5/5.0
Behavior4/5

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

Annotations already declare readOnlyHint, idempotentHint, openWorldHint and destructiveHint=false, so the safety profile is covered. The description adds value beyond that by stating the return format (JSON-stat2 with labeled dimensions and numeric values), the absence of auth requirements, and the upstream data source/license. It stops short of noting rate limits or pagination, so it is strong but not exhaustive.

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?

Front-loaded with the core action, then return format, prerequisite, worked example, and provenance, in a tight five-sentence block. Each sentence carries distinct information (what, what comes back, what to call first, how, where the data comes from) with no padding.

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?

With an output schema present, the description need not detail return values, yet it still summarizes the JSON-stat2 shape. Combined with full schema coverage, annotations, a prerequisite pointer, and provenance, an agent has everything needed to invoke the tool correctly.

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 nested query/selection/filter/values fields are already documented in detail with examples inside the schema. The description's example query reinforces but does not materially extend the schema's own parameter documentation, so the baseline 3 applies.

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 names a specific verb and resource ('Run a statistical query against a Latvia statistics table') and immediately clarifies the mechanism (dimension filters to slice data by indicator, time period, region). It also implicitly separates this tool from latvia-statistics.table_metadata by assigning discovery to the latter, so an agent can distinguish the two 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 Guidelines5/5

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

It gives an explicit prerequisite workflow: 'Call latvia-statistics.table_metadata first to discover valid dimension codes and value codes.' A concrete worked example (INDICATOR='POP_SY', TIME filter='top' values=['1']) shows exactly how to shape a valid call, leaving little to inference.

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.