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.

Schema Changelog

Changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. Changed11 schema fields changed
    • addedInput schema / properties / available_only
      Added value: +{
      +  "default": false,
      +  "description": "Return only codes reported by the dataflow-wide availability constraint. Default false keeps ordinary codelist discovery unchanged.",
      +  "type": "boolean"
      +}
    • addedOutput schema / properties / available_only
      Added value: +{
      +  "const": true,
      +  "description": "True when dimensions contain published availability coverage rather than codelists.",
      +  "type": "boolean"
      +}
    • changedOutput schema / properties / dimensions / items / description
      Previous value: -"A single dimension with its codelist."New value: +"A single dimension with its codelist or published availability coverage."
    • addedOutput schema / properties / dimensions / items / properties / available_count
      Added value: +{
      +  "description": "Codes reported with published data before codelist_filter. Present when available_only is true.",
      +  "type": "number"
      +}
    • changedOutput schema / properties / dimensions / items / properties / codelist / description
      Previous value: -"Valid codes for this dimension. Unselected previews show up to 50 entries after optional filtering. Select dimension_id and use limit/offset for a bounded page of up to 200 entries. Empty means the filter matched nothing when codelist_filter is echoed back, and that the codelist could not be resolved when it is not — see notice."New value: +"Valid codelist codes for this dimension, or codes reported with published data when available_only is true. Unselected previews show up to 50 entries after optional filtering. Select dimension_id and use limit/offset for a bounded page of up to 200 entries. Empty means the filter matched nothing when codelist_filter is echoed back, no coverage was reported in availability mode, or the codelist could not be resolved in normal mode — see notice."
    • changedOutput schema / properties / dimensions / items / properties / unfiltered_count / description
      Previous value: -"Codes in the complete resolved codelist before codelist_filter is applied."New value: +"Source codes before codelist_filter: the complete resolved codelist normally, or published codes when available_only is true."
    • changedOutput schema / properties / error / properties / data / properties / reason / description
      Previous value: -"Machine-readable failure mode. Declared by this tool: `dataflow_not_found`: dataflow_id does not match any known dataflow on api.imf.org `dimension_not_found`: dimension_id does not match a dimension in the selected dataflow `structure_unavailable`: api.imf.org returns non-200 on the DSD endpoint `dataflow_list_unavailable`: The dataflow catalog that dataflow_id is resolved against could not be fetched — fires before the DSD lookup is attempted Other values are possible when a failure originates below the handler."New value: +"Machine-readable failure mode. Declared by this tool: `dataflow_not_found`: dataflow_id does not match any known dataflow on api.imf.org `dimension_not_found`: dimension_id does not match a dimension in the selected dataflow `structure_unavailable`: api.imf.org returns non-200 on the DSD endpoint `dataflow_list_unavailable`: The dataflow catalog that dataflow_id is resolved against could not be fetched — fires before the DSD lookup is attempted `availability_unavailable`: available_only is true and the dataflow-wide availability constraint cannot be fetched or parsed Other values are possible when a failure originates below the handler."
    • changedOutput schema / properties / error / properties / data / properties / reason / examples
      Previous value: -[
      -  "dataflow_not_found",
      -  "dimension_not_found",
      -  "structure_unavailable",
      -  "dataflow_list_unavailable"
      -]New value: +[
      +  "dataflow_not_found",
      +  "dimension_not_found",
      +  "structure_unavailable",
      +  "dataflow_list_unavailable",
      +  "availability_unavailable"
      +]
    • addedOutput schema / properties / series_count
      Added value: +{
      +  "description": "Total series published by the dataflow. Present when available_only is true.",
      +  "type": "number"
      +}
    • addedOutput schema / properties / time_period_end
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "string"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "description": "Latest period with published data, or null when the constraint omits it."
      +}
    • addedOutput schema / properties / time_period_start
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "string"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "description": "Earliest period with published data, or null when the constraint omits it."
      +}
  2. Changed20 schema fields changed
    • changedInput schema / properties / codelist_filter / description
      Previous value: -"Optional case-insensitive substring to search within each dimension's codelist (code ID and name). When set, returns all matching entries per dimension instead of the first-50 window — useful for large codelists like WEO INDICATOR (145 entries). Example: \"CPI\" or \"PCPIPCH\" surfaces consumer price index codes without hitting the 50-entry cap."New value: +"Optional 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."
    • addedInput schema / properties / codelist_filter / minLength
      Added value: +1
    • addedInput schema / properties / dimension_id
      Added value: +{
      +  "description": "Exact dimension ID from this tool, e.g. INDICATOR. Select one dimension to page beyond its preview.",
      +  "minLength": 1,
      +  "type": "string"
      +}
    • addedInput schema / properties / limit
      Added value: +{
      +  "description": "Entries to return from the selected dimension. Valid only with dimension_id; default 50, maximum 200.",
      +  "maximum": 200,
      +  "minimum": 1,
      +  "type": "integer"
      +}
    • addedInput schema / properties / offset
      Added value: +{
      +  "description": "Matching entries to skip in the selected dimension before this page. Valid only with dimension_id; default 0.",
      +  "maximum": 9007199254740991,
      +  "minimum": 0,
      +  "type": "integer"
      +}
    • changedOutput schema / anyOf
      Previous value: -[
      -  {
      -    "not": {
      -      "required": [
      -        "error"
      -      ]
      -    },
      -    "required": [
      -      "dataflow_id",
      -      "agency_id",
      -      "version",
      -      "name",
      -      "key_format",
      -      "dimensions",
      -      "source"
      -    ]
      -  },
      -  {
      -    "required": [
      -      "error"
      -    ]
      -  }
      -]New value: +[
      +  {
      +    "not": {
      +      "required": [
      +        "error"
      +      ]
      +    },
      +    "required": [
      +      "dataflow_id",
      +      "agency_id",
      +      "version",
      +      "name",
      +      "key_format",
      +      "truncated",
      +      "dimensions",
      +      "source"
      +    ]
      +  },
      +  {
      +    "required": [
      +      "error"
      +    ]
      +  }
      +]
    • addedOutput schema / properties / dimension_id
      Added value: +{
      +  "description": "Selected dimension ID. Absent when previews for every dimension were returned.",
      +  "type": "string"
      +}
    • changedOutput schema / properties / dimensions / description
      Previous value: -"All dimensions of this dataflow with their codelists."New value: +"All dimension previews, or the one selected dimension page."
    • changedOutput schema / properties / dimensions / items / properties / codelist / description
      Previous value: -"Valid codes for this dimension. Up to 50 entries shown when no codelist_filter is set; use codelist_filter to search large codelists or the imf://database resource for the full list. Empty means the filter matched nothing when codelist_filter is echoed back, and that the codelist could not be resolved when it is not — see notice."New value: +"Valid codes for this dimension. Unselected previews show up to 50 entries after optional filtering. Select dimension_id and use limit/offset for a bounded page of up to 200 entries. Empty means the filter matched nothing when codelist_filter is echoed back, and that the codelist could not be resolved when it is not — see notice."
    • changedOutput schema / properties / dimensions / items / properties / codelist_truncated / description
      Previous value: -"True when the codelist has more than 50 entries and was truncated."New value: +"True when matching codes were omitted before or after this page."
    • addedOutput schema / properties / dimensions / items / properties / matched_count
      Added value: +{
      +  "description": "Codes matching codelist_filter before limit and offset are applied.",
      +  "type": "number"
      +}
    • addedOutput schema / properties / dimensions / items / properties / next_offset
      Added value: +{
      +  "description": "Offset for the next page when later matching codes remain.",
      +  "type": "number"
      +}
    • addedOutput schema / properties / dimensions / items / properties / offset
      Added value: +{
      +  "description": "Matching codes skipped before this dimension page.",
      +  "type": "number"
      +}
    • addedOutput schema / properties / dimensions / items / properties / returned_count
      Added value: +{
      +  "description": "Codes returned in this dimension page.",
      +  "type": "number"
      +}
    • addedOutput schema / properties / dimensions / items / properties / unfiltered_count
      Added value: +{
      +  "description": "Codes in the complete resolved codelist before codelist_filter is applied.",
      +  "type": "number"
      +}
    • changedOutput schema / properties / dimensions / items / required
      Previous value: -[
      -  "id",
      -  "name",
      -  "position",
      -  "codelist",
      -  "codelist_truncated"
      -]New value: +[
      +  "id",
      +  "name",
      +  "position",
      +  "codelist",
      +  "codelist_truncated",
      +  "unfiltered_count",
      +  "matched_count",
      +  "returned_count",
      +  "offset"
      +]
    • changedOutput schema / properties / error / properties / data / properties / reason / description
      Previous value: -"Machine-readable failure mode. Declared by this tool: `dataflow_not_found`: dataflow_id does not match any known dataflow on api.imf.org `structure_unavailable`: api.imf.org returns non-200 on the DSD endpoint `dataflow_list_unavailable`: The dataflow catalog that dataflow_id is resolved against could not be fetched — fires before the DSD lookup is attempted Other values are possible when a failure originates below the handler."New value: +"Machine-readable failure mode. Declared by this tool: `dataflow_not_found`: dataflow_id does not match any known dataflow on api.imf.org `dimension_not_found`: dimension_id does not match a dimension in the selected dataflow `structure_unavailable`: api.imf.org returns non-200 on the DSD endpoint `dataflow_list_unavailable`: The dataflow catalog that dataflow_id is resolved against could not be fetched — fires before the DSD lookup is attempted Other values are possible when a failure originates below the handler."
    • changedOutput schema / properties / error / properties / data / properties / reason / examples
      Previous value: -[
      -  "dataflow_not_found",
      -  "structure_unavailable",
      -  "dataflow_list_unavailable"
      -]New value: +[
      +  "dataflow_not_found",
      +  "dimension_not_found",
      +  "structure_unavailable",
      +  "dataflow_list_unavailable"
      +]
    • changedOutput schema / properties / notice / description
      Previous value: -"Populated when a codelist_filter matched no entries anywhere, or when a dimension has no resolvable codelist — the two produce the same empty array and need opposite next steps."New value: +"Populated when a codelist_filter matched no entries anywhere, or when a dimension has no resolvable codelist, or when offset is past the final match."
    • addedOutput schema / properties / truncated
      Added value: +{
      +  "description": "True when any returned dimension page omits matching codes.",
      +  "type": "boolean"
      +}
  3. Changed6 schema fields changed
    • changedInput schema / $schema
      Previous value: -"http://json-schema.org/draft-07/schema#"New value: +"https://json-schema.org/draft/2020-12/schema"
    • addedInput schema / additionalProperties
      Added value: +false
    • changedOutput schema / $schema
      Previous value: -"http://json-schema.org/draft-07/schema#"New value: +"https://json-schema.org/draft/2020-12/schema"
    • addedOutput schema / anyOf
      Added value: +[
      +  {
      +    "not": {
      +      "required": [
      +        "error"
      +      ]
      +    },
      +    "required": [
      +      "dataflow_id",
      +      "agency_id",
      +      "version",
      +      "name",
      +      "key_format",
      +      "dimensions",
      +      "source"
      +    ]
      +  },
      +  {
      +    "required": [
      +      "error"
      +    ]
      +  }
      +]
    • addedOutput schema / properties / error
      Added value: +{
      +  "additionalProperties": {},
      +  "description": "Present when the call failed. Absent on success.",
      +  "properties": {
      +    "code": {
      +      "description": "JSON-RPC error code for this failure.",
      +      "maximum": 9007199254740991,
      +      "minimum": -9007199254740991,
      +      "type": "integer"
      +    },
      +    "data": {
      +      "additionalProperties": {},
      +      "properties": {
      +        "reason": {
      +          "description": "Machine-readable failure mode. Declared by this tool: `dataflow_not_found`: dataflow_id does not match any known dataflow on api.imf.org `structure_unavailable`: api.imf.org returns non-200 on the DSD endpoint `dataflow_list_unavailable`: The dataflow catalog that dataflow_id is resolved against could not be fetched — fires before the DSD lookup is attempted Other values are possible when a failure originates below the handler.",
      +          "examples": [
      +            "dataflow_not_found",
      +            "structure_unavailable",
      +            "dataflow_list_unavailable"
      +          ],
      +          "type": "string"
      +        },
      +        "recovery": {
      +          "additionalProperties": {},
      +          "description": "Actionable next step for the caller.",
      +          "properties": {
      +            "hint": {
      +              "type": "string"
      +            }
      +          },
      +          "required": [
      +            "hint"
      +          ],
      +          "type": "object"
      +        },
      +        "retryable": {
      +          "description": "Whether retrying may succeed.",
      +          "type": "boolean"
      +        }
      +      },
      +      "type": "object"
      +    },
      +    "message": {
      +      "description": "Human-readable description of what went wrong.",
      +      "type": "string"
      +    }
      +  },
      +  "required": [
      +    "code",
      +    "message"
      +  ],
      +  "type": "object"
      +}
    • removedOutput schema / required
      Removed value: -[
      -  "dataflow_id",
      -  "agency_id",
      -  "version",
      -  "name",
      -  "key_format",
      -  "dimensions",
      -  "source"
      -]
  4. Changed1 schema field changed
    • changedOutput schema / properties / description / description
      Previous value: -"This dataflow's own description, matching what imf_list_databases reports for the same id — not the shared DSD's. Absent when the dataflow publishes none."New value: +"This 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."
  5. Changed1 schema field changed
    • changedOutput schema / properties / description / description
      Previous value: -"Extended description, if available."New value: +"This dataflow's own description, matching what imf_list_databases reports for the same id — not the shared DSD's. Absent when the dataflow publishes none."
  6. Changed4 schema fields changed
    • addedOutput schema / properties / codelist_filter
      Added value: +{
      +  "description": "Echo 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.",
      +  "type": "string"
      +}
    • changedOutput schema / properties / dimensions / items / properties / codelist / description
      Previous value: -"Valid codes for this dimension. Up to 50 entries shown when no codelist_filter is set; use codelist_filter to search large codelists or the imf://database resource for the full list."New value: +"Valid codes for this dimension. Up to 50 entries shown when no codelist_filter is set; use codelist_filter to search large codelists or the imf://database resource for the full list. Empty means the filter matched nothing when codelist_filter is echoed back, and that the codelist could not be resolved when it is not — see notice."
    • changedOutput schema / properties / dimensions / items / properties / name / description
      Previous value: -"Human-readable dimension name."New value: +"Human-readable dimension label from the DSD concept scheme, e.g. Weight Type for WGT_TYPE. Falls back to the dimension id when the structure names no concept."
    • addedOutput schema / properties / notice
      Added value: +{
      +  "description": "Populated when a codelist_filter matched no entries anywhere, or when a dimension has no resolvable codelist — the two produce the same empty array and need opposite next steps.",
      +  "type": "string"
      +}
  7. Changed2 schema fields changed
    • addedOutput schema / properties / dsd_version
      Added value: +{
      +  "description": "Version 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).",
      +  "type": "string"
      +}
    • addedOutput schema / properties / structure_ref
      Added value: +{
      +  "description": "Identifier of the underlying DSD, e.g. DSD_BOP. Several dataflows can share one DSD.",
      +  "type": "string"
      +}
  8. Changed2 schema fields changed
    • addedInput schema / properties / codelist_filter
      Added value: +{
      +  "description": "Optional case-insensitive substring to search within each dimension's codelist (code ID and name). When set, returns all matching entries per dimension instead of the first-50 window — useful for large codelists like WEO INDICATOR (145 entries). Example: \"CPI\" or \"PCPIPCH\" surfaces consumer price index codes without hitting the 50-entry cap.",
      +  "type": "string"
      +}
    • changedOutput schema / properties / dimensions / items / properties / codelist / description
      Previous value: -"Valid codes for this dimension. Up to 50 entries shown; full list available via the imf://database resource."New value: +"Valid codes for this dimension. Up to 50 entries shown when no codelist_filter is set; use codelist_filter to search large codelists or the imf://database resource for the full list."
  9. First observed

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.