Skip to main content
Glama

Query official Brazilian merchandise trade

get_comexstat_data
Read-onlyIdempotent

Retrieve a bounded, explicit MDIC Comex Stat export or import slice from 1997 onward. Use comexstat:general only after search_official_data. Select period, dimensions, metrics, and optional official filter codes; partner, product, state, transport, classification, and raw metric fields remain attached to the result.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
toYesLast month, YYYY-MM.
flowYesTrade direction to retrieve.
fromYesFirst month, YYYY-MM.
detailsNoOfficial dimensions to include, up to eight.
filtersNoOptional official dimension filters.
metricsNoOfficial Comex Stat metrics to return.
languageNoLanguage for labels in the upstream response.pt
dataset_idYesThe official MDIC Comex Stat dataset identifier.
month_detailNoWhether to keep month-level detail in the response.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
dataYesSource-preserving data or schema payload for the selected official dataset.
metaYesResponse metadata and source provenance.
linksNoRelated API links.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed10 schema fields changed
    • addedInput schema / properties / dataset_id / description
      Added value: +"The official MDIC Comex Stat dataset identifier."
    • addedInput schema / properties / details / description
      Added value: +"Official dimensions to include, up to eight."
    • addedInput schema / properties / filters / description
      Added value: +"Optional official dimension filters."
    • addedInput schema / properties / filters / items / properties / filter / description
      Added value: +"Official dimension code to filter."
    • addedInput schema / properties / filters / items / properties / values / description
      Added value: +"One or more official filter values."
    • addedInput schema / properties / flow / description
      Added value: +"Trade direction to retrieve."
    • addedInput schema / properties / language / description
      Added value: +"Language for labels in the upstream response."
    • addedInput schema / properties / metrics / description
      Added value: +"Official Comex Stat metrics to return."
    • addedInput schema / properties / month_detail / description
      Added value: +"Whether to keep month-level detail in the response."
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "$schema": "https://json-schema.org/draft/2020-12/schema",
      +  "additionalProperties": {},
      +  "description": "REST-aligned Open Economics response with data, metadata, links, and source provenance.",
      +  "properties": {
      +    "data": {
      +      "description": "Source-preserving data or schema payload for the selected official dataset."
      +    },
      +    "links": {
      +      "additionalProperties": {},
      +      "description": "Related API links.",
      +      "properties": {
      +        "observations": {
      +          "description": "Canonical observations endpoint for this dataset.",
      +          "type": "string"
      +        },
      +        "self": {
      +          "description": "Canonical URL for this response.",
      +          "type": "string"
      +        }
      +      },
      +      "type": "object"
      +    },
      +    "meta": {
      +      "additionalProperties": {},
      +      "description": "Response metadata and source provenance.",
      +      "properties": {
      +        "dataset": {
      +          "description": "Open Economics dataset identity when supplied."
      +        },
      +        "provenance": {
      +          "description": "Upstream source URLs, versions, timestamps, and methodology details."
      +        }
      +      },
      +      "type": "object"
      +    }
      +  },
      +  "required": [
      +    "data",
      +    "meta"
      +  ],
      +  "type": "object"
      +}
  2. First observed

TDQS

A3.8/5.0
Behavior3/5

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

Annotations already declare readOnlyHint, idempotentHint, and openWorldHint, so the baseline is lower. The description adds that the slice is 'bounded' and 'explicit' and that certain fields 'remain attached to the result', which gives some behavioral context about output structure. However, it lacks details about rate limits, pagination, or authentication, and much of the behavioral profile is already covered by 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?

Two concise sentences with no waste. The first sentence front-loads the core operation and scope, and the second provides necessary usage and output context. Every part earns its place.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the complexity (9 parameters, nested filters, annotations, and an output schema), the description provides essential guidance: the data source, time range, prerequisite, and that fields remain attached. It doesn't need to explain return values due to the output schema. It could mention limitations like max dimensions or filters, but it's largely complete.

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 schema fully documents all 9 parameters. The description mentions selecting 'period, dimensions, metrics, and optional official filter codes', which is a high-level summary that doesn't add syntax or format details beyond the schema. When schema does the heavy lifting, a baseline of 3 is appropriate.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb and resource ('Retrieve a bounded, explicit MDIC Comex Stat export or import slice from 1997 onward'), which clearly identifies the operation. It doesn't explicitly differentiate from siblings like get_ibge_data or get_siconfi_data, but the specificity of 'Comex Stat' and 'merchandise trade' makes its purpose clear.

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?

Provides a clear prerequisite: 'Use comexstat:general only after search_official_data.' This tells the agent when to use this tool relative to a sibling. However, it doesn't mention when NOT to use it or other alternatives, so it falls short of a 5.

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.