MCP server for accessing Brazilian foreign trade statistics via Comexstat API
The Comexstat MCP server provides 17 tools with mixed quality. Tool naming is consistently verb-based and clear (get*, query*), meeting basic naming standards. However, significant gaps in schema completeness, parameter descriptions, and error handling prevent this from reaching a higher tier. Most tools declare their descriptions and input parameters, but many parameters lack detailed format constraints or validation guidance. The queryData and queryMunicipalitiesData tools have the most complete schemas with enum constraints and pattern validation, while simpler metadata tools (healthCheck, getStates) have empty input schemas. No tool includes output schema documentation, and error handling relies on implicit HTTP status codes rather than actionable recovery guidance. The server lacks tool annotations (readOnlyHint, destructiveHint), structured error messages, and dependency hints that would help LLMs chain tools effectively.
Gets data from an auxiliary lookup table
Gets the list of available fields that can be used in queries
Gets the list of available filters for querying Comexstat data
Gets the list of available metrics for trade data analysis
Gets the list of available years in the Comexstat database
Gets the list of Brazilian cities
Gets detailed information about a specific Brazilian city
Empty input schemas on 7 tools (healthCheck, getLastUpdate, getAvailableYears, getAvailableFilters, getAvailableFields, getAvailableMetrics, getStates, getCities).
No output schema documentation for ANY tool. LLMs cannot determine what fields to expect in responses, preventing downstream tool chaining and field extraction planning.
| Scored | Grade | Overall | Spec posture | Rubric |
|---|---|---|---|---|
| 2026-09-22 | D | 50 | 2026-07-28+ | v2 |
| 2026-03-09 | D | 50 | - | v1 |
Gets the list of countries in the Comexstat database
Gets detailed information about a specific country
Gets the available values for a specific filter
Gets the last update date of the Comexstat data
Gets detailed information about a specific Brazilian state
Gets the list of Brazilian states (UF)
Checks the health of the Comexstat API by retrieving the last update date and available years
Queries trade data from Comexstat with specified filters and metrics
Queries historical trade data from Comexstat
Queries trade data at the municipality level from Comexstat
Pagination parameters (page, pageSize) on getAuxiliaryTable lack min/max constraints. Unbounded numeric parameters let LLMs pass absurd values. Should specify: page (min 1), pageSize (min 1, max 100).
queryMunicipalitiesData and queryHistoricalData have weak schema consistency. Details and metrics parameters are typed as plain arrays of strings instead of enums, unlike queryData which has strict enum constraints (country, state, section, etc.). This inconsistency forces LLMs to guess valid values.
No tool annotations. All 17 tools are READ_ONLY but lack readOnlyHint annotation in the source. This forces LLMs to infer from descriptions rather than trusting explicit protocol hints.
No error handling guidance. Tools rely on HTTP status codes (implicit from axios) but do not return structured error messages or recovery hints. E.g., if a filter value is invalid, the LLM receives a raw error with no suggestion for next steps (pattern:recovery-guide).
Ambiguous or missing parameter descriptions. Example: getStateDetails expects 'ufId' (70 char description) but no hint on format (is it '12', 'SP', '35'?). getCountryDetails expects 'countryId' with no format guidance. LLMs will guess.
queryData monthDetail parameter documented but its interaction with period granularity not explained. Does it subdivide the period into days? weeks? The description 'Whether to include month-level detail' is unclear given the period is already YYYY-MM.
No dependency hints for multi-step workflows. queryData requires specific filter values but does not point to getFilterValues. A user saying 'export data for Brazil' requires getCountries → search → queryData, but no tool hints guide this chain.