Skip to main content
Glama

inspect_dataflow

Check a dataflow's filterable components, available codes, and size before retrieving data to avoid truncated queries.

Instructions

Inspect a dataflow's components, available codes and size.

Call this before get_data. It answers three questions: what can I filter on, which codes actually have data, and is this small enough to retrieve?

If you only need to know whether data exist for some subset, pass filters and stop here rather than going on to get_data.

Returns: Components grouped by role, availability-backed codes, and size signals with a warning when retrieval would truncate.

Raises: ToolError: If the dataflow is not found or the request fails.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
refYesDataflow reference in agency:id(version) form, such as 'BIS:WS_CBS_PUB(1.0)'. Take this from the ref field of search_dataflows. A full SDMX URN also works.
filtersNoOptional filter scoping availability to a subset, such as "L_REP_CTY = 'CH' AND FREQ = 'Q'". AND only, never OR; use IN ('A', 'B') for several values of one component. Supplying this narrows the reported codes and counts to what remains available.
serviceNoService name or SDMX-REST v2 base URL.
find_codeNoOptional code value such as 'CH'. Reports every component whose available codes contain it, and the role each plays. Use this before filtering on a country: the same code often appears in several dimensions with different meanings.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
refYesThe resolved dataflow reference.
nameNo
serviceYes
measuresYes
next_stepYes
obs_countNoObservation count. Frequently null - BIS does not report it. Use series_count as the size signal when null.
attributesYes
dimensionsYes
descriptionNo
series_countNo
size_warningNoPresent when the scope is large enough that get_data would truncate. Narrow the filter first.
code_locationsNoPopulated when find_code was supplied: every component whose available codes contain that value, with the role each plays. More than one entry means the value is ambiguous - on BIS consolidated banking 'CH' appears as reporting country, counterparty country and bank type - so choose the intended role before filtering.
filter_appliedNoThe filter used to scope availability, echoed verbatim. Null means availability covers the whole dataflow.
availability_noteYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.5/5.0
Behavior4/5

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

With no annotations provided, the description carries the full burden and does a solid job: it discloses the return content, warns about truncation signals, and lists the ToolError condition. It could more explicitly state that the operation is read-only and has no side effects, but 'Inspect' plus the returns/raises structure conveys the essential behavioral profile.

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?

The description is compact, front-loaded with the core purpose, and uses a clear structure with Returns and Raises sections. Each sentence earns its place; the 'three questions' framing is especially efficient because it instantly communicates the tool's decision-making value.

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?

For a 4-parameter inspection tool with an output schema and a richly documented input schema, the description is complete: it states what the tool does, when to call it relative to get_data, what it returns, and when it errors. The sibling relationships are sufficiently covered by the explicit get_data comparison.

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%, so the baseline is 3. The tool description does not add parameter-level meaning beyond the schema, but the schema itself already explains ref format, filter syntax, the IN() alternative, and find_code semantics. The description's reference to 'filters' aligns with the schema but adds no new parameter information.

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 verb and resource: 'Inspect a dataflow's components, available codes and size.' It further clarifies the tool's role by naming the three questions it answers, distinguishing it from get_data by positioning itself as the pre-retrieval inspection step.

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?

The description explicitly says 'Call this before get_data' and gives a concrete stopping condition: 'If you only need to know whether data exist for some subset, pass filters and stop here rather than going on to get_data.' This gives clear when-to-use guidance and differentiates it from the main sibling alternative.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.