Skip to main content
Glama
nescoffee-create

SDMX MCP Gateway

find_code_usage_across_dataflows

Discover which dataflows contain data for a specific code (e.g., country or indicator) in a single API call. Search all constraints to locate every dataset using that code.

Instructions

Discover all dataflows that have data for a given code.

Use this as your starting point when exploring what data exists for a
country, indicator, or any other code. For example, to find everything
available for Fiji: find_code_usage_across_dataflows("FJ", dimension_id="GEO_PICT").
Searches all constraints in a single API call.

**When to use this tool:**
- "What datasets have data for Vanuatu?" -> code="VU", dimension_id="GEO_PICT"
- "Which dataflows cover GDP indicators?" -> code="GDP", dimension_id="INDICATOR"
- "What data exists for this country across all topics?" -> start here, then use
  compare_dataflow_dimensions() to check how the discovered dataflows relate.

**Workflow A -- search by dimension (direct):**
    find_code_usage_across_dataflows("FJ", dimension_id="GEO_PICT")
    Returns only matches where "FJ" appears in the GEO_PICT dimension.

**Workflow B -- search by codelist (two steps):**
    If you know a code belongs to a codelist (e.g., CL_COM_GEO_PICT) but
    not which dimensions use it:
    1. Call this tool WITHOUT dimension_id to get all dataflows/dimensions
       where the code appears.
    2. For each matched dataflow, call get_dataflow_structure() to inspect
       the DSD and verify which codelist each matched dimension uses.

**Provider support:** Bulk search requires endpoint support. Currently
supported by SPC (Actual), ECB (Allowed), and UNICEF (Actual). Other
endpoints will return a message explaining the limitation.

Args:
    code: The specific code to check (e.g., "FJ")
    dimension_id: Optional dimension to restrict search (e.g., "GEO_PICT").
        If provided, only matches in this dimension are returned.
        If omitted, all dimensions are searched.
    agency_id: The agency (uses session endpoint if not specified)
    endpoint: Optional endpoint key (e.g. "FBOS", "ECB") to target a
        specific provider for this call only. Defaults to the session's
        current endpoint.

Returns:
    CrossDataflowCodeUsageResult with:
        - dataflows_with_data: Dataflows where code is actually used
        - summary: Counts of usage

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
codeYes
endpointNo
agency_idNo
dimension_idNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
codeYesCode checked
summaryYesSummary: dataflows_checked, with_data, without_data
dimension_idNoDimension filter (None = searched all dimensions)
api_calls_madeYesNumber of API calls made
interpretationYesHuman-readable explanation
discovery_levelNoDiscovery levelcross_dataflow_usage
dataflows_with_dataYesDataflows where code has actual data
total_dataflows_checkedYesDataflows checked for actual usage
Behavior4/5

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

Since no annotations are provided, the description carries the behavioral disclosure burden. It discloses that the tool performs a bulk search across all constraints in a single API call, explains the difference in behavior when dimension_id is provided vs. omitted, and explicitly notes the provider support limitation ('SPC (Actual), ECB (Allowed), and UNICEF (Actual)') and that others will return an explanatory message. It could explicitly state that the operation is read-only and non-mutating, but the context strongly implies this, making the transparency solid.

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 lengthy but meticulously structured with headings, bullet lists, and code examples. The first line states the core purpose immediately. Every section adds value: usage scenarios, workflows, provider support, parameter explanations, and return value summary. No filler or redundancy. The format makes it easy for an agent to quickly extract the needed guidance.

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?

Given the tool's moderate complexity (4 parameters, one required, output schema present) and no annotations, the description is remarkably complete. It covers all parameters, workflows, provider limitations, and return value structure. The output schema covers the return contract, so the description's brief mention of the result type is sufficient. The description leaves no major ambiguity about how to invoke the tool and what to expect.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, so the description must compensate, and it does thoroughly. Each parameter is explained with meaning and examples: code ('the specific code to check'), dimension_id (with both provided/omitted semantics), agency_id (defaults to session endpoint), and endpoint (targeting a specific provider). The examples for code and dimension_id ('FJ', 'GEO_PICT') make usage concrete. This far exceeds the bare schema 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 clear, specific statement: 'Discover all dataflows that have data for a given code.' It names the tool's resource (dataflows) and verb (find/discover), and it distinguishes itself from sibling tools like get_code_usage by positioning this as the 'starting point' for exploring data existence. The workflow examples further clarify that it searches across all constraints in a single call.

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 'When to use this tool' section provides explicit scenarios with concrete examples (e.g., Fiji, GDP) and directly references an alternative: 'then use compare_dataflow_dimensions() to check how the discovered dataflows relate.' Workflow B explains when to omit dimension_id and when to follow up with get_dataflow_structure(). Provider support limitations are also mentioned, giving clear guidance on when this tool will or won't work.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/nescoffee-create/sdmx-mcp-gateway'

If you have feedback or need assistance with the MCP directory API, please join our Discord server