Skip to main content
Glama

Get Customs Code Profile

get_customs_code_profile
Read-onlyIdempotent

Report-section helper ("Scope & definitions"): the resolved customs code + label (in query.lang), a one-sentence caveat when the code bundles several sub-codes (has_subcodes), the data-coverage window actually cached for it, and whether it has a usable PRODCOM mapping (gating the autonomy/vulnerability section). Deliberately thin -- no full CN hierarchy breadcrumb or sibling enumeration.

Returns {"result": {narrative_facts, chart_data, links, available, reason}} -- see get_market_summary for the section shape this convention follows across all of this bridge's report-section helpers.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "query": "<query>"
    },
    "name": "get_customs_code_profile"
  }
}

Input Schema

NameRequiredDescriptionDefault
queryYesThe customs-code/reporter/partner-set/period/frequency slice to query -- the same request body every tradedashboard.eu analytical endpoint takes. See its own field descriptions (customs_code, baskets, reporter, partner_set, period_start, period_end, frequency, n_top, ...) for details; exactly one of `customs_code` and `baskets` is required, everything else has a sensible default.

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedOutput schema / properties / result / anyOf
      Previous value: -[
      -  {
      -    "additionalProperties": false,
      -    "properties": {
      -      "available": {
      -        "const": true,
      -        "default": true,
      -        "type": "boolean"
      -      },
      -      "chart_data": {
      -        "additionalProperties": false,
      -        "description": "An object that must be empty: the bridge sends ``{}`` for it.",
      -        "properties": {},
      -        "type": "object"
      -      },
      -      "links": {
      -        "additionalProperties": false,
      -        "properties": {
      -          "resolved_label": {
      -            "type": "string"
      -          }
      -        },
      -        "required": [
      -          "resolved_label"
      -        ],
      -        "type": "object"
      -      },
      -      "narrative_facts": {
      -        "additionalProperties": false,
      -        "properties": {
      -          "bundled_children": {
      -            "items": {
      -              "additionalProperties": false,
      -              "properties": {
      -                "customs_code": {
      -                  "description": "A canonical customs code, TOTAL, or a supported residual spelling.",
      -                  "type": "string"
      -                },
      -                "text": {
      -                  "type": "string"
      -                }
      -              },
      -              "required": [
      -                "customs_code",
      -                "text"
      -              ],
      -              "type": "object"
      -            },
      -            "type": "array"
      -          },
      -          "customs_code": {
      -            "type": "string"
      -          },
      -          "data_coverage": {
      -            "additionalProperties": false,
      -            "properties": {
      -              "data_max": {
      -                "description": "The last month with data inside the window ('YYYY-MM').",
      -                "pattern": "\\d{4}-\\d{2}",
      -                "type": "string"
      -              },
      -              "data_min": {
      -                "description": "The first month with data inside the window ('YYYY-MM').",
      -                "pattern": "\\d{4}-\\d{2}",
      -                "type": "string"
      -              }
      -            },
      -            "required": [
      -              "data_min",
      -              "data_max"
      -            ],
      -            "type": "object"
      -          },
      -          "is_bundling_heading": {
      -            "const": true,
      -            "type": "boolean"
      -          },
      -          "levels": {
      -            "items": {
      -              "additionalProperties": false,
      -              "description": "One level of a customs code's description hierarchy, chapter first\n(``ComextNomenclature.get_description_levels``, plus the synthetic\nlevels of residual spellings and the dated levels of former editions).\n\nThe optional flags are sparse on the wire: present when true, absent\notherwise (the shape of the nomenclature layer's raw dicts).",
      -              "properties": {
      -                "customs_code": {
      -                  "description": "The level's customs code.",
      -                  "type": "string"
      -                },
      -                "is_catch_all": {
      -                  "anyOf": [
      -                    {
      -                      "type": "boolean"
      -                    },
      -                    {
      -                      "type": "null"
      -                    }
      -                  ],
      -                  "default": null,
      -                  "description": "True for a catch-all ('other') level."
      -                },
      -                "residual": {
      -                  "anyOf": [
      -                    {
      -                      "type": "boolean"
      -                    },
      -                    {
      -                      "type": "null"
      -                    }
      -                  ],
      -                  "default": null,
      -                  "description": "True for the synthetic level of a residual spelling."
      -                },
      -                "segment": {
      -                  "anyOf": [
      -                    {
      -                      "type": "boolean"
      -                    },
      -                    {
      -                      "type": "null"
      -                    }
      -                  ],
      -                  "default": null,
      -                  "description": "True for a historical segment's own definition."
      -                },
      -                "siblings": {
      -                  "anyOf": [
      -                    {
      -                      "items": {
      -                        "additionalProperties": false,
      -                        "properties": {
      -                          "customs_code": {
      -                            "description": "A canonical customs code, TOTAL, or a supported residual spelling.",
      -                            "type": "string"
      -                          },
      -                          "text": {
      -                            "type": "string"
      -                          }
      -                        },
      -                        "required": [
      -                          "customs_code",
      -                          "text"
      -                        ],
      -                        "type": "object"
      -                      },
      -                      "type": "array"
      -                    },
      -                    {
      -                      "type": "null"
      -                    }
      -                  ],
      -                  "default": null,
      -                  "description": "For a catch-all level, the ordinary siblings it excludes."
      -                },
      -                "text": {
      -                  "description": "The level's label, in the requested language.",
      -                  "type": "string"
      -                },
      -                "untranslated": {
      -                  "anyOf": [
      -                    {
      -                      "type": "boolean"
      -                    },
      -                    {
      -                      "type": "null"
      -                    }
      -                  ],
      -                  "default": null,
      -                  "description": "True when the label fell back to English."
      -                },
      -                "window": {
      -                  "anyOf": [
      -                    {
      -                      "additionalProperties": false,
      -                      "description": "The validity window of one customs-code segment (one definition).",
      -                      "properties": {
      -                        "valid_from": {
      -                          "description": "First day of the window, ISO date.",
      -                          "type": "string"
      -                        },
      -                        "valid_to": {
      -                          "anyOf": [
      -                            {
      -                              "type": "string"
      -                            },
      -                            {
      -                              "type": "null"
      -                            }
      -                          ],
      -                          "description": "Last day of the window, ISO date; null while in force."
      -                        }
      -                      },
      -                      "required": [
      -                        "valid_from",
      -                        "valid_to"
      -                      ],
      -                      "type": "object"
      -                    },
      -                    {
      -                      "type": "null"
      -                    }
      -                  ],
      -                  "default": null,
      -                  "description": "For a level read from a dated edition (a former definition, or one of its ancestors as that edition had them): the validity window of the definition shown. Absent for current-edition levels."
      -                }
      -              },
      -              "required": [
      -                "customs_code",
      -                "text"
      -              ],
      -              "type": "object"
      -            },
      -            "type": "array"
      -          },
      -          "prodcom_mapping": {
      -            "additionalProperties": false,
      -            "description": "The PRODCOM mapping, present for the codes PRODCOM covers.",
      -            "properties": {
      -              "available": {
      -                "type": "boolean"
      -              },
      -              "prodcom_codes": {
      -                "items": {
      -                  "additionalProperties": false,
      -                  "description": "One distinct data-bearing PRODCOM code of the code picker\n(``ProdcomNomenclature.deduplicate_resolved``): several mapped codes that\ncollapse onto the same aggregate appear once.",
      -                  "properties": {
      -                    "description": {
      -                      "description": "The code's label.",
      -                      "type": "string"
      -                    },
      -                    "original_prodcom_code_fmt": {
      -                      "anyOf": [
      -                        {
      -                          "type": "string"
      -                        },
      -                        {
      -                          "type": "null"
      -                        }
      -                      ],
      -                      "description": "The mapped dotted forms that fell back to this code (comma-joined); None for exact codes."
      -                    },
      -                    "prodcom_code": {
      -                      "description": "The data-bearing PRODCOM code, in dotted form on the wire.",
      -                      "examples": [
      -                        "23.99.14",
      -                        "24.10.T3.40"
      -                      ],
      -                      "type": "string"
      -                    },
      -                    "status": {
      -                      "description": "'exact' when the data-bearing code is a mapped code's own level, 'fallback' otherwise.",
      -                      "enum": [
      -                        "exact",
      -                        "fallback",
      -                        "unavailable"
      -                      ],
      -                      "type": "string"
      -                    }
      -                  },
      -                  "required": [
      -                    "prodcom_code",
      -                    "description",
      -                    "status",
      -                    "original_prodcom_code_fmt"
      -                  ],
      -                  "type": "object"
      -                },
      -                "type": "array"
      -              },
      -              "reason": {
      -                "type": "null"
      -              }
      -            },
      -            "required": [
      -              "available",
      -              "reason",
      -              "prodcom_codes"
      -            ],
      -            "type": "object"
      -          },
      -          "resolved_code": {
      -            "type": "string"
      -          },
      -          "resolved_label": {
      -            "type": "string"
      -          }
      -        },
      -        "required": [
      -          "prodcom_mapping",
      -          "is_bundling_heading",
      -          "bundled_children",
      -          "customs_code",
      -          "resolved_code",
      -          "resolved_label",
      -          "levels",
      -          "data_coverage"
      -        ],
      -        "type": "object"
      -      },
      -      "reason": {
      -        "default": null,
      -        "type": "null"
      -      }
      -    },
      -    "required": [
      -      "narrative_facts",
      -      "chart_data",
      -      "links"
      -    ],
      -    "type": "object"
      -  },
      -  {
      -    "additionalProperties": false,
      -    "properties": {
      -      "available": {
      -        "const": true,
      -        "default": true,
      -        "type": "boolean"
      -      },
      -      "chart_data": {
      -        "additionalProperties": false,
      -        "description": "An object that must be empty: the bridge sends ``{}`` for it.",
      -        "properties": {},
      -        "type": "object"
      -      },
      -      "links": {
      -        "additionalProperties": false,
      -        "properties": {
      -          "resolved_label": {
      -            "type": "string"
      -          }
      -        },
      -        "required": [
      -          "resolved_label"
      -        ],
      -        "type": "object"
      -      },
      -      "narrative_facts": {
      -        "additionalProperties": false,
      -        "properties": {
      -          "bundled_children": {
      -            "items": {
      -              "additionalProperties": false,
      -              "properties": {
      -                "customs_code": {
      -                  "description": "A canonical customs code, TOTAL, or a supported residual spelling.",
      -                  "type": "string"
      -                },
      -                "text": {
      -                  "type": "string"
      -                }
      -              },
      -              "required": [
      -                "customs_code",
      -                "text"
      -              ],
      -              "type": "object"
      -            },
      -            "type": "array"
      -          },
      -          "customs_code": {
      -            "type": "string"
      -          },
      -          "data_coverage": {
      -            "additionalProperties": false,
      -            "properties": {
      -              "data_max": {
      -                "description": "The last month with data inside the window ('YYYY-MM').",
      -                "pattern": "\\d{4}-\\d{2}",
      -                "type": "string"
      -              },
      -              "data_min": {
      -                "description": "The first month with data inside the window ('YYYY-MM').",
      -                "pattern": "\\d{4}-\\d{2}",
      -                "type": "string"
      -              }
      -            },
      -            "required": [
      -              "data_min",
      -              "data_max"
      -            ],
      -            "type": "object"
      -          },
      -          "is_bundling_heading": {
      -            "const": true,
      -            "type": "boolean"
      -          },
      -          "levels": {
      -            "items": {
      -              "additionalProperties": false,
      -              "description": "One level of a customs code's description hierarchy, chapter first\n(``ComextNomenclature.get_description_levels``, plus the synthetic\nlevels of residual spellings and the dated levels of former editions).\n\nThe optional flags are sparse on the wire: present when true, absent\notherwise (the shape of the nomenclature layer's raw dicts).",
      -              "properties": {
      -                "customs_code": {
      -                  "description": "The level's customs code.",
      -                  "type": "string"
      -                },
      -                "is_catch_all": {
      -                  "anyOf": [
      -                    {
      -                      "type": "boolean"
      -                    },
      -                    {
      -                      "type": "null"
      -                    }
      -                  ],
      -                  "default": null,
      -                  "description": "True for a catch-all ('other') level."
      -                },
      -                "residual": {
      -                  "anyOf": [
      -                    {
      -                      "type": "boolean"
      -                    },
      -                    {
      -                      "type": "null"
      -                    }
      -                  ],
      -                  "default": null,
      -                  "description": "True for the synthetic level of a residual spelling."
      -                },
      -                "segment": {
      -                  "anyOf": [
      -                    {
      -                      "type": "boolean"
      -                    },
      -                    {
      -                      "type": "null"
      -                    }
      -                  ],
      -                  "default": null,
      -                  "description": "True for a historical segment's own definition."
      -                },
      -                "siblings": {
      -                  "anyOf": [
      -                    {
      -                      "items": {
      -                        "additionalProperties": false,
      -                        "properties": {
      -                          "customs_code": {
      -                            "description": "A canonical customs code, TOTAL, or a supported residual spelling.",
      -                            "type": "string"
      -                          },
      -                          "text": {
      -                            "type": "string"
      -                          }
      -                        },
      -                        "required": [
      -                          "customs_code",
      -                          "text"
      -                        ],
      -                        "type": "object"
      -                      },
      -                      "type": "array"
      -                    },
      -                    {
      -                      "type": "null"
      -                    }
      -                  ],
      -                  "default": null,
      -                  "description": "For a catch-all level, the ordinary siblings it excludes."
      -                },
      -                "text": {
      -                  "description": "The level's label, in the requested language.",
      -                  "type": "string"
      -                },
      -                "untranslated": {
      -                  "anyOf": [
      -                    {
      -                      "type": "boolean"
      -                    },
      -                    {
      -                      "type": "null"
      -                    }
      -                  ],
      -                  "default": null,
      -                  "description": "True when the label fell back to English."
      -                },
      -                "window": {
      -                  "anyOf": [
      -                    {
      -                      "additionalProperties": false,
      -                      "description": "The validity window of one customs-code segment (one definition).",
      -                      "properties": {
      -                        "valid_from": {
      -                          "description": "First day of the window, ISO date.",
      -                          "type": "string"
      -                        },
      -                        "valid_to": {
      -                          "anyOf": [
      -                            {
      -                              "type": "string"
      -                            },
      -                            {
      -                              "type": "null"
      -                            }
      -                          ],
      -                          "description": "Last day of the window, ISO date; null while in force."
      -                        }
      -                      },
      -                      "required": [
      -                        "valid_from",
      -                        "valid_to"
      -                      ],
      -                      "type": "object"
      -                    },
      -                    {
      -                      "type": "null"
      -                    }
      -                  ],
      -                  "default": null,
      -                  "description": "For a level read from a dated edition (a former definition, or one of its ancestors as that edition had them): the validity window of the definition shown. Absent for current-edition levels."
      -                }
      -              },
      -              "required": [
      -                "customs_code",
      -                "text"
      -              ],
      -              "type": "object"
      -            },
      -            "type": "array"
      -          },
      -          "resolved_code": {
      -            "type": "string"
      -          },
      -          "resolved_label": {
      -            "type": "string"
      -          }
      -        },
      -        "required": [
      -          "is_bundling_heading",
      -          "bundled_children",
      -          "customs_code",
      -          "resolved_code",
      -          "resolved_label",
      -          "levels",
      -          "data_coverage"
      -        ],
      -        "type": "object"
      -      },
      -      "reason": {
      -        "default": null,
      -        "type": "null"
      -      }
      -    },
      -    "required": [
      -      "narrative_facts",
      -      "chart_data",
      -      "links"
      -    ],
      -    "type": "object"
      -  },
      -  {
      -    "additionalProperties": false,
      -    "properties": {
      -      "available": {
      -        "const": true,
      -        "default": true,
      -        "type": "boolean"
      -      },
      -      "chart_data": {
      -        "additionalProperties": false,
      -        "description": "An object that must be empty: the bridge sends ``{}`` for it.",
      -        "properties": {},
      -        "type": "object"
      -      },
      -      "links": {
      -        "additionalProperties": false,
      -        "properties": {
      -          "resolved_label": {
      -            "type": "string"
      -          }
      -        },
      -        "required": [
      -          "resolved_label"
      -        ],
      -        "type": "object"
      -      },
      -      "narrative_facts": {
      -        "additionalProperties": false,
      -        "properties": {
      -          "customs_code": {
      -            "type": "string"
      -          },
      -          "data_coverage": {
      -            "additionalProperties": false,
      -            "properties": {
      -              "data_max": {
      -                "description": "The last month with data inside the window ('YYYY-MM').",
      -                "pattern": "\\d{4}-\\d{2}",
      -                "type": "string"
      -              },
      -              "data_min": {
      -                "description": "The first month with data inside the window ('YYYY-MM').",
      -                "pattern": "\\d{4}-\\d{2}",
      -                "type": "string"
      -              }
      -            },
      -            "required": [
      -              "data_min",
      -              "data_max"
      -            ],
      -            "type": "object"
      -          },
      -          "is_bundling_heading": {
      -            "const": false,
      -            "type": "boolean"
      -          },
      -          "levels": {
      -            "items": {
      -              "additionalProperties": false,
      -              "description": "One level of a customs code's description hierarchy, chapter first\n(``ComextNomenclature.get_description_levels``, plus the synthetic\nlevels of residual spellings and the dated levels of former editions).\n\nThe optional flags are sparse on the wire: present when true, absent\notherwise (the shape of the nomenclature layer's raw dicts).",
      -              "properties": {
      -                "customs_code": {
      -                  "description": "The level's customs code.",
      -                  "type": "string"
      -                },
      -                "is_catch_all": {
      -                  "anyOf": [
      -                    {
      -                      "type": "boolean"
      -                    },
      -                    {
      -                      "type": "null"
      -                    }
      -                  ],
      -                  "default": null,
      -                  "description": "True for a catch-all ('other') level."
      -                },
      -                "residual": {
      -                  "anyOf": [
      -                    {
      -                      "type": "boolean"
      -                    },
      -                    {
      -                      "type": "null"
      -                    }
      -                  ],
      -                  "default": null,
      -                  "description": "True for the synthetic level of a residual spelling."
      -                },
      -                "segment": {
      -                  "anyOf": [
      -                    {
      -                      "type": "boolean"
      -                    },
      -                    {
      -                      "type": "null"
      -                    }
      -                  ],
      -                  "default": null,
      -                  "description": "True for a historical segment's own definition."
      -                },
      -                "siblings": {
      -                  "anyOf": [
      -                    {
      -                      "items": {
      -                        "additionalProperties": false,
      -                        "properties": {
      -                          "customs_code": {
      -                            "description": "A canonical customs code, TOTAL, or a supported residual spelling.",
      -                            "type": "string"
      -                          },
      -                          "text": {
      -                            "type": "string"
      -                          }
      -                        },
      -                        "required": [
      -                          "customs_code",
      -                          "text"
      -                        ],
      -                        "type": "object"
      -                      },
      -                      "type": "array"
      -                    },
      -                    {
      -                      "type": "null"
      -                    }
      -                  ],
      -                  "default": null,
      -                  "description": "For a catch-all level, the ordinary siblings it excludes."
      -                },
      -                "text": {
      -                  "description": "The level's label, in the requested language.",
      -                  "type": "string"
      -                },
      -                "untranslated": {
      -                  "anyOf": [
      -                    {
      -                      "type": "boolean"
      -                    },
      -                    {
      -                      "type": "null"
      -                    }
      -                  ],
      -                  "default": null,
      -                  "description": "True when the label fell back to English."
      -                },
      -                "window": {
      -                  "anyOf": [
      -                    {
      -                      "additionalProperties": false,
      -                      "description": "The validity window of one customs-code segment (one definition).",
      -                      "properties": {
      -                        "valid_from": {
      -                          "description": "First day of the window, ISO date.",
      -                          "type": "string"
      -                        },
      -                        "valid_to": {
      -                          "anyOf": [
      -                            {
      -                              "type": "string"
      -                            },
      -                            {
      -                              "type": "null"
      -                            }
      -                          ],
      -                          "description": "Last day of the window, ISO date; null while in force."
      -                        }
      -                      },
      -                      "required": [
      -                        "valid_from",
      -                        "valid_to"
      -                      ],
      -                      "type": "object"
      -                    },
      -                    {
      -                      "type": "null"
      -                    }
      -                  ],
      -                  "default": null,
      -                  "description": "For a level read from a dated edition (a former definition, or one of its ancestors as that edition had them): the validity window of the definition shown. Absent for current-edition levels."
      -                }
      -              },
      -              "required": [
      -                "customs_code",
      -                "text"
      -              ],
      -              "type": "object"
      -            },
      -            "type": "array"
      -          },
      -          "prodcom_mapping": {
      -            "additionalProperties": false,
      -            "description": "The PRODCOM mapping, present for the codes PRODCOM covers.",
      -            "properties": {
      -              "available": {
      -                "type": "boolean"
      -              },
      -              "prodcom_codes": {
      -                "items": {
      -                  "additionalProperties": false,
      -                  "description": "One distinct data-bearing PRODCOM code of the code picker\n(``ProdcomNomenclature.deduplicate_resolved``): several mapped codes that\ncollapse onto the same aggregate appear once.",
      -                  "properties": {
      -                    "description": {
      -                      "description": "The code's label.",
      -                      "type": "string"
      -                    },
      -                    "original_prodcom_code_fmt": {
      -                      "anyOf": [
      -                        {
      -                          "type": "string"
      -                        },
      -                        {
      -                          "type": "null"
      -                        }
      -                      ],
      -                      "description": "The mapped dotted forms that fell back to this code (comma-joined); None for exact codes."
      -                    },
      -                    "prodcom_code": {
      -                      "description": "The data-bearing PRODCOM code, in dotted form on the wire.",
      -                      "examples": [
      -                        "23.99.14",
      -                        "24.10.T3.40"
      -                      ],
      -                      "type": "string"
      -                    },
      -                    "status": {
      -                      "description": "'exact' when the data-bearing code is a mapped code's own level, 'fallback' otherwise.",
      -                      "enum": [
      -                        "exact",
      -                        "fallback",
      -                        "unavailable"
      -                      ],
      -                      "type": "string"
      -                    }
      -                  },
      -                  "required": [
      -                    "prodcom_code",
      -                    "description",
      -                    "status",
      -                    "original_prodcom_code_fmt"
      -                  ],
      -                  "type": "object"
      -                },
      -                "type": "array"
      -              },
      -              "reason": {
      -                "type": "null"
      -              }
      -            },
      -            "required": [
      -              "available",
      -              "reason",
      -              "prodcom_codes"
      -            ],
      -            "type": "object"
      -          },
      -          "resolved_code": {
      -            "type": "string"
      -          },
      -          "resolved_label": {
      -            "type": "string"
      -          }
      -        },
      -        "required": [
      -          "prodcom_mapping",
      -          "is_bundling_heading",
      -          "customs_code",
      -          "resolved_code",
      -          "resolved_label",
      -          "levels",
      -          "data_coverage"
      -        ],
      -        "type": "object"
      -      },
      -      "reason": {
      -        "default": null,
      -        "type": "null"
      -      }
      -    },
      -    "required": [
      -      "narrative_facts",
      -      "chart_data",
      -      "links"
      -    ],
      -    "type": "object"
      -  },
      -  {
      -    "additionalProperties": false,
      -    "properties": {
      -      "available": {
      -        "const": true,
      -        "default": true,
      -        "type": "boolean"
      -      },
      -      "chart_data": {
      -        "additionalProperties": false,
      -        "description": "An object that must be empty: the bridge sends ``{}`` for it.",
      -        "properties": {},
      -        "type": "object"
      -      },
      -      "links": {
      -        "additionalProperties": false,
      -        "properties": {
      -          "resolved_label": {
      -            "type": "string"
      -          }
      -        },
      -        "required": [
      -          "resolved_label"
      -        ],
      -        "type": "object"
      -      },
      -      "narrative_facts": {
      -        "additionalProperties": false,
      -        "properties": {
      -          "customs_code": {
      -            "type": "string"
      -          },
      -          "data_coverage": {
      -            "additionalProperties": false,
      -            "properties": {
      -              "data_max": {
      -                "description": "The last month with data inside the window ('YYYY-MM').",
      -                "pattern": "\\d{4}-\\d{2}",
      -                "type": "string"
      -              },
      -              "data_min": {
      -                "description": "The first month with data inside the window ('YYYY-MM').",
      -                "pattern": "\\d{4}-\\d{2}",
      -                "type": "string"
      -              }
      -            },
      -            "required": [
      -              "data_min",
      -              "data_max"
      -            ],
      -            "type": "object"
      -          },
      -          "is_bundling_heading": {
      -            "const": false,
      -            "type": "boolean"
      -          },
      -          "levels": {
      -            "items": {
      -              "additionalProperties": false,
      -              "description": "One level of a customs code's description hierarchy, chapter first\n(``ComextNomenclature.get_description_levels``, plus the synthetic\nlevels of residual spellings and the dated levels of former editions).\n\nThe optional flags are sparse on the wire: present when true, absent\notherwise (the shape of the nomenclature layer's raw dicts).",
      -              "properties": {
      -                "customs_code": {
      -                  "description": "The level's customs code.",
      -                  "type": "string"
      -                },
      -                "is_catch_all": {
      -                  "anyOf": [
      -                    {
      -                      "type": "boolean"
      -                    },
      -                    {
      -                      "type": "null"
      -                    }
      -                  ],
      -                  "default": null,
      -                  "description": "True for a catch-all ('other') level."
      -                },
      -                "residual": {
      -                  "anyOf": [
      -                    {
      -                      "type": "boolean"
      -                    },
      -                    {
      -                      "type": "null"
      -                    }
      -                  ],
      -                  "default": null,
      -                  "description": "True for the synthetic level of a residual spelling."
      -                },
      -                "segment": {
      -                  "anyOf": [
      -                    {
      -                      "type": "boolean"
      -                    },
      -                    {
      -                      "type": "null"
      -                    }
      -                  ],
      -                  "default": null,
      -                  "description": "True for a historical segment's own definition."
      -                },
      -                "siblings": {
      -                  "anyOf": [
      -                    {
      -                      "items": {
      -                        "additionalProperties": false,
      -                        "properties": {
      -                          "customs_code": {
      -                            "description": "A canonical customs code, TOTAL, or a supported residual spelling.",
      -                            "type": "string"
      -                          },
      -                          "text": {
      -                            "type": "string"
      -                          }
      -                        },
      -                        "required": [
      -                          "customs_code",
      -                          "text"
      -                        ],
      -                        "type": "object"
      -                      },
      -                      "type": "array"
      -                    },
      -                    {
      -                      "type": "null"
      -                    }
      -                  ],
      -                  "default": null,
      -                  "description": "For a catch-all level, the ordinary siblings it excludes."
      -                },
      -                "text": {
      -                  "description": "The level's label, in the requested language.",
      -                  "type": "string"
      -                },
      -                "untranslated": {
      -                  "anyOf": [
      -                    {
      -                      "type": "boolean"
      -                    },
      -                    {
      -                      "type": "null"
      -                    }
      -                  ],
      -                  "default": null,
      -                  "description": "True when the label fell back to English."
      -                },
      -                "window": {
      -                  "anyOf": [
      -                    {
      -                      "additionalProperties": false,
      -                      "description": "The validity window of one customs-code segment (one definition).",
      -                      "properties": {
      -                        "valid_from": {
      -                          "description": "First day of the window, ISO date.",
      -                          "type": "string"
      -                        },
      -                        "valid_to": {
      -                          "anyOf": [
      -                            {
      -                              "type": "string"
      -                            },
      -                            {
      -                              "type": "null"
      -                            }
      -                          ],
      -                          "description": "Last day of the window, ISO date; null while in force."
      -                        }
      -                      },
      -                      "required": [
      -                        "valid_from",
      -                        "valid_to"
      -                      ],
      -                      "type": "object"
      -                    },
      -                    {
      -                      "type": "null"
      -                    }
      -                  ],
      -                  "default": null,
      -                  "description": "For a level read from a dated edition (a former definition, or one of its ancestors as that edition had them): the validity window of the definition shown. Absent for current-edition levels."
      -                }
      -              },
      -              "required": [
      -                "customs_code",
      -                "text"
      -              ],
      -              "type": "object"
      -            },
      -            "type": "array"
      -          },
      -          "resolved_code": {
      -            "type": "string"
      -          },
      -          "resolved_label": {
      -            "type": "string"
      -          }
      -        },
      -        "required": [
      -          "is_bundling_heading",
      -          "customs_code",
      -          "resolved_code",
      -          "resolved_label",
      -          "levels",
      -          "data_coverage"
      -        ],
      -        "type": "object"
      -      },
      -      "reason": {
      -        "default": null,
      -        "type": "null"
      -      }
      -    },
      -    "required": [
      -      "narrative_facts",
      -      "chart_data",
      -      "links"
      -    ],
      -    "type": "object"
      -  },
      -  {
      -    "additionalProperties": false,
      -    "description": "A section whose upstream sources failed: the reason, empty slots\nelsewhere (the envelope keys stay stable for MCP consumers).",
      -    "properties": {
      -      "available": {
      -        "const": false,
      -        "default": false,
      -        "type": "boolean"
      -      },
      -      "chart_data": {
      -        "additionalProperties": false,
      -        "description": "An object that must be empty: the bridge sends ``{}`` for it.",
      -        "properties": {},
      -        "type": "object"
      -      },
      -      "links": {
      -        "additionalProperties": false,
      -        "description": "An object that must be empty: the bridge sends ``{}`` for it.",
      -        "properties": {},
      -        "type": "object"
      -      },
      -      "narrative_facts": {
      -        "additionalProperties": false,
      -        "description": "An object that must be empty: the bridge sends ``{}`` for it.",
      -        "properties": {},
      -        "type": "object"
      -      },
      -      "reason": {
      -        "type": "string"
      -      }
      -    },
      -    "required": [
      -      "reason"
      -    ],
      -    "type": "object"
      -  }
      -]New value: +[
      +  {
      +    "additionalProperties": false,
      +    "properties": {
      +      "available": {
      +        "const": true,
      +        "default": true,
      +        "type": "boolean"
      +      },
      +      "chart_data": {
      +        "additionalProperties": false,
      +        "description": "An object that must be empty: the bridge sends ``{}`` for it.",
      +        "properties": {},
      +        "type": "object"
      +      },
      +      "links": {
      +        "additionalProperties": false,
      +        "properties": {
      +          "resolved_label": {
      +            "type": "string"
      +          }
      +        },
      +        "required": [
      +          "resolved_label"
      +        ],
      +        "type": "object"
      +      },
      +      "narrative_facts": {
      +        "additionalProperties": false,
      +        "properties": {
      +          "bundled_children": {
      +            "items": {
      +              "additionalProperties": false,
      +              "properties": {
      +                "customs_code": {
      +                  "description": "A canonical customs code, TOTAL, or a supported residual spelling.",
      +                  "type": "string"
      +                },
      +                "text": {
      +                  "type": "string"
      +                }
      +              },
      +              "required": [
      +                "customs_code",
      +                "text"
      +              ],
      +              "type": "object"
      +            },
      +            "type": "array"
      +          },
      +          "customs_code": {
      +            "type": "string"
      +          },
      +          "data_coverage": {
      +            "additionalProperties": false,
      +            "properties": {
      +              "data_max": {
      +                "description": "The last month with data inside the window ('YYYY-MM').",
      +                "pattern": "\\d{4}-\\d{2}",
      +                "type": "string"
      +              },
      +              "data_min": {
      +                "description": "The first month with data inside the window ('YYYY-MM').",
      +                "pattern": "\\d{4}-\\d{2}",
      +                "type": "string"
      +              }
      +            },
      +            "required": [
      +              "data_min",
      +              "data_max"
      +            ],
      +            "type": "object"
      +          },
      +          "is_bundling_heading": {
      +            "const": true,
      +            "type": "boolean"
      +          },
      +          "levels": {
      +            "items": {
      +              "additionalProperties": false,
      +              "description": "One level of a customs code's description hierarchy, chapter first\n(``ComextNomenclature.get_description_levels``, plus the synthetic\nlevels of residual spellings and the dated levels of former editions).\n\nThe optional flags are sparse on the wire: present when true, absent\notherwise (the shape of the nomenclature layer's raw dicts).",
      +              "properties": {
      +                "customs_code": {
      +                  "description": "The level's customs code.",
      +                  "type": "string"
      +                },
      +                "is_catch_all": {
      +                  "anyOf": [
      +                    {
      +                      "type": "boolean"
      +                    },
      +                    {
      +                      "type": "null"
      +                    }
      +                  ],
      +                  "default": null,
      +                  "description": "True for a catch-all ('other') level."
      +                },
      +                "residual": {
      +                  "anyOf": [
      +                    {
      +                      "type": "boolean"
      +                    },
      +                    {
      +                      "type": "null"
      +                    }
      +                  ],
      +                  "default": null,
      +                  "description": "True for the synthetic level of a residual spelling."
      +                },
      +                "segment": {
      +                  "anyOf": [
      +                    {
      +                      "type": "boolean"
      +                    },
      +                    {
      +                      "type": "null"
      +                    }
      +                  ],
      +                  "default": null,
      +                  "description": "True for a historical segment's own definition."
      +                },
      +                "siblings": {
      +                  "anyOf": [
      +                    {
      +                      "items": {
      +                        "additionalProperties": false,
      +                        "properties": {
      +                          "customs_code": {
      +                            "description": "A canonical customs code, TOTAL, or a supported residual spelling.",
      +                            "type": "string"
      +                          },
      +                          "text": {
      +                            "type": "string"
      +                          }
      +                        },
      +                        "required": [
      +                          "customs_code",
      +                          "text"
      +                        ],
      +                        "type": "object"
      +                      },
      +                      "type": "array"
      +                    },
      +                    {
      +                      "type": "null"
      +                    }
      +                  ],
      +                  "default": null,
      +                  "description": "For a catch-all level, the ordinary siblings it excludes."
      +                },
      +                "text": {
      +                  "description": "The level's label, in the requested language.",
      +                  "type": "string"
      +                },
      +                "untranslated": {
      +                  "anyOf": [
      +                    {
      +                      "type": "boolean"
      +                    },
      +                    {
      +                      "type": "null"
      +                    }
      +                  ],
      +                  "default": null,
      +                  "description": "True when the label fell back to English."
      +                },
      +                "window": {
      +                  "anyOf": [
      +                    {
      +                      "additionalProperties": false,
      +                      "description": "The validity window of one customs-code segment (one definition).",
      +                      "properties": {
      +                        "valid_from": {
      +                          "description": "First day of the window, ISO date.",
      +                          "type": "string"
      +                        },
      +                        "valid_to": {
      +                          "anyOf": [
      +                            {
      +                              "type": "string"
      +                            },
      +                            {
      +                              "type": "null"
      +                            }
      +                          ],
      +                          "description": "Last day of the window, ISO date; null while in force."
      +                        }
      +                      },
      +                      "required": [
      +                        "valid_from",
      +                        "valid_to"
      +                      ],
      +                      "type": "object"
      +                    },
      +                    {
      +                      "type": "null"
      +                    }
      +                  ],
      +                  "default": null,
      +                  "description": "For a level read from a dated edition (a former definition, or one of its ancestors as that edition had them): the validity window of the definition shown. Absent for current-edition levels."
      +                }
      +              },
      +              "required": [
      +                "customs_code",
      +                "text"
      +              ],
      +              "type": "object"
      +            },
      +            "type": "array"
      +          },
      +          "prodcom_mapping": {
      +            "additionalProperties": false,
      +            "description": "The PRODCOM mapping, present for the codes PRODCOM covers.",
      +            "properties": {
      +              "available": {
      +                "type": "boolean"
      +              },
      +              "prodcom_codes": {
      +                "items": {
      +                  "additionalProperties": false,
      +                  "description": "One distinct data-bearing PRODCOM code of the code picker\n(``ProdcomNomenclature.deduplicate_resolved``): several mapped codes that\ncollapse onto the same aggregate appear once.",
      +                  "properties": {
      +                    "description": {
      +                      "description": "The code's label.",
      +                      "type": "string"
      +                    },
      +                    "original_prodcom_code_fmt": {
      +                      "anyOf": [
      +                        {
      +                          "type": "string"
      +                        },
      +                        {
      +                          "type": "null"
      +                        }
      +                      ],
      +                      "description": "The mapped dotted forms that fell back to this code (comma-joined); None for exact codes."
      +                    },
      +                    "prodcom_code": {
      +                      "description": "The data-bearing PRODCOM code, in dotted form on the wire.",
      +                      "examples": [
      +                        "23.99.14",
      +                        "24.10.T3.40"
      +                      ],
      +                      "type": "string"
      +                    },
      +                    "status": {
      +                      "description": "'exact' when the data-bearing code is a mapped code's own level, 'fallback' otherwise.",
      +                      "enum": [
      +                        "exact",
      +                        "fallback",
      +                        "unavailable"
      +                      ],
      +                      "type": "string"
      +                    }
      +                  },
      +                  "required": [
      +                    "prodcom_code",
      +                    "description",
      +                    "status",
      +                    "original_prodcom_code_fmt"
      +                  ],
      +                  "type": "object"
      +                },
      +                "type": "array"
      +              },
      +              "reason": {
      +                "type": "null"
      +              }
      +            },
      +            "required": [
      +              "available",
      +              "reason",
      +              "prodcom_codes"
      +            ],
      +            "type": "object"
      +          },
      +          "resolved_code": {
      +            "type": "string"
      +          },
      +          "resolved_label": {
      +            "type": "string"
      +          }
      +        },
      +        "required": [
      +          "prodcom_mapping",
      +          "is_bundling_heading",
      +          "bundled_children",
      +          "customs_code",
      +          "resolved_code",
      +          "resolved_label",
      +          "levels",
      +          "data_coverage"
      +        ],
      +        "type": "object"
      +      },
      +      "reason": {
      +        "default": null,
      +        "type": "null"
      +      }
      +    },
      +    "required": [
      +      "narrative_facts",
      +      "chart_data",
      +      "links",
      +      "available",
      +      "reason"
      +    ],
      +    "type": "object"
      +  },
      +  {
      +    "additionalProperties": false,
      +    "properties": {
      +      "available": {
      +        "const": true,
      +        "default": true,
      +        "type": "boolean"
      +      },
      +      "chart_data": {
      +        "additionalProperties": false,
      +        "description": "An object that must be empty: the bridge sends ``{}`` for it.",
      +        "properties": {},
      +        "type": "object"
      +      },
      +      "links": {
      +        "additionalProperties": false,
      +        "properties": {
      +          "resolved_label": {
      +            "type": "string"
      +          }
      +        },
      +        "required": [
      +          "resolved_label"
      +        ],
      +        "type": "object"
      +      },
      +      "narrative_facts": {
      +        "additionalProperties": false,
      +        "properties": {
      +          "bundled_children": {
      +            "items": {
      +              "additionalProperties": false,
      +              "properties": {
      +                "customs_code": {
      +                  "description": "A canonical customs code, TOTAL, or a supported residual spelling.",
      +                  "type": "string"
      +                },
      +                "text": {
      +                  "type": "string"
      +                }
      +              },
      +              "required": [
      +                "customs_code",
      +                "text"
      +              ],
      +              "type": "object"
      +            },
      +            "type": "array"
      +          },
      +          "customs_code": {
      +            "type": "string"
      +          },
      +          "data_coverage": {
      +            "additionalProperties": false,
      +            "properties": {
      +              "data_max": {
      +                "description": "The last month with data inside the window ('YYYY-MM').",
      +                "pattern": "\\d{4}-\\d{2}",
      +                "type": "string"
      +              },
      +              "data_min": {
      +                "description": "The first month with data inside the window ('YYYY-MM').",
      +                "pattern": "\\d{4}-\\d{2}",
      +                "type": "string"
      +              }
      +            },
      +            "required": [
      +              "data_min",
      +              "data_max"
      +            ],
      +            "type": "object"
      +          },
      +          "is_bundling_heading": {
      +            "const": true,
      +            "type": "boolean"
      +          },
      +          "levels": {
      +            "items": {
      +              "additionalProperties": false,
      +              "description": "One level of a customs code's description hierarchy, chapter first\n(``ComextNomenclature.get_description_levels``, plus the synthetic\nlevels of residual spellings and the dated levels of former editions).\n\nThe optional flags are sparse on the wire: present when true, absent\notherwise (the shape of the nomenclature layer's raw dicts).",
      +              "properties": {
      +                "customs_code": {
      +                  "description": "The level's customs code.",
      +                  "type": "string"
      +                },
      +                "is_catch_all": {
      +                  "anyOf": [
      +                    {
      +                      "type": "boolean"
      +                    },
      +                    {
      +                      "type": "null"
      +                    }
      +                  ],
      +                  "default": null,
      +                  "description": "True for a catch-all ('other') level."
      +                },
      +                "residual": {
      +                  "anyOf": [
      +                    {
      +                      "type": "boolean"
      +                    },
      +                    {
      +                      "type": "null"
      +                    }
      +                  ],
      +                  "default": null,
      +                  "description": "True for the synthetic level of a residual spelling."
      +                },
      +                "segment": {
      +                  "anyOf": [
      +                    {
      +                      "type": "boolean"
      +                    },
      +                    {
      +                      "type": "null"
      +                    }
      +                  ],
      +                  "default": null,
      +                  "description": "True for a historical segment's own definition."
      +                },
      +                "siblings": {
      +                  "anyOf": [
      +                    {
      +                      "items": {
      +                        "additionalProperties": false,
      +                        "properties": {
      +                          "customs_code": {
      +                            "description": "A canonical customs code, TOTAL, or a supported residual spelling.",
      +                            "type": "string"
      +                          },
      +                          "text": {
      +                            "type": "string"
      +                          }
      +                        },
      +                        "required": [
      +                          "customs_code",
      +                          "text"
      +                        ],
      +                        "type": "object"
      +                      },
      +                      "type": "array"
      +                    },
      +                    {
      +                      "type": "null"
      +                    }
      +                  ],
      +                  "default": null,
      +                  "description": "For a catch-all level, the ordinary siblings it excludes."
      +                },
      +                "text": {
      +                  "description": "The level's label, in the requested language.",
      +                  "type": "string"
      +                },
      +                "untranslated": {
      +                  "anyOf": [
      +                    {
      +                      "type": "boolean"
      +                    },
      +                    {
      +                      "type": "null"
      +                    }
      +                  ],
      +                  "default": null,
      +                  "description": "True when the label fell back to English."
      +                },
      +                "window": {
      +                  "anyOf": [
      +                    {
      +                      "additionalProperties": false,
      +                      "description": "The validity window of one customs-code segment (one definition).",
      +                      "properties": {
      +                        "valid_from": {
      +                          "description": "First day of the window, ISO date.",
      +                          "type": "string"
      +                        },
      +                        "valid_to": {
      +                          "anyOf": [
      +                            {
      +                              "type": "string"
      +                            },
      +                            {
      +                              "type": "null"
      +                            }
      +                          ],
      +                          "description": "Last day of the window, ISO date; null while in force."
      +                        }
      +                      },
      +                      "required": [
      +                        "valid_from",
      +                        "valid_to"
      +                      ],
      +                      "type": "object"
      +                    },
      +                    {
      +                      "type": "null"
      +                    }
      +                  ],
      +                  "default": null,
      +                  "description": "For a level read from a dated edition (a former definition, or one of its ancestors as that edition had them): the validity window of the definition shown. Absent for current-edition levels."
      +                }
      +              },
      +              "required": [
      +                "customs_code",
      +                "text"
      +              ],
      +              "type": "object"
      +            },
      +            "type": "array"
      +          },
      +          "resolved_code": {
      +            "type": "string"
      +          },
      +          "resolved_label": {
      +            "type": "string"
      +          }
      +        },
      +        "required": [
      +          "is_bundling_heading",
      +          "bundled_children",
      +          "customs_code",
      +          "resolved_code",
      +          "resolved_label",
      +          "levels",
      +          "data_coverage"
      +        ],
      +        "type": "object"
      +      },
      +      "reason": {
      +        "default": null,
      +        "type": "null"
      +      }
      +    },
      +    "required": [
      +      "narrative_facts",
      +      "chart_data",
      +      "links",
      +      "available",
      +      "reason"
      +    ],
      +    "type": "object"
      +  },
      +  {
      +    "additionalProperties": false,
      +    "properties": {
      +      "available": {
      +        "const": true,
      +        "default": true,
      +        "type": "boolean"
      +      },
      +      "chart_data": {
      +        "additionalProperties": false,
      +        "description": "An object that must be empty: the bridge sends ``{}`` for it.",
      +        "properties": {},
      +        "type": "object"
      +      },
      +      "links": {
      +        "additionalProperties": false,
      +        "properties": {
      +          "resolved_label": {
      +            "type": "string"
      +          }
      +        },
      +        "required": [
      +          "resolved_label"
      +        ],
      +        "type": "object"
      +      },
      +      "narrative_facts": {
      +        "additionalProperties": false,
      +        "properties": {
      +          "customs_code": {
      +            "type": "string"
      +          },
      +          "data_coverage": {
      +            "additionalProperties": false,
      +            "properties": {
      +              "data_max": {
      +                "description": "The last month with data inside the window ('YYYY-MM').",
      +                "pattern": "\\d{4}-\\d{2}",
      +                "type": "string"
      +              },
      +              "data_min": {
      +                "description": "The first month with data inside the window ('YYYY-MM').",
      +                "pattern": "\\d{4}-\\d{2}",
      +                "type": "string"
      +              }
      +            },
      +            "required": [
      +              "data_min",
      +              "data_max"
      +            ],
      +            "type": "object"
      +          },
      +          "is_bundling_heading": {
      +            "const": false,
      +            "type": "boolean"
      +          },
      +          "levels": {
      +            "items": {
      +              "additionalProperties": false,
      +              "description": "One level of a customs code's description hierarchy, chapter first\n(``ComextNomenclature.get_description_levels``, plus the synthetic\nlevels of residual spellings and the dated levels of former editions).\n\nThe optional flags are sparse on the wire: present when true, absent\notherwise (the shape of the nomenclature layer's raw dicts).",
      +              "properties": {
      +                "customs_code": {
      +                  "description": "The level's customs code.",
      +                  "type": "string"
      +                },
      +                "is_catch_all": {
      +                  "anyOf": [
      +                    {
      +                      "type": "boolean"
      +                    },
      +                    {
      +                      "type": "null"
      +                    }
      +                  ],
      +                  "default": null,
      +                  "description": "True for a catch-all ('other') level."
      +                },
      +                "residual": {
      +                  "anyOf": [
      +                    {
      +                      "type": "boolean"
      +                    },
      +                    {
      +                      "type": "null"
      +                    }
      +                  ],
      +                  "default": null,
      +                  "description": "True for the synthetic level of a residual spelling."
      +                },
      +                "segment": {
      +                  "anyOf": [
      +                    {
      +                      "type": "boolean"
      +                    },
      +                    {
      +                      "type": "null"
      +                    }
      +                  ],
      +                  "default": null,
      +                  "description": "True for a historical segment's own definition."
      +                },
      +                "siblings": {
      +                  "anyOf": [
      +                    {
      +                      "items": {
      +                        "additionalProperties": false,
      +                        "properties": {
      +                          "customs_code": {
      +                            "description": "A canonical customs code, TOTAL, or a supported residual spelling.",
      +                            "type": "string"
      +                          },
      +                          "text": {
      +                            "type": "string"
      +                          }
      +                        },
      +                        "required": [
      +                          "customs_code",
      +                          "text"
      +                        ],
      +                        "type": "object"
      +                      },
      +                      "type": "array"
      +                    },
      +                    {
      +                      "type": "null"
      +                    }
      +                  ],
      +                  "default": null,
      +                  "description": "For a catch-all level, the ordinary siblings it excludes."
      +                },
      +                "text": {
      +                  "description": "The level's label, in the requested language.",
      +                  "type": "string"
      +                },
      +                "untranslated": {
      +                  "anyOf": [
      +                    {
      +                      "type": "boolean"
      +                    },
      +                    {
      +                      "type": "null"
      +                    }
      +                  ],
      +                  "default": null,
      +                  "description": "True when the label fell back to English."
      +                },
      +                "window": {
      +                  "anyOf": [
      +                    {
      +                      "additionalProperties": false,
      +                      "description": "The validity window of one customs-code segment (one definition).",
      +                      "properties": {
      +                        "valid_from": {
      +                          "description": "First day of the window, ISO date.",
      +                          "type": "string"
      +                        },
      +                        "valid_to": {
      +                          "anyOf": [
      +                            {
      +                              "type": "string"
      +                            },
      +                            {
      +                              "type": "null"
      +                            }
      +                          ],
      +                          "description": "Last day of the window, ISO date; null while in force."
      +                        }
      +                      },
      +                      "required": [
      +                        "valid_from",
      +                        "valid_to"
      +                      ],
      +                      "type": "object"
      +                    },
      +                    {
      +                      "type": "null"
      +                    }
      +                  ],
      +                  "default": null,
      +                  "description": "For a level read from a dated edition (a former definition, or one of its ancestors as that edition had them): the validity window of the definition shown. Absent for current-edition levels."
      +                }
      +              },
      +              "required": [
      +                "customs_code",
      +                "text"
      +              ],
      +              "type": "object"
      +            },
      +            "type": "array"
      +          },
      +          "prodcom_mapping": {
      +            "additionalProperties": false,
      +            "description": "The PRODCOM mapping, present for the codes PRODCOM covers.",
      +            "properties": {
      +              "available": {
      +                "type": "boolean"
      +              },
      +              "prodcom_codes": {
      +                "items": {
      +                  "additionalProperties": false,
      +                  "description": "One distinct data-bearing PRODCOM code of the code picker\n(``ProdcomNomenclature.deduplicate_resolved``): several mapped codes that\ncollapse onto the same aggregate appear once.",
      +                  "properties": {
      +                    "description": {
      +                      "description": "The code's label.",
      +                      "type": "string"
      +                    },
      +                    "original_prodcom_code_fmt": {
      +                      "anyOf": [
      +                        {
      +                          "type": "string"
      +                        },
      +                        {
      +                          "type": "null"
      +                        }
      +                      ],
      +                      "description": "The mapped dotted forms that fell back to this code (comma-joined); None for exact codes."
      +                    },
      +                    "prodcom_code": {
      +                      "description": "The data-bearing PRODCOM code, in dotted form on the wire.",
      +                      "examples": [
      +                        "23.99.14",
      +                        "24.10.T3.40"
      +                      ],
      +                      "type": "string"
      +                    },
      +                    "status": {
      +                      "description": "'exact' when the data-bearing code is a mapped code's own level, 'fallback' otherwise.",
      +                      "enum": [
      +                        "exact",
      +                        "fallback",
      +                        "unavailable"
      +                      ],
      +                      "type": "string"
      +                    }
      +                  },
      +                  "required": [
      +                    "prodcom_code",
      +                    "description",
      +                    "status",
      +                    "original_prodcom_code_fmt"
      +                  ],
      +                  "type": "object"
      +                },
      +                "type": "array"
      +              },
      +              "reason": {
      +                "type": "null"
      +              }
      +            },
      +            "required": [
      +              "available",
      +              "reason",
      +              "prodcom_codes"
      +            ],
      +            "type": "object"
      +          },
      +          "resolved_code": {
      +            "type": "string"
      +          },
      +          "resolved_label": {
      +            "type": "string"
      +          }
      +        },
      +        "required": [
      +          "prodcom_mapping",
      +          "is_bundling_heading",
      +          "customs_code",
      +          "resolved_code",
      +          "resolved_label",
      +          "levels",
      +          "data_coverage"
      +        ],
      +        "type": "object"
      +      },
      +      "reason": {
      +        "default": null,
      +        "type": "null"
      +      }
      +    },
      +    "required": [
      +      "narrative_facts",
      +      "chart_data",
      +      "links",
      +      "available",
      +      "reason"
      +    ],
      +    "type": "object"
      +  },
      +  {
      +    "additionalProperties": false,
      +    "properties": {
      +      "available": {
      +        "const": true,
      +        "default": true,
      +        "type": "boolean"
      +      },
      +      "chart_data": {
      +        "additionalProperties": false,
      +        "description": "An object that must be empty: the bridge sends ``{}`` for it.",
      +        "properties": {},
      +        "type": "object"
      +      },
      +      "links": {
      +        "additionalProperties": false,
      +        "properties": {
      +          "resolved_label": {
      +            "type": "string"
      +          }
      +        },
      +        "required": [
      +          "resolved_label"
      +        ],
      +        "type": "object"
      +      },
      +      "narrative_facts": {
      +        "additionalProperties": false,
      +        "properties": {
      +          "customs_code": {
      +            "type": "string"
      +          },
      +          "data_coverage": {
      +            "additionalProperties": false,
      +            "properties": {
      +              "data_max": {
      +                "description": "The last month with data inside the window ('YYYY-MM').",
      +                "pattern": "\\d{4}-\\d{2}",
      +                "type": "string"
      +              },
      +              "data_min": {
      +                "description": "The first month with data inside the window ('YYYY-MM').",
      +                "pattern": "\\d{4}-\\d{2}",
      +                "type": "string"
      +              }
      +            },
      +            "required": [
      +              "data_min",
      +              "data_max"
      +            ],
      +            "type": "object"
      +          },
      +          "is_bundling_heading": {
      +            "const": false,
      +            "type": "boolean"
      +          },
      +          "levels": {
      +            "items": {
      +              "additionalProperties": false,
      +              "description": "One level of a customs code's description hierarchy, chapter first\n(``ComextNomenclature.get_description_levels``, plus the synthetic\nlevels of residual spellings and the dated levels of former editions).\n\nThe optional flags are sparse on the wire: present when true, absent\notherwise (the shape of the nomenclature layer's raw dicts).",
      +              "properties": {
      +                "customs_code": {
      +                  "description": "The level's customs code.",
      +                  "type": "string"
      +                },
      +                "is_catch_all": {
      +                  "anyOf": [
      +                    {
      +                      "type": "boolean"
      +                    },
      +                    {
      +                      "type": "null"
      +                    }
      +                  ],
      +                  "default": null,
      +                  "description": "True for a catch-all ('other') level."
      +                },
      +                "residual": {
      +                  "anyOf": [
      +                    {
      +                      "type": "boolean"
      +                    },
      +                    {
      +                      "type": "null"
      +                    }
      +                  ],
      +                  "default": null,
      +                  "description": "True for the synthetic level of a residual spelling."
      +                },
      +                "segment": {
      +                  "anyOf": [
      +                    {
      +                      "type": "boolean"
      +                    },
      +                    {
      +                      "type": "null"
      +                    }
      +                  ],
      +                  "default": null,
      +                  "description": "True for a historical segment's own definition."
      +                },
      +                "siblings": {
      +                  "anyOf": [
      +                    {
      +                      "items": {
      +                        "additionalProperties": false,
      +                        "properties": {
      +                          "customs_code": {
      +                            "description": "A canonical customs code, TOTAL, or a supported residual spelling.",
      +                            "type": "string"
      +                          },
      +                          "text": {
      +                            "type": "string"
      +                          }
      +                        },
      +                        "required": [
      +                          "customs_code",
      +                          "text"
      +                        ],
      +                        "type": "object"
      +                      },
      +                      "type": "array"
      +                    },
      +                    {
      +                      "type": "null"
      +                    }
      +                  ],
      +                  "default": null,
      +                  "description": "For a catch-all level, the ordinary siblings it excludes."
      +                },
      +                "text": {
      +                  "description": "The level's label, in the requested language.",
      +                  "type": "string"
      +                },
      +                "untranslated": {
      +                  "anyOf": [
      +                    {
      +                      "type": "boolean"
      +                    },
      +                    {
      +                      "type": "null"
      +                    }
      +                  ],
      +                  "default": null,
      +                  "description": "True when the label fell back to English."
      +                },
      +                "window": {
      +                  "anyOf": [
      +                    {
      +                      "additionalProperties": false,
      +                      "description": "The validity window of one customs-code segment (one definition).",
      +                      "properties": {
      +                        "valid_from": {
      +                          "description": "First day of the window, ISO date.",
      +                          "type": "string"
      +                        },
      +                        "valid_to": {
      +                          "anyOf": [
      +                            {
      +                              "type": "string"
      +                            },
      +                            {
      +                              "type": "null"
      +                            }
      +                          ],
      +                          "description": "Last day of the window, ISO date; null while in force."
      +                        }
      +                      },
      +                      "required": [
      +                        "valid_from",
      +                        "valid_to"
      +                      ],
      +                      "type": "object"
      +                    },
      +                    {
      +                      "type": "null"
      +                    }
      +                  ],
      +                  "default": null,
      +                  "description": "For a level read from a dated edition (a former definition, or one of its ancestors as that edition had them): the validity window of the definition shown. Absent for current-edition levels."
      +                }
      +              },
      +              "required": [
      +                "customs_code",
      +                "text"
      +              ],
      +              "type": "object"
      +            },
      +            "type": "array"
      +          },
      +          "resolved_code": {
      +            "type": "string"
      +          },
      +          "resolved_label": {
      +            "type": "string"
      +          }
      +        },
      +        "required": [
      +          "is_bundling_heading",
      +          "customs_code",
      +          "resolved_code",
      +          "resolved_label",
      +          "levels",
      +          "data_coverage"
      +        ],
      +        "type": "object"
      +      },
      +      "reason": {
      +        "default": null,
      +        "type": "null"
      +      }
      +    },
      +    "required": [
      +      "narrative_facts",
      +      "chart_data",
      +      "links",
      +      "available",
      +      "reason"
      +    ],
      +    "type": "object"
      +  },
      +  {
      +    "additionalProperties": false,
      +    "description": "A section whose upstream sources failed: the reason, empty slots\nelsewhere (the envelope keys stay stable for MCP consumers).",
      +    "properties": {
      +      "available": {
      +        "const": false,
      +        "default": false,
      +        "type": "boolean"
      +      },
      +      "chart_data": {
      +        "additionalProperties": false,
      +        "description": "An object that must be empty: the bridge sends ``{}`` for it.",
      +        "properties": {},
      +        "type": "object"
      +      },
      +      "links": {
      +        "additionalProperties": false,
      +        "description": "An object that must be empty: the bridge sends ``{}`` for it.",
      +        "properties": {},
      +        "type": "object"
      +      },
      +      "narrative_facts": {
      +        "additionalProperties": false,
      +        "description": "An object that must be empty: the bridge sends ``{}`` for it.",
      +        "properties": {},
      +        "type": "object"
      +      },
      +      "reason": {
      +        "type": "string"
      +      }
      +    },
      +    "required": [
      +      "narrative_facts",
      +      "chart_data",
      +      "links",
      +      "available",
      +      "reason"
      +    ],
      +    "type": "object"
      +  }
      +]
  2. Added

TDQS

A3.8/5.0
Behavior4/5

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

Annotations already cover the safe-read profile (readOnly, idempotent, non-destructive), and the description adds real context on top: the exact response envelope keys, the presence of `available`/`reason` signalling that the section can be unavailable, and the downstream dependency on PRODCOM mapping. It does not discuss caching freshness or error conditions beyond the `available`/`reason` hint, keeping it at a strong 4 rather than 5.

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 short blocks: the first front-loads what the section contains and its deliberate thinness, the second gives the return shape and the convention reference. No filler, and the key scoping constraint appears before the incidental details.

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?

For a report-section helper with a deep nested request schema and an existing output schema, the description covers purpose, thinness, downstream gating, and the response convention. The only gap is the absence of a named alternative for the hierarchy/breadcrumb case it explicitly declines to serve.

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?

There is a single `query` parameter with 100% schema description coverage, including detailed nested field docs for `customs_code`, `baskets`, `reporter`, and periods. The description only adds that labels are resolved in `query.lang`, which is already documented in the schema. With the schema doing the heavy lifting, baseline 3 applies.

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?

The description names the concrete payload: resolved customs code plus label in `query.lang`, a subcode caveat, the cached data-coverage window, and PRODCOM-mapping availability. It also scopes itself negatively ("Deliberately thin -- no full CN hierarchy breadcrumb or sibling enumeration"), which separates it from hierarchy-oriented siblings. It stops short of naming the specific alternative (e.g. get_subtree, get_chapters), so it is clear but not fully differentiated.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

It anchors the tool to a specific report slot ("Scope & definitions") and notes the PRODCOM mapping gates the autonomy/vulnerability section, which implies where it belongs in a report flow. The "deliberately thin" remark implies when not to use it, but no sibling is named as the replacement. Usage is inferable rather than stated.

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.

Resources