Skip to main content
Glama

Imf Get Database

imf_get_database
Read-onlyIdempotent

Fetch a dataflow's dimension list with a codelist preview for each dimension. Resolves human-readable terms to SDMX codes (e.g. "United States" → USA, "Constant prices" → NGDP_RPCH). Required before imf_query_dataset — SDMX keys are opaque without codelist lookups. Each codelist is capped at the first 50 entries by default, including previews filtered by codelist_filter. Set dimension_id to retrieve one codelist with bounded limit/offset paging after the optional substring filter. Set available_only=true to page codes the dataflow actually publishes, with series and time coverage metadata; availability filtering happens before codelist_filter and paging. The imf://database/{dataflow_id} resource provides the same bounded discovery summary. Country codes are ISO 3-letter (USA, GBR, DEU), not ISO 2-letter (US, GB, DE). The key_format field shows the exact dimension order required by imf_query_dataset. Note: codelists enumerate the code universe, not actual coverage — valid codes can still return no_data if the combination has no series in this dataflow.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
limitNoEntries to return from the selected dimension. Valid only with dimension_id; default 50, maximum 200.
offsetNoMatching entries to skip in the selected dimension before this page. Valid only with dimension_id; default 0.
versionNoDataflow version, e.g. 9.0.0. Auto-detected from the dataflow list when omitted.
agency_idNoAgency ID that publishes this dataflow, e.g. IMF.RES or IMF.STA. Auto-detected from the dataflow list when omitted.
dataflow_idYesDataflow identifier from imf_list_databases, e.g. WEO, BOP, CPI. Case-sensitive.
dimension_idNoExact dimension ID from this tool, e.g. INDICATOR. Select one dimension to page beyond its preview.
available_onlyNoReturn only codes reported by the dataflow-wide availability constraint. Default false keeps ordinary codelist discovery unchanged.
codelist_filterNoOptional case-insensitive substring to search within each dimension's codelist (code ID and name). Filtering runs before the 50-entry preview or selected-dimension page. Example: "CPI" or "Constant prices" surfaces matching WEO indicator codes.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameNoHuman-readable dataflow name.
errorNoPresent when the call failed. Absent on success.
noticeNoPopulated when a codelist_filter matched no entries anywhere, or when a dimension has no resolvable codelist, or when offset is past the final match.
sourceNoAttribution string required by IMF data terms: "Source: International Monetary Fund, <dataflow name>, <link>".
versionNoDataflow version string, e.g. 9.0.0.
agency_idNoAgency that publishes this dataflow, e.g. IMF.RES, IMF.STA.
truncatedNoTrue when any returned dimension page omits matching codes.
dimensionsNoAll dimension previews, or the one selected dimension page.
key_formatNoDimension names in dot-separated keyPosition order, e.g. COUNTRY.INDICATOR.FREQUENCY. Use this exact format when constructing the key for imf_query_dataset.
dataflow_idNoDataflow identifier, e.g. WEO, BOP, CPI.
descriptionNoThis dataflow's own description in full — not the shared DSD's, and not the shortened preview imf_list_databases returns for the same id. Absent when the dataflow publishes none.
dsd_versionNoVersion of the underlying data structure definition (DSD) that backs this dataflow. Differs from version when the dataflow references a shared DSD (e.g. IIP → DSD_BOP at 24.0.0).
dimension_idNoSelected dimension ID. Absent when previews for every dimension were returned.
series_countNoTotal series published by the dataflow. Present when available_only is true.
structure_refNoIdentifier of the underlying DSD, e.g. DSD_BOP. Several dataflows can share one DSD.
available_onlyNoTrue when dimensions contain published availability coverage rather than codelists.
codelist_filterNoEcho of the codelist_filter that produced this result. Absent when no filter was applied — an empty codelist then means the codelist could not be resolved, not that the filter missed.
time_period_endNoLatest period with published data, or null when the constraint omits it.
time_period_startNoEarliest period with published data, or null when the constraint omits it.

TDQS

A4.7/5.0
Behavior5/5

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

Annotations already declare readOnlyHint, openWorldHint, and idempotentHint. The description adds substantial beyond-annotation behavior: the 50-entry codelist cap, filtering-before-paging order, availability-only mode semantics, ISO 3-letter vs 2-letter country codes, and the caveat that valid codes can still return no_data. No contradiction with annotations exists.

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 long but every sentence earns its place: purpose, prerequisite, pagination, filtering, resource equivalence, code-format warning, and a no_data caveat. It is front-loaded with the primary action and required context, and the later sentences cover edge cases that prevent misinvocation.

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?

This is a complex 8-parameter tool, but the schema fully documents all parameters and an output schema exists. The description provides the missing operational context: ordering of filters, paging behavior, the prerequisite relationship to imf_query_dataset, and a key caveat about codelist coverage versus actual data. Nothing critical is left for the agent to infer.

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%, so the baseline is 3. The description adds value beyond the schema by explaining operational semantics such as 'availability filtering happens before codelist_filter and paging,' giving a concrete codelist_filter example, and noting the key_format field's role. This lifts it above baseline without making it a full parameter-by-parameter walkthrough.

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: 'Fetch a dataflow's dimension list with a codelist preview for each dimension.' It gives concrete examples of SDMX code resolution ("United States" → USA) and explicitly distinguishes the tool's role from imf_query_dataset by stating it must be run first.

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 clearly states the tool is required before imf_query_dataset because SDMX keys are opaque without codelist lookups. It also clarifies when to use dimension_id, available_only, and codelist_filter. It does not explicitly exclude sibling tools beyond noting the prerequisite relationship, but the use context is unambiguous.

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.

TDQS

A4.6/5.0
Disambiguation5/5

Each tool has a clearly distinct role: discovering dataflows, inspecting dimensions/codelists, querying SDMX data, and analyzing staged DataCanvas tables. The two query-like tools are separated by their data source (live SDMX vs. staged results), and the descriptions reinforce the required sequencing.

Naming Consistency4/5

The imf_ prefix and snake_case convention are consistent, and most tools follow verb_noun naming (list_databases, get_database, query_dataset). However, imf_dataframe_describe and imf_dataframe_query place the object before the verb, deviating slightly from the otherwise predictable pattern.

Tool Count5/5

Five tools is well-scoped for a read-only IMF data access server. Each tool covers a necessary stage in the workflow without redundancy or bloat.

Completeness5/5

The tool set covers the full read-only lifecycle: discover dataflows, inspect required dimension codes, query series, and analyze large result sets via SQL. No obvious gaps exist for the stated purpose, and write operations are not relevant to this domain.