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. Always 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, and destructiveHint=false, so safety is covered. The description adds value beyond that: return format ('JSON-stat2 format with labeled dimensions and numeric values'), no-auth requirement, and CC BY 4.0 licensing. No contradiction with 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?

Four sentences, each earning its place: core purpose, return format, mandatory prerequisite, and a working example plus data source/licensing. The most important information is front-loaded with no filler.

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?

Covers purpose, workflow prerequisite, return format, an example query, authentication, and licensing. Since an output schema exists and the metadata tool is explicitly referenced for valid codes, nothing an agent needs to invoke this correctly 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 description coverage is 100%, with detailed docs for table_path and the query array including filter types and values. The description reinforces this with a concrete example (INDICATOR='POP_SY', TIME filter='top' values=['1']), which clarifies how to compose the nested query structure 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?

Description opens with 'Run a statistical query against a Latvia statistics table' – a specific verb and resource. It goes on to define the operation as dimension-filtered slicing ('by indicator, time period, region, etc.'), which clearly distinguishes it from the latvia-statistics.reference.catalog and table_metadata siblings.

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?

Contains an explicit workflow prerequisite: 'Always call latvia-statistics.table_metadata first to discover valid dimension codes and value codes.' This tells the agent exactly what to do before invoking this tool. It doesn't enumerate negative cases or alternative data-source tools, but the prerequisite plus the 'query against a table' framing makes intended use 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.