Skip to main content
Glama

Get Subcode Compare

get_subcode_compare
Read-onlyIdempotent

Sub-code comparison: for a single parent customs code, expands into its sub-codes (or, for a multi-code request, compares the entered codes directly) and returns per-subcode quantity/value/price series for both flows -- so each sub-code plots as its own line instead of being aggregated away. The breakdown block is discriminated by state: 'ok' carries the panels, a leaf code returns 'leaf' and an unexpandable nomenclature 'unavailable', each with a message.

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_subcode_compare"
  }
}

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.
compactNoIf true, condense long numeric time series (more than ~6 points -- typically monthly/quarterly windows or wide multi-partner/multi-period breakdowns) into summary statistics (first, last, min, max, mean, pct_change) instead of returning every data point. Leave false for full-fidelity series (e.g. to actually plot a chart); set true when you just need the headline trend and want to save context.

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,
      -    "description": "POST /api/descriptive/subcode-compare — per-sub-code panels for both\nflows, or why the code has none.",
      -    "properties": {
      -      "breakdown": {
      -        "description": "The panels ('ok'), or why there are none ('leaf', 'unavailable').",
      -        "oneOf": [
      -          {
      -            "additionalProperties": false,
      -            "description": "A sub-code expansion that cannot be served: the code is a leaf in the\nrequested window.",
      -            "properties": {
      -              "message": {
      -                "description": "Why there is no breakdown.",
      -                "type": "string"
      -              },
      -              "state": {
      -                "const": "leaf",
      -                "type": "string"
      -              }
      -            },
      -            "required": [
      -              "state",
      -              "message"
      -            ],
      -            "type": "object"
      -          },
      -          {
      -            "additionalProperties": false,
      -            "description": "The per-sub-code panels of both flows.",
      -            "properties": {
      -              "exports": {
      -                "additionalProperties": false,
      -                "description": "The per-sub-code export panel.",
      -                "properties": {
      -                  "columns": {
      -                    "description": "The column order (the entity/sub-code ranking) the triplet fields are keyed by.",
      -                    "items": {
      -                      "type": "string"
      -                    },
      -                    "type": "array"
      -                  },
      -                  "descriptions": {
      -                    "anyOf": [
      -                      {
      -                        "additionalProperties": {
      -                          "type": "string"
      -                        },
      -                        "type": "object"
      -                      },
      -                      {
      -                        "type": "null"
      -                      }
      -                    ],
      -                    "default": null,
      -                    "description": "Subcode-compare only: customs-code column -> its CN label."
      -                  },
      -                  "periods": {
      -                    "description": "The block's period axis (first day of each period); every array in this block is parallel to it.",
      -                    "items": {
      -                      "format": "date",
      -                      "type": "string"
      -                    },
      -                    "type": "array"
      -                  },
      -                  "primary": {
      -                    "additionalProperties": false,
      -                    "description": "The net-mass quantity / value / price view.",
      -                    "properties": {
      -                      "price": {
      -                        "additionalProperties": {
      -                          "items": {
      -                            "anyOf": [
      -                              {
      -                                "type": "number"
      -                              },
      -                              {
      -                                "type": "null"
      -                              }
      -                            ]
      -                          },
      -                          "type": "array"
      -                        },
      -                        "description": "{column: period-aligned unit value series (value per quantity unit); null = no figure}.",
      -                        "type": "object"
      -                      },
      -                      "quantity": {
      -                        "additionalProperties": {
      -                          "items": {
      -                            "anyOf": [
      -                              {
      -                                "type": "number"
      -                              },
      -                              {
      -                                "type": "null"
      -                              }
      -                            ]
      -                          },
      -                          "type": "array"
      -                        },
      -                        "description": "{column: period-aligned quantity series (trade: net mass in tonnes; production: the PRODCOM unit); null = no figure}.",
      -                        "type": "object"
      -                      },
      -                      "value": {
      -                        "additionalProperties": {
      -                          "items": {
      -                            "anyOf": [
      -                              {
      -                                "type": "number"
      -                              },
      -                              {
      -                                "type": "null"
      -                              }
      -                            ]
      -                          },
      -                          "type": "array"
      -                        },
      -                        "description": "{column: period-aligned value series (EUR); null = no figure}.",
      -                        "type": "object"
      -                      }
      -                    },
      -                    "type": "object"
      -                  },
      -                  "supplementary": {
      -                    "additionalProperties": false,
      -                    "description": "The supplementary-unit view (empty when no usable supplementary quantities survive).",
      -                    "properties": {
      -                      "price": {
      -                        "additionalProperties": {
      -                          "items": {
      -                            "anyOf": [
      -                              {
      -                                "type": "number"
      -                              },
      -                              {
      -                                "type": "null"
      -                              }
      -                            ]
      -                          },
      -                          "type": "array"
      -                        },
      -                        "description": "{column: period-aligned supplementary-unit price series; null = no figure}.",
      -                        "type": "object"
      -                      },
      -                      "quantity": {
      -                        "additionalProperties": {
      -                          "items": {
      -                            "anyOf": [
      -                              {
      -                                "type": "number"
      -                              },
      -                              {
      -                                "type": "null"
      -                              }
      -                            ]
      -                          },
      -                          "type": "array"
      -                        },
      -                        "description": "{column: period-aligned supplementary-quantity series; null = no figure}.",
      -                        "type": "object"
      -                      }
      -                    },
      -                    "type": "object"
      -                  }
      -                },
      -                "type": "object"
      -              },
      -              "imports": {
      -                "additionalProperties": false,
      -                "description": "The per-sub-code import panel.",
      -                "properties": {
      -                  "columns": {
      -                    "description": "The column order (the entity/sub-code ranking) the triplet fields are keyed by.",
      -                    "items": {
      -                      "type": "string"
      -                    },
      -                    "type": "array"
      -                  },
      -                  "descriptions": {
      -                    "anyOf": [
      -                      {
      -                        "additionalProperties": {
      -                          "type": "string"
      -                        },
      -                        "type": "object"
      -                      },
      -                      {
      -                        "type": "null"
      -                      }
      -                    ],
      -                    "default": null,
      -                    "description": "Subcode-compare only: customs-code column -> its CN label."
      -                  },
      -                  "periods": {
      -                    "description": "The block's period axis (first day of each period); every array in this block is parallel to it.",
      -                    "items": {
      -                      "format": "date",
      -                      "type": "string"
      -                    },
      -                    "type": "array"
      -                  },
      -                  "primary": {
      -                    "additionalProperties": false,
      -                    "description": "The net-mass quantity / value / price view.",
      -                    "properties": {
      -                      "price": {
      -                        "additionalProperties": {
      -                          "items": {
      -                            "anyOf": [
      -                              {
      -                                "type": "number"
      -                              },
      -                              {
      -                                "type": "null"
      -                              }
      -                            ]
      -                          },
      -                          "type": "array"
      -                        },
      -                        "description": "{column: period-aligned unit value series (value per quantity unit); null = no figure}.",
      -                        "type": "object"
      -                      },
      -                      "quantity": {
      -                        "additionalProperties": {
      -                          "items": {
      -                            "anyOf": [
      -                              {
      -                                "type": "number"
      -                              },
      -                              {
      -                                "type": "null"
      -                              }
      -                            ]
      -                          },
      -                          "type": "array"
      -                        },
      -                        "description": "{column: period-aligned quantity series (trade: net mass in tonnes; production: the PRODCOM unit); null = no figure}.",
      -                        "type": "object"
      -                      },
      -                      "value": {
      -                        "additionalProperties": {
      -                          "items": {
      -                            "anyOf": [
      -                              {
      -                                "type": "number"
      -                              },
      -                              {
      -                                "type": "null"
      -                              }
      -                            ]
      -                          },
      -                          "type": "array"
      -                        },
      -                        "description": "{column: period-aligned value series (EUR); null = no figure}.",
      -                        "type": "object"
      -                      }
      -                    },
      -                    "type": "object"
      -                  },
      -                  "supplementary": {
      -                    "additionalProperties": false,
      -                    "description": "The supplementary-unit view (empty when no usable supplementary quantities survive).",
      -                    "properties": {
      -                      "price": {
      -                        "additionalProperties": {
      -                          "items": {
      -                            "anyOf": [
      -                              {
      -                                "type": "number"
      -                              },
      -                              {
      -                                "type": "null"
      -                              }
      -                            ]
      -                          },
      -                          "type": "array"
      -                        },
      -                        "description": "{column: period-aligned supplementary-unit price series; null = no figure}.",
      -                        "type": "object"
      -                      },
      -                      "quantity": {
      -                        "additionalProperties": {
      -                          "items": {
      -                            "anyOf": [
      -                              {
      -                                "type": "number"
      -                              },
      -                              {
      -                                "type": "null"
      -                              }
      -                            ]
      -                          },
      -                          "type": "array"
      -                        },
      -                        "description": "{column: period-aligned supplementary-quantity series; null = no figure}.",
      -                        "type": "object"
      -                      }
      -                    },
      -                    "type": "object"
      -                  }
      -                },
      -                "type": "object"
      -              },
      -              "state": {
      -                "const": "ok",
      -                "default": "ok",
      -                "type": "string"
      -              },
      -              "subcodes": {
      -                "description": "Every series of the breakdown (before the top-N cut), with its label and the definitions it reads.",
      -                "items": {
      -                  "additionalProperties": false,
      -                  "description": "One sub-code or residual customs code row, shared by breakdown views\n(``subcode-compare``, ``concentration-compare``, ``volatility``) and\nvalidation responses (``ValidateCustomsCodeResponse.residual_customs_codes``).",
      -                  "properties": {
      -                    "basket_key": {
      -                      "description": "The key of this row's basket in the payload's per-sub-code maps: the sub-code (read over the parent piece's window), or the entered basket's label.",
      -                      "type": "string"
      -                    },
      -                    "customs_code": {
      -                      "description": "The sub-code (or residual spelling).",
      -                      "type": "string"
      -                    },
      -                    "in_eurostat_api": {
      -                      "anyOf": [
      -                        {
      -                          "type": "boolean"
      -                        },
      -                        {
      -                          "type": "null"
      -                        }
      -                      ],
      -                      "default": null,
      -                      "description": "For a residual row: whether Eurostat's API serves the spelling as a PRODUCT value (XX codes only)."
      -                    },
      -                    "label": {
      -                      "description": "The label of the row's (latest) definition, in the requested language when recorded.",
      -                      "type": "string"
      -                    },
      -                    "residual_kind": {
      -                      "anyOf": [
      -                        {
      -                          "enum": [
      -                            "xx",
      -                            "letter"
      -                          ],
      -                          "type": "string"
      -                        },
      -                        {
      -                          "type": "null"
      -                        }
      -                      ],
      -                      "default": null,
      -                      "description": "For a residual row: 'xx' or 'letter'. Residual rows explain the gap between the sub-codes and the parent, and are pinned outside the top-N ranking."
      -                    },
      -                    "residual_reason": {
      -                      "anyOf": [
      -                        {
      -                          "enum": [
      -                            "A",
      -                            "B",
      -                            "C",
      -                            "E",
      -                            "F",
      -                            "I",
      -                            "M",
      -                            "P",
      -                            "R",
      -                            "S",
      -                            "T",
      -                            "V",
      -                            "W",
      -                            "Y"
      -                          ],
      -                          "type": "string"
      -                        },
      -                        {
      -                          "type": "null"
      -                        }
      -                      ],
      -                      "default": null,
      -                      "description": "For a letter code or reason group: the reason letter (S, Y, E, I, …)."
      -                    },
      -                    "residual_spelling": {
      -                      "anyOf": [
      -                        {
      -                          "enum": [
      -                            "xx",
      -                            "letter",
      -                            "reason_group"
      -                          ],
      -                          "type": "string"
      -                        },
      -                        {
      -                          "type": "null"
      -                        }
      -                      ],
      -                      "default": null,
      -                      "description": "For a residual row: 'xx', 'letter' or 'reason_group'."
      -                    },
      -                    "segments": {
      -                      "description": "The definitions in force during the basket's window (empty for residual rows and for validation rows).",
      -                      "items": {
      -                        "additionalProperties": false,
      -                        "description": "One recorded definition of a customs code: a fact of the\nclassification metadata, with its window and its own label.",
      -                        "properties": {
      -                          "customs_code": {
      -                            "description": "The customs code the segment defines.",
      -                            "type": "string"
      -                          },
      -                          "kind": {
      -                            "description": "The classification row's kind ('cn', 'residual_xx', 'letter_coded').",
      -                            "enum": [
      -                              "cn",
      -                              "residual_xx",
      -                              "letter_coded",
      -                              "chapter_00",
      -                              "other"
      -                            ],
      -                            "type": "string"
      -                          },
      -                          "label": {
      -                            "description": "The segment's own label (the definition in force during its window), in the requested language when available.",
      -                            "type": "string"
      -                          },
      -                          "label_lang": {
      -                            "description": "The label's language (English when the requested one is not recorded for this definition).",
      -                            "enum": [
      -                              "bg",
      -                              "cs",
      -                              "da",
      -                              "de",
      -                              "el",
      -                              "en",
      -                              "es",
      -                              "et",
      -                              "fi",
      -                              "fr",
      -                              "ga",
      -                              "hr",
      -                              "hu",
      -                              "it",
      -                              "lt",
      -                              "lv",
      -                              "mt",
      -                              "nl",
      -                              "pl",
      -                              "pt",
      -                              "ro",
      -                              "sk",
      -                              "sl",
      -                              "sv"
      -                            ],
      -                            "type": "string"
      -                          },
      -                          "untranslated": {
      -                            "anyOf": [
      -                              {
      -                                "type": "boolean"
      -                              },
      -                              {
      -                                "type": "null"
      -                              }
      -                            ],
      -                            "default": null,
      -                            "description": "True when the label fell back to English."
      -                          },
      -                          "valid_from": {
      -                            "description": "First day of the segment's validity window, ISO date.",
      -                            "type": "string"
      -                          },
      -                          "valid_to": {
      -                            "anyOf": [
      -                              {
      -                                "type": "string"
      -                              },
      -                              {
      -                                "type": "null"
      -                              }
      -                            ],
      -                            "description": "Last day of the window, ISO date; null for a segment still in force."
      -                          }
      -                        },
      -                        "required": [
      -                          "customs_code",
      -                          "valid_from",
      -                          "valid_to",
      -                          "kind",
      -                          "label",
      -                          "label_lang"
      -                        ],
      -                        "type": "object"
      -                      },
      -                      "type": "array"
      -                    },
      -                    "untranslated": {
      -                      "anyOf": [
      -                        {
      -                          "type": "boolean"
      -                        },
      -                        {
      -                          "type": "null"
      -                        }
      -                      ],
      -                      "default": null,
      -                      "description": "True when the label fell back to English."
      -                    }
      -                  },
      -                  "required": [
      -                    "basket_key",
      -                    "customs_code",
      -                    "label",
      -                    "segments"
      -                  ],
      -                  "type": "object"
      -                },
      -                "type": "array"
      -              },
      -              "supp_unit": {
      -                "anyOf": [
      -                  {
      -                    "additionalProperties": false,
      -                    "description": "A quantity/supplementary unit label (``supp_unit`` / ``prodcom_unit`` /\n``quantity_unit`` in response headers).",
      -                    "properties": {
      -                      "label": {
      -                        "anyOf": [
      -                          {
      -                            "type": "string"
      -                          },
      -                          {
      -                            "type": "null"
      -                          }
      -                        ],
      -                        "default": null,
      -                        "description": "The unit's display label in the response's language."
      -                      },
      -                      "symbol": {
      -                        "anyOf": [
      -                          {
      -                            "type": "string"
      -                          },
      -                          {
      -                            "type": "null"
      -                          }
      -                        ],
      -                        "default": null,
      -                        "description": "The unit's display symbol (e.g. 't', 'l')."
      -                      },
      -                      "unit_code": {
      -                        "anyOf": [
      -                          {
      -                            "type": "string"
      -                          },
      -                          {
      -                            "type": "null"
      -                          }
      -                        ],
      -                        "default": null,
      -                        "description": "The unit's authority code (e.g. 'T', 'PST', '1000_KWH')."
      -                      }
      -                    },
      -                    "type": "object"
      -                  },
      -                  {
      -                    "type": "null"
      -                  }
      -                ],
      -                "description": "The single supplementary unit the displayed series use, when one survives the coverage gate."
      -              }
      -            },
      -            "required": [
      -              "subcodes",
      -              "supp_unit",
      -              "imports",
      -              "exports",
      -              "state"
      -            ],
      -            "type": "object"
      -          }
      -        ]
      -      },
      -      "header": {
      -        "additionalProperties": false,
      -        "description": "The request's metadata: customs code, labels, units, residual share, selection and notes.",
      -        "properties": {
      -          "baskets": {
      -            "description": "How each requested basket was read: its label and its pieces, each with the definitions its window meets.",
      -            "items": {
      -              "additionalProperties": false,
      -              "description": "How one requested basket was read: its label and its pieces.",
      -              "properties": {
      -                "label": {
      -                  "description": "The basket's display label (the caller's label, or the pieces' codes joined).",
      -                  "type": "string"
      -                },
      -                "pieces": {
      -                  "description": "The basket's pieces, in request order.",
      -                  "items": {
      -                    "additionalProperties": false,
      -                    "description": "How one requested piece was read: the code, the window it was asked\nfor (a null bound = the request's), and the recorded definitions that\nwindow meets -- facts, no interpretation.",
      -                    "properties": {
      -                      "customs_code": {
      -                        "description": "The piece's customs code.",
      -                        "type": "string"
      -                      },
      -                      "definitions": {
      -                        "description": "The recorded definitions of the code whose window meets the piece's, oldest first: what the digits meant over the window.",
      -                        "items": {
      -                          "additionalProperties": false,
      -                          "description": "One recorded definition of a customs code: a fact of the\nclassification metadata, with its window and its own label.",
      -                          "properties": {
      -                            "customs_code": {
      -                              "description": "The customs code the segment defines.",
      -                              "type": "string"
      -                            },
      -                            "kind": {
      -                              "description": "The classification row's kind ('cn', 'residual_xx', 'letter_coded').",
      -                              "enum": [
      -                                "cn",
      -                                "residual_xx",
      -                                "letter_coded",
      -                                "chapter_00",
      -                                "other"
      -                              ],
      -                              "type": "string"
      -                            },
      -                            "label": {
      -                              "description": "The segment's own label (the definition in force during its window), in the requested language when available.",
      -                              "type": "string"
      -                            },
      -                            "label_lang": {
      -                              "description": "The label's language (English when the requested one is not recorded for this definition).",
      -                              "enum": [
      -                                "bg",
      -                                "cs",
      -                                "da",
      -                                "de",
      -                                "el",
      -                                "en",
      -                                "es",
      -                                "et",
      -                                "fi",
      -                                "fr",
      -                                "ga",
      -                                "hr",
      -                                "hu",
      -                                "it",
      -                                "lt",
      -                                "lv",
      -                                "mt",
      -                                "nl",
      -                                "pl",
      -                                "pt",
      -                                "ro",
      -                                "sk",
      -                                "sl",
      -                                "sv"
      -                              ],
      -                              "type": "string"
      -                            },
      -                            "untranslated": {
      -                              "anyOf": [
      -                                {
      -                                  "type": "boolean"
      -                                },
      -                                {
      -                                  "type": "null"
      -                                }
      -                              ],
      -                              "default": null,
      -                              "description": "True when the label fell back to English."
      -                            },
      -                            "valid_from": {
      -                              "description": "First day of the segment's validity window, ISO date.",
      -                              "type": "string"
      -                            },
      -                            "valid_to": {
      -                              "anyOf": [
      -                                {
      -                                  "type": "string"
      -                                },
      -                                {
      -                                  "type": "null"
      -                                }
      -                              ],
      -                              "description": "Last day of the window, ISO date; null for a segment still in force."
      -                            }
      -                          },
      -                          "required": [
      -                            "customs_code",
      -                            "valid_from",
      -                            "valid_to",
      -                            "kind",
      -                            "label",
      -                            "label_lang"
      -                          ],
      -                          "type": "object"
      -                        },
      -                        "type": "array"
      -                      },
      -                      "from_month": {
      -                        "anyOf": [
      -                          {
      -                            "description": "A calendar month, 'YYYY-MM'.",
      -                            "pattern": "\\d{4}-\\d{2}",
      -                            "type": "string"
      -                          },
      -                          {
      -                            "type": "null"
      -                          }
      -                        ],
      -                        "description": "The window's first month, ISO 'YYYY-MM'; null = the request's period_start."
      -                      },
      -                      "to_month": {
      -                        "anyOf": [
      -                          {
      -                            "description": "A calendar month, 'YYYY-MM'.",
      -                            "pattern": "\\d{4}-\\d{2}",
      -                            "type": "string"
      -                          },
      -                          {
      -                            "type": "null"
      -                          }
      -                        ],
      -                        "description": "The window's last month, ISO 'YYYY-MM'; null = the request's period_end."
      -                      }
      -                    },
      -                    "required": [
      -                      "customs_code",
      -                      "from_month",
      -                      "to_month",
      -                      "definitions"
      -                    ],
      -                    "type": "object"
      -                  },
      -                  "type": "array"
      -                }
      -              },
      -              "required": [
      -                "label",
      -                "pieces"
      -              ],
      -              "type": "object"
      -            },
      -            "type": "array"
      -          },
      -          "customs_code": {
      -            "description": "The queried customs code(s), as requested (several codes joined).",
      -            "type": "string"
      -          },
      -          "customs_code_label": {
      -            "description": "The customs code's display label.",
      -            "type": "string"
      -          },
      -          "data_provenance": {
      -            "additionalProperties": false,
      -            "description": "Which published data produced the figures: the same selector can return different numbers after a store or classification refresh.",
      -            "properties": {
      -              "metadata_generation": {
      -                "anyOf": [
      -                  {
      -                    "type": "integer"
      -                  },
      -                  {
      -                    "type": "null"
      -                  }
      -                ],
      -                "description": "The CN classification snapshot's generation; null when none is published."
      -              },
      -              "store_generation": {
      -                "description": "The trade store's completed-build generation.",
      -                "type": "string"
      -              }
      -            },
      -            "required": [
      -              "store_generation",
      -              "metadata_generation"
      -            ],
      -            "type": "object"
      -          },
      -          "frequency": {
      -            "description": "The period grain of every series in the payload ('year' for PRODCOM).",
      -            "enum": [
      -              "month",
      -              "quarter",
      -              "year"
      -            ],
      -            "type": "string"
      -          },
      -          "in_eurostat_api": {
      -            "description": "False only for letter codes and reason groups: Eurostat's API rejects them as PRODUCT values, though their trade is inside the API's parent totals. True for digit and XX codes.",
      -            "type": "boolean"
      -          },
      -          "levels": {
      -            "description": "The customs code's CN description hierarchy, chapter first.",
      -            "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"
      -          },
      -          "notes": {
      -            "description": "Structured notes on the selection and on the slice: whatever was combined, removed, nulled or cannot be served.",
      -            "items": {
      -              "additionalProperties": false,
      -              "description": "A structured coverage note: what the data shows or lacks for this\nslice (whatever was removed, nulled or cannot be served).",
      -              "properties": {
      -                "args": {
      -                  "additionalProperties": {
      -                    "type": "string"
      -                  },
      -                  "description": "The note's structured facts (codes, windows, counts, shares).",
      -                  "type": "object"
      -                },
      -                "basket_refs": {
      -                  "description": "Indexes of the requested baskets the note concerns; empty when it concerns the whole slice.",
      -                  "items": {
      -                    "type": "integer"
      -                  },
      -                  "type": "array"
      -                },
      -                "kind": {
      -                  "description": "Stable identifier of the note's kind, e.g. 'reporter_coverage', 'supp_coverage_gate', 'outliers_nulled'.",
      -                  "enum": [
      -                    "reporter_coverage",
      -                    "total_only_period",
      -                    "unmapped_country_code",
      -                    "no_residuals_stored",
      -                    "outliers_nulled",
      -                    "supp_unit_mixed",
      -                    "supp_coverage_gate",
      -                    "partial_bucket",
      -                    "component_empty",
      -                    "negative_values",
      -                    "cn8_residual_sibling",
      -                    "group_residual_above"
      -                  ],
      -                  "type": "string"
      -                },
      -                "message": {
      -                  "description": "Fixed English text of the kind; slice-specific facts are in args.",
      -                  "type": "string"
      -                },
      -                "severity": {
      -                  "description": "'warning' when the figures are affected, 'info' otherwise.",
      -                  "enum": [
      -                    "info",
      -                    "warning"
      -                  ],
      -                  "type": "string"
      -                }
      -              },
      -              "required": [
      -                "kind",
      -                "severity",
      -                "message",
      -                "basket_refs",
      -                "args"
      -              ],
      -              "type": "object"
      -            },
      -            "type": "array"
      -          },
      -          "partner_set_label": {
      -            "description": "The partner set's label.",
      -            "type": "string"
      -          },
      -          "quantity_unit": {
      -            "additionalProperties": false,
      -            "description": "The unit of every 'quantity' series: net mass in tonnes.",
      -            "properties": {
      -              "label": {
      -                "anyOf": [
      -                  {
      -                    "type": "string"
      -                  },
      -                  {
      -                    "type": "null"
      -                  }
      -                ],
      -                "default": null,
      -                "description": "The unit's display label in the response's language."
      -              },
      -              "symbol": {
      -                "anyOf": [
      -                  {
      -                    "type": "string"
      -                  },
      -                  {
      -                    "type": "null"
      -                  }
      -                ],
      -                "default": null,
      -                "description": "The unit's display symbol (e.g. 't', 'l')."
      -              },
      -              "unit_code": {
      -                "anyOf": [
      -                  {
      -                    "type": "string"
      -                  },
      -                  {
      -                    "type": "null"
      -                  }
      -                ],
      -                "default": null,
      -                "description": "The unit's authority code (e.g. 'T', 'PST', '1000_KWH')."
      -              }
      -            },
      -            "type": "object"
      -          },
      -          "reporter_label": {
      -            "anyOf": [
      -              {
      -                "type": "string"
      -              },
      -              {
      -                "type": "null"
      -              }
      -            ],
      -            "description": "The reporter's display label; null for views spanning every reporter."
      -          },
      -          "residual_share": {
      -            "anyOf": [
      -              {
      -                "additionalProperties": false,
      -                "description": "The residual share of a slice (``Presenter.residual_share``):\n``by_level`` splits it across the level a residual sits directly under\n(``chapter``/``heading``/``subheading``), ``by_kind`` across its kind\n(``xx``/``letter`` -- the latter makes the 2002 letter→XX re-keying\nvisible in long series). One entry per present level/kind only.",
      -                "properties": {
      -                  "by_kind": {
      -                    "additionalProperties": {
      -                      "additionalProperties": false,
      -                      "description": "One residual-share figure: the part of a total's value (0-1) sitting\nin residual customs codes, plus the mass share when honestly\nmeasurable. Wire counterpart of ``core.computation.comext.residuals.ResidualShareSlice``.",
      -                      "properties": {
      -                        "quantity_share": {
      -                          "anyOf": [
      -                            {
      -                              "type": "number"
      -                            },
      -                            {
      -                              "type": "null"
      -                            }
      -                          ],
      -                          "default": null,
      -                          "description": "Share of the slice's total net mass (0-1) declared in residual customs codes. Null when net-mass coverage fails the all-or-nothing gate (see quantity_share_note) -- never a partial ratio."
      -                        },
      -                        "quantity_share_note": {
      -                          "anyOf": [
      -                            {
      -                              "type": "string"
      -                            },
      -                            {
      -                              "type": "null"
      -                            }
      -                          ],
      -                          "default": null,
      -                          "description": "Why quantity_share is null, when it is."
      -                        },
      -                        "value_share": {
      -                          "description": "Share of the slice's total value (0-1) declared in residual customs codes.",
      -                          "type": "number"
      -                        }
      -                      },
      -                      "required": [
      -                        "value_share"
      -                      ],
      -                      "type": "object"
      -                    },
      -                    "description": "The share split by residual kind (xx/letter) -- makes the 2002 letter→XX re-keying visible in long series.",
      -                    "propertyNames": {
      -                      "enum": [
      -                        "xx",
      -                        "letter"
      -                      ],
      -                      "type": "string"
      -                    },
      -                    "type": "object"
      -                  },
      -                  "by_level": {
      -                    "additionalProperties": {
      -                      "additionalProperties": false,
      -                      "description": "One residual-share figure: the part of a total's value (0-1) sitting\nin residual customs codes, plus the mass share when honestly\nmeasurable. Wire counterpart of ``core.computation.comext.residuals.ResidualShareSlice``.",
      -                      "properties": {
      -                        "quantity_share": {
      -                          "anyOf": [
      -                            {
      -                              "type": "number"
      -                            },
      -                            {
      -                              "type": "null"
      -                            }
      -                          ],
      -                          "default": null,
      -                          "description": "Share of the slice's total net mass (0-1) declared in residual customs codes. Null when net-mass coverage fails the all-or-nothing gate (see quantity_share_note) -- never a partial ratio."
      -                        },
      -                        "quantity_share_note": {
      -                          "anyOf": [
      -                            {
      -                              "type": "string"
      -                            },
      -                            {
      -                              "type": "null"
      -                            }
      -                          ],
      -                          "default": null,
      -                          "description": "Why quantity_share is null, when it is."
      -                        },
      -                        "value_share": {
      -                          "description": "Share of the slice's total value (0-1) declared in residual customs codes.",
      -                          "type": "number"
      -                        }
      -                      },
      -                      "required": [
      -                        "value_share"
      -                      ],
      -                      "type": "object"
      -                    },
      -                    "description": "The share split by the level the residual sits directly under (chapter/heading/subheading).",
      -                    "propertyNames": {
      -                      "enum": [
      -                        "chapter",
      -                        "heading",
      -                        "subheading",
      -                        "cn8",
      -                        "total"
      -                      ],
      -                      "type": "string"
      -                    },
      -                    "type": "object"
      -                  },
      -                  "quantity_share": {
      -                    "anyOf": [
      -                      {
      -                        "type": "number"
      -                      },
      -                      {
      -                        "type": "null"
      -                      }
      -                    ],
      -                    "default": null,
      -                    "description": "Share of the slice's total net mass (0-1) declared in residual customs codes. Null when net-mass coverage fails the all-or-nothing gate (see quantity_share_note) -- never a partial ratio."
      -                  },
      -                  "quantity_share_note": {
      -                    "anyOf": [
      -                      {
      -                        "type": "string"
      -                      },
      -                      {
      -                        "type": "null"
      -                      }
      -                    ],
      -                    "default": null,
      -                    "description": "Why quantity_share is null, when it is."
      -                  },
      -                  "value_share": {
      -                    "description": "Share of the slice's total value (0-1) declared in residual customs codes.",
      -                    "type": "number"
      -                  }
      -                },
      -                "required": [
      -                  "value_share"
      -                ],
      -                "type": "object"
      -              },
      -              {
      -                "type": "null"
      -              }
      -            ],
      -            "description": "The part of the slice's total that sits in residual customs codes -- present for single 2/4/6-digit requests only; None for CN8, residual spellings, TOTAL and multi-code requests, and whenever the slice holds no total value."
      -          },
      -          "residual_share_note": {
      -            "anyOf": [
      -              {
      -                "additionalProperties": false,
      -                "description": "Why ``residual_share`` is null -- so a missing share never reads as\n\"no residual trade\" (a measured zero is a share of 0.0, never null).",
      -                "properties": {
      -                  "message": {
      -                    "description": "The reason in English, naming the code where relevant.",
      -                    "type": "string"
      -                  },
      -                  "reason": {
      -                    "description": "Stable identifier of the reason.",
      -                    "enum": [
      -                      "switched_off",
      -                      "multi_code",
      -                      "mixed_codes",
      -                      "pieced_basket",
      -                      "residual_spelling",
      -                      "total",
      -                      "cn8_leaf",
      -                      "no_partners",
      -                      "no_store_data",
      -                      "no_total_trade"
      -                    ],
      -                    "type": "string"
      -                  }
      -                },
      -                "required": [
      -                  "reason",
      -                  "message"
      -                ],
      -                "type": "object"
      -              },
      -              {
      -                "type": "null"
      -              }
      -            ],
      -            "description": "Why residual_share is null, when it is -- so a missing share never reads as 'no residual trade'. Null whenever residual_share is present."
      -          }
      -        },
      -        "required": [
      -          "customs_code",
      -          "levels",
      -          "customs_code_label",
      -          "frequency",
      -          "reporter_label",
      -          "partner_set_label",
      -          "quantity_unit",
      -          "residual_share",
      -          "residual_share_note",
      -          "in_eurostat_api",
      -          "baskets",
      -          "notes",
      -          "data_provenance"
      -        ],
      -        "type": "object"
      -      }
      -    },
      -    "required": [
      -      "header",
      -      "breakdown"
      -    ],
      -    "type": "object"
      -  },
      -  {
      -    "additionalProperties": {},
      -    "type": "object"
      -  }
      -]New value: +[
      +  {
      +    "additionalProperties": false,
      +    "description": "POST /api/descriptive/subcode-compare — per-sub-code panels for both\nflows, or why the code has none.",
      +    "properties": {
      +      "breakdown": {
      +        "description": "The panels ('ok'), or why there are none ('leaf', 'unavailable').",
      +        "oneOf": [
      +          {
      +            "additionalProperties": false,
      +            "description": "A sub-code expansion that cannot be served: the code is a leaf in the\nrequested window.",
      +            "properties": {
      +              "message": {
      +                "description": "Why there is no breakdown.",
      +                "type": "string"
      +              },
      +              "state": {
      +                "const": "leaf",
      +                "type": "string"
      +              }
      +            },
      +            "required": [
      +              "state",
      +              "message"
      +            ],
      +            "type": "object"
      +          },
      +          {
      +            "additionalProperties": false,
      +            "description": "The per-sub-code panels of both flows.",
      +            "properties": {
      +              "exports": {
      +                "additionalProperties": false,
      +                "description": "The per-sub-code export panel.",
      +                "properties": {
      +                  "columns": {
      +                    "description": "The column order (the entity/sub-code ranking) the triplet fields are keyed by.",
      +                    "items": {
      +                      "type": "string"
      +                    },
      +                    "type": "array"
      +                  },
      +                  "descriptions": {
      +                    "anyOf": [
      +                      {
      +                        "additionalProperties": {
      +                          "type": "string"
      +                        },
      +                        "type": "object"
      +                      },
      +                      {
      +                        "type": "null"
      +                      }
      +                    ],
      +                    "default": null,
      +                    "description": "Subcode-compare only: customs-code column -> its CN label."
      +                  },
      +                  "periods": {
      +                    "description": "The block's period axis (first day of each period); every array in this block is parallel to it.",
      +                    "items": {
      +                      "format": "date",
      +                      "type": "string"
      +                    },
      +                    "type": "array"
      +                  },
      +                  "primary": {
      +                    "additionalProperties": false,
      +                    "description": "The net-mass quantity / value / price view.",
      +                    "properties": {
      +                      "price": {
      +                        "additionalProperties": {
      +                          "items": {
      +                            "anyOf": [
      +                              {
      +                                "type": "number"
      +                              },
      +                              {
      +                                "type": "null"
      +                              }
      +                            ]
      +                          },
      +                          "type": "array"
      +                        },
      +                        "description": "{column: period-aligned unit value series (value per quantity unit); null = no figure}.",
      +                        "type": "object"
      +                      },
      +                      "quantity": {
      +                        "additionalProperties": {
      +                          "items": {
      +                            "anyOf": [
      +                              {
      +                                "type": "number"
      +                              },
      +                              {
      +                                "type": "null"
      +                              }
      +                            ]
      +                          },
      +                          "type": "array"
      +                        },
      +                        "description": "{column: period-aligned quantity series (trade: net mass in tonnes; production: the PRODCOM unit); null = no figure}.",
      +                        "type": "object"
      +                      },
      +                      "value": {
      +                        "additionalProperties": {
      +                          "items": {
      +                            "anyOf": [
      +                              {
      +                                "type": "number"
      +                              },
      +                              {
      +                                "type": "null"
      +                              }
      +                            ]
      +                          },
      +                          "type": "array"
      +                        },
      +                        "description": "{column: period-aligned value series (EUR); null = no figure}.",
      +                        "type": "object"
      +                      }
      +                    },
      +                    "required": [
      +                      "quantity",
      +                      "value",
      +                      "price"
      +                    ],
      +                    "type": "object"
      +                  },
      +                  "supplementary": {
      +                    "additionalProperties": false,
      +                    "description": "The supplementary-unit view (empty when no usable supplementary quantities survive).",
      +                    "properties": {
      +                      "price": {
      +                        "additionalProperties": {
      +                          "items": {
      +                            "anyOf": [
      +                              {
      +                                "type": "number"
      +                              },
      +                              {
      +                                "type": "null"
      +                              }
      +                            ]
      +                          },
      +                          "type": "array"
      +                        },
      +                        "description": "{column: period-aligned supplementary-unit price series; null = no figure}.",
      +                        "type": "object"
      +                      },
      +                      "quantity": {
      +                        "additionalProperties": {
      +                          "items": {
      +                            "anyOf": [
      +                              {
      +                                "type": "number"
      +                              },
      +                              {
      +                                "type": "null"
      +                              }
      +                            ]
      +                          },
      +                          "type": "array"
      +                        },
      +                        "description": "{column: period-aligned supplementary-quantity series; null = no figure}.",
      +                        "type": "object"
      +                      }
      +                    },
      +                    "required": [
      +                      "quantity",
      +                      "price"
      +                    ],
      +                    "type": "object"
      +                  }
      +                },
      +                "required": [
      +                  "periods",
      +                  "columns",
      +                  "primary",
      +                  "supplementary",
      +                  "descriptions"
      +                ],
      +                "type": "object"
      +              },
      +              "imports": {
      +                "additionalProperties": false,
      +                "description": "The per-sub-code import panel.",
      +                "properties": {
      +                  "columns": {
      +                    "description": "The column order (the entity/sub-code ranking) the triplet fields are keyed by.",
      +                    "items": {
      +                      "type": "string"
      +                    },
      +                    "type": "array"
      +                  },
      +                  "descriptions": {
      +                    "anyOf": [
      +                      {
      +                        "additionalProperties": {
      +                          "type": "string"
      +                        },
      +                        "type": "object"
      +                      },
      +                      {
      +                        "type": "null"
      +                      }
      +                    ],
      +                    "default": null,
      +                    "description": "Subcode-compare only: customs-code column -> its CN label."
      +                  },
      +                  "periods": {
      +                    "description": "The block's period axis (first day of each period); every array in this block is parallel to it.",
      +                    "items": {
      +                      "format": "date",
      +                      "type": "string"
      +                    },
      +                    "type": "array"
      +                  },
      +                  "primary": {
      +                    "additionalProperties": false,
      +                    "description": "The net-mass quantity / value / price view.",
      +                    "properties": {
      +                      "price": {
      +                        "additionalProperties": {
      +                          "items": {
      +                            "anyOf": [
      +                              {
      +                                "type": "number"
      +                              },
      +                              {
      +                                "type": "null"
      +                              }
      +                            ]
      +                          },
      +                          "type": "array"
      +                        },
      +                        "description": "{column: period-aligned unit value series (value per quantity unit); null = no figure}.",
      +                        "type": "object"
      +                      },
      +                      "quantity": {
      +                        "additionalProperties": {
      +                          "items": {
      +                            "anyOf": [
      +                              {
      +                                "type": "number"
      +                              },
      +                              {
      +                                "type": "null"
      +                              }
      +                            ]
      +                          },
      +                          "type": "array"
      +                        },
      +                        "description": "{column: period-aligned quantity series (trade: net mass in tonnes; production: the PRODCOM unit); null = no figure}.",
      +                        "type": "object"
      +                      },
      +                      "value": {
      +                        "additionalProperties": {
      +                          "items": {
      +                            "anyOf": [
      +                              {
      +                                "type": "number"
      +                              },
      +                              {
      +                                "type": "null"
      +                              }
      +                            ]
      +                          },
      +                          "type": "array"
      +                        },
      +                        "description": "{column: period-aligned value series (EUR); null = no figure}.",
      +                        "type": "object"
      +                      }
      +                    },
      +                    "required": [
      +                      "quantity",
      +                      "value",
      +                      "price"
      +                    ],
      +                    "type": "object"
      +                  },
      +                  "supplementary": {
      +                    "additionalProperties": false,
      +                    "description": "The supplementary-unit view (empty when no usable supplementary quantities survive).",
      +                    "properties": {
      +                      "price": {
      +                        "additionalProperties": {
      +                          "items": {
      +                            "anyOf": [
      +                              {
      +                                "type": "number"
      +                              },
      +                              {
      +                                "type": "null"
      +                              }
      +                            ]
      +                          },
      +                          "type": "array"
      +                        },
      +                        "description": "{column: period-aligned supplementary-unit price series; null = no figure}.",
      +                        "type": "object"
      +                      },
      +                      "quantity": {
      +                        "additionalProperties": {
      +                          "items": {
      +                            "anyOf": [
      +                              {
      +                                "type": "number"
      +                              },
      +                              {
      +                                "type": "null"
      +                              }
      +                            ]
      +                          },
      +                          "type": "array"
      +                        },
      +                        "description": "{column: period-aligned supplementary-quantity series; null = no figure}.",
      +                        "type": "object"
      +                      }
      +                    },
      +                    "required": [
      +                      "quantity",
      +                      "price"
      +                    ],
      +                    "type": "object"
      +                  }
      +                },
      +                "required": [
      +                  "periods",
      +                  "columns",
      +                  "primary",
      +                  "supplementary",
      +                  "descriptions"
      +                ],
      +                "type": "object"
      +              },
      +              "state": {
      +                "const": "ok",
      +                "default": "ok",
      +                "type": "string"
      +              },
      +              "subcodes": {
      +                "description": "Every series of the breakdown (before the top-N cut), with its label and the definitions it reads.",
      +                "items": {
      +                  "additionalProperties": false,
      +                  "description": "One sub-code or residual customs code row, shared by breakdown views\n(``subcode-compare``, ``concentration-compare``, ``volatility``) and\nvalidation responses (``ValidateCustomsCodeResponse.residual_customs_codes``).",
      +                  "properties": {
      +                    "basket_key": {
      +                      "description": "The key of this row's basket in the payload's per-sub-code maps: the sub-code (read over the parent piece's window), or the entered basket's label.",
      +                      "type": "string"
      +                    },
      +                    "customs_code": {
      +                      "description": "The sub-code (or residual spelling).",
      +                      "type": "string"
      +                    },
      +                    "in_eurostat_api": {
      +                      "anyOf": [
      +                        {
      +                          "type": "boolean"
      +                        },
      +                        {
      +                          "type": "null"
      +                        }
      +                      ],
      +                      "default": null,
      +                      "description": "For a residual row: whether Eurostat's API serves the spelling as a PRODUCT value (XX codes only)."
      +                    },
      +                    "label": {
      +                      "description": "The label of the row's (latest) definition, in the requested language when recorded.",
      +                      "type": "string"
      +                    },
      +                    "residual_kind": {
      +                      "anyOf": [
      +                        {
      +                          "enum": [
      +                            "xx",
      +                            "letter"
      +                          ],
      +                          "type": "string"
      +                        },
      +                        {
      +                          "type": "null"
      +                        }
      +                      ],
      +                      "default": null,
      +                      "description": "For a residual row: 'xx' or 'letter'. Residual rows explain the gap between the sub-codes and the parent, and are pinned outside the top-N ranking."
      +                    },
      +                    "residual_reason": {
      +                      "anyOf": [
      +                        {
      +                          "enum": [
      +                            "A",
      +                            "B",
      +                            "C",
      +                            "E",
      +                            "F",
      +                            "I",
      +                            "M",
      +                            "P",
      +                            "R",
      +                            "S",
      +                            "T",
      +                            "V",
      +                            "W",
      +                            "Y"
      +                          ],
      +                          "type": "string"
      +                        },
      +                        {
      +                          "type": "null"
      +                        }
      +                      ],
      +                      "default": null,
      +                      "description": "For a letter code or reason group: the reason letter (S, Y, E, I, …)."
      +                    },
      +                    "residual_spelling": {
      +                      "anyOf": [
      +                        {
      +                          "enum": [
      +                            "xx",
      +                            "letter",
      +                            "reason_group"
      +                          ],
      +                          "type": "string"
      +                        },
      +                        {
      +                          "type": "null"
      +                        }
      +                      ],
      +                      "default": null,
      +                      "description": "For a residual row: 'xx', 'letter' or 'reason_group'."
      +                    },
      +                    "segments": {
      +                      "description": "The definitions in force during the basket's window (empty for residual rows and for validation rows).",
      +                      "items": {
      +                        "additionalProperties": false,
      +                        "description": "One recorded definition of a customs code: a fact of the\nclassification metadata, with its window and its own label.",
      +                        "properties": {
      +                          "customs_code": {
      +                            "description": "The customs code the segment defines.",
      +                            "type": "string"
      +                          },
      +                          "kind": {
      +                            "description": "The classification row's kind ('cn', 'residual_xx', 'letter_coded').",
      +                            "enum": [
      +                              "cn",
      +                              "residual_xx",
      +                              "letter_coded",
      +                              "chapter_00",
      +                              "other"
      +                            ],
      +                            "type": "string"
      +                          },
      +                          "label": {
      +                            "description": "The segment's own label (the definition in force during its window), in the requested language when available.",
      +                            "type": "string"
      +                          },
      +                          "label_lang": {
      +                            "description": "The label's language (English when the requested one is not recorded for this definition).",
      +                            "enum": [
      +                              "bg",
      +                              "cs",
      +                              "da",
      +                              "de",
      +                              "el",
      +                              "en",
      +                              "es",
      +                              "et",
      +                              "fi",
      +                              "fr",
      +                              "ga",
      +                              "hr",
      +                              "hu",
      +                              "it",
      +                              "lt",
      +                              "lv",
      +                              "mt",
      +                              "nl",
      +                              "pl",
      +                              "pt",
      +                              "ro",
      +                              "sk",
      +                              "sl",
      +                              "sv"
      +                            ],
      +                            "type": "string"
      +                          },
      +                          "untranslated": {
      +                            "anyOf": [
      +                              {
      +                                "type": "boolean"
      +                              },
      +                              {
      +                                "type": "null"
      +                              }
      +                            ],
      +                            "default": null,
      +                            "description": "True when the label fell back to English."
      +                          },
      +                          "valid_from": {
      +                            "description": "First day of the segment's validity window, ISO date.",
      +                            "type": "string"
      +                          },
      +                          "valid_to": {
      +                            "anyOf": [
      +                              {
      +                                "type": "string"
      +                              },
      +                              {
      +                                "type": "null"
      +                              }
      +                            ],
      +                            "description": "Last day of the window, ISO date; null for a segment still in force."
      +                          }
      +                        },
      +                        "required": [
      +                          "customs_code",
      +                          "valid_from",
      +                          "valid_to",
      +                          "kind",
      +                          "label",
      +                          "label_lang"
      +                        ],
      +                        "type": "object"
      +                      },
      +                      "type": "array"
      +                    },
      +                    "untranslated": {
      +                      "anyOf": [
      +                        {
      +                          "type": "boolean"
      +                        },
      +                        {
      +                          "type": "null"
      +                        }
      +                      ],
      +                      "default": null,
      +                      "description": "True when the label fell back to English."
      +                    }
      +                  },
      +                  "required": [
      +                    "basket_key",
      +                    "customs_code",
      +                    "label",
      +                    "segments"
      +                  ],
      +                  "type": "object"
      +                },
      +                "type": "array"
      +              },
      +              "supp_unit": {
      +                "anyOf": [
      +                  {
      +                    "additionalProperties": false,
      +                    "description": "A quantity/supplementary unit label (``supp_unit`` / ``prodcom_unit`` /\n``quantity_unit`` in response headers).",
      +                    "properties": {
      +                      "label": {
      +                        "anyOf": [
      +                          {
      +                            "type": "string"
      +                          },
      +                          {
      +                            "type": "null"
      +                          }
      +                        ],
      +                        "default": null,
      +                        "description": "The unit's display label in the response's language."
      +                      },
      +                      "symbol": {
      +                        "anyOf": [
      +                          {
      +                            "type": "string"
      +                          },
      +                          {
      +                            "type": "null"
      +                          }
      +                        ],
      +                        "default": null,
      +                        "description": "The unit's display symbol (e.g. 't', 'l')."
      +                      },
      +                      "unit_code": {
      +                        "anyOf": [
      +                          {
      +                            "type": "string"
      +                          },
      +                          {
      +                            "type": "null"
      +                          }
      +                        ],
      +                        "default": null,
      +                        "description": "The unit's authority code (e.g. 'T', 'PST', '1000_KWH')."
      +                      }
      +                    },
      +                    "required": [
      +                      "unit_code",
      +                      "label",
      +                      "symbol"
      +                    ],
      +                    "type": "object"
      +                  },
      +                  {
      +                    "type": "null"
      +                  }
      +                ],
      +                "description": "The single supplementary unit the displayed series use, when one survives the coverage gate."
      +              }
      +            },
      +            "required": [
      +              "state",
      +              "subcodes",
      +              "supp_unit",
      +              "imports",
      +              "exports"
      +            ],
      +            "type": "object"
      +          }
      +        ]
      +      },
      +      "header": {
      +        "additionalProperties": false,
      +        "description": "The request's metadata: customs code, labels, units, residual share, selection and notes.",
      +        "properties": {
      +          "baskets": {
      +            "description": "How each requested basket was read: its label and its pieces, each with the definitions its window meets.",
      +            "items": {
      +              "additionalProperties": false,
      +              "description": "How one requested basket was read: its label and its pieces.",
      +              "properties": {
      +                "label": {
      +                  "description": "The basket's display label (the caller's label, or the pieces' codes joined).",
      +                  "type": "string"
      +                },
      +                "pieces": {
      +                  "description": "The basket's pieces, in request order.",
      +                  "items": {
      +                    "additionalProperties": false,
      +                    "description": "How one requested piece was read: the code, the window it was asked\nfor (a null bound = the request's), and the recorded definitions that\nwindow meets -- facts, no interpretation.",
      +                    "properties": {
      +                      "customs_code": {
      +                        "description": "The piece's customs code.",
      +                        "type": "string"
      +                      },
      +                      "definitions": {
      +                        "description": "The recorded definitions of the code whose window meets the piece's, oldest first: what the digits meant over the window.",
      +                        "items": {
      +                          "additionalProperties": false,
      +                          "description": "One recorded definition of a customs code: a fact of the\nclassification metadata, with its window and its own label.",
      +                          "properties": {
      +                            "customs_code": {
      +                              "description": "The customs code the segment defines.",
      +                              "type": "string"
      +                            },
      +                            "kind": {
      +                              "description": "The classification row's kind ('cn', 'residual_xx', 'letter_coded').",
      +                              "enum": [
      +                                "cn",
      +                                "residual_xx",
      +                                "letter_coded",
      +                                "chapter_00",
      +                                "other"
      +                              ],
      +                              "type": "string"
      +                            },
      +                            "label": {
      +                              "description": "The segment's own label (the definition in force during its window), in the requested language when available.",
      +                              "type": "string"
      +                            },
      +                            "label_lang": {
      +                              "description": "The label's language (English when the requested one is not recorded for this definition).",
      +                              "enum": [
      +                                "bg",
      +                                "cs",
      +                                "da",
      +                                "de",
      +                                "el",
      +                                "en",
      +                                "es",
      +                                "et",
      +                                "fi",
      +                                "fr",
      +                                "ga",
      +                                "hr",
      +                                "hu",
      +                                "it",
      +                                "lt",
      +                                "lv",
      +                                "mt",
      +                                "nl",
      +                                "pl",
      +                                "pt",
      +                                "ro",
      +                                "sk",
      +                                "sl",
      +                                "sv"
      +                              ],
      +                              "type": "string"
      +                            },
      +                            "untranslated": {
      +                              "anyOf": [
      +                                {
      +                                  "type": "boolean"
      +                                },
      +                                {
      +                                  "type": "null"
      +                                }
      +                              ],
      +                              "default": null,
      +                              "description": "True when the label fell back to English."
      +                            },
      +                            "valid_from": {
      +                              "description": "First day of the segment's validity window, ISO date.",
      +                              "type": "string"
      +                            },
      +                            "valid_to": {
      +                              "anyOf": [
      +                                {
      +                                  "type": "string"
      +                                },
      +                                {
      +                                  "type": "null"
      +                                }
      +                              ],
      +                              "description": "Last day of the window, ISO date; null for a segment still in force."
      +                            }
      +                          },
      +                          "required": [
      +                            "customs_code",
      +                            "valid_from",
      +                            "valid_to",
      +                            "kind",
      +                            "label",
      +                            "label_lang"
      +                          ],
      +                          "type": "object"
      +                        },
      +                        "type": "array"
      +                      },
      +                      "from_month": {
      +                        "anyOf": [
      +                          {
      +                            "description": "A calendar month, 'YYYY-MM'.",
      +                            "pattern": "\\d{4}-\\d{2}",
      +                            "type": "string"
      +                          },
      +                          {
      +                            "type": "null"
      +                          }
      +                        ],
      +                        "description": "The window's first month, ISO 'YYYY-MM'; null = the request's period_start."
      +                      },
      +                      "to_month": {
      +                        "anyOf": [
      +                          {
      +                            "description": "A calendar month, 'YYYY-MM'.",
      +                            "pattern": "\\d{4}-\\d{2}",
      +                            "type": "string"
      +                          },
      +                          {
      +                            "type": "null"
      +                          }
      +                        ],
      +                        "description": "The window's last month, ISO 'YYYY-MM'; null = the request's period_end."
      +                      }
      +                    },
      +                    "required": [
      +                      "customs_code",
      +                      "from_month",
      +                      "to_month",
      +                      "definitions"
      +                    ],
      +                    "type": "object"
      +                  },
      +                  "type": "array"
      +                }
      +              },
      +              "required": [
      +                "label",
      +                "pieces"
      +              ],
      +              "type": "object"
      +            },
      +            "type": "array"
      +          },
      +          "customs_code": {
      +            "description": "The queried customs code(s), as requested (several codes joined).",
      +            "type": "string"
      +          },
      +          "customs_code_label": {
      +            "description": "The customs code's display label.",
      +            "type": "string"
      +          },
      +          "data_provenance": {
      +            "additionalProperties": false,
      +            "description": "Which published data produced the figures: the same selector can return different numbers after a store or classification refresh.",
      +            "properties": {
      +              "metadata_generation": {
      +                "anyOf": [
      +                  {
      +                    "type": "integer"
      +                  },
      +                  {
      +                    "type": "null"
      +                  }
      +                ],
      +                "description": "The CN classification snapshot's generation; null when none is published."
      +              },
      +              "store_generation": {
      +                "description": "The trade store's completed-build generation.",
      +                "type": "string"
      +              }
      +            },
      +            "required": [
      +              "store_generation",
      +              "metadata_generation"
      +            ],
      +            "type": "object"
      +          },
      +          "frequency": {
      +            "description": "The period grain of every series in the payload ('year' for PRODCOM).",
      +            "enum": [
      +              "month",
      +              "quarter",
      +              "year"
      +            ],
      +            "type": "string"
      +          },
      +          "in_eurostat_api": {
      +            "description": "False only for letter codes and reason groups: Eurostat's API rejects them as PRODUCT values, though their trade is inside the API's parent totals. True for digit and XX codes.",
      +            "type": "boolean"
      +          },
      +          "levels": {
      +            "description": "The customs code's CN description hierarchy, chapter first.",
      +            "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"
      +          },
      +          "notes": {
      +            "description": "Structured notes on the selection and on the slice: whatever was combined, removed, nulled or cannot be served.",
      +            "items": {
      +              "additionalProperties": false,
      +              "description": "A structured coverage note: what the data shows or lacks for this\nslice (whatever was removed, nulled or cannot be served).",
      +              "properties": {
      +                "args": {
      +                  "additionalProperties": {
      +                    "type": "string"
      +                  },
      +                  "description": "The note's structured facts (codes, windows, counts, shares).",
      +                  "type": "object"
      +                },
      +                "basket_refs": {
      +                  "description": "Indexes of the requested baskets the note concerns; empty when it concerns the whole slice.",
      +                  "items": {
      +                    "type": "integer"
      +                  },
      +                  "type": "array"
      +                },
      +                "kind": {
      +                  "description": "Stable identifier of the note's kind, e.g. 'reporter_coverage', 'supp_coverage_gate', 'outliers_nulled'.",
      +                  "enum": [
      +                    "reporter_coverage",
      +                    "total_only_period",
      +                    "unmapped_country_code",
      +                    "no_residuals_stored",
      +                    "outliers_nulled",
      +                    "supp_unit_mixed",
      +                    "supp_coverage_gate",
      +                    "partial_bucket",
      +                    "component_empty",
      +                    "negative_values",
      +                    "cn8_residual_sibling",
      +                    "group_residual_above"
      +                  ],
      +                  "type": "string"
      +                },
      +                "message": {
      +                  "description": "Fixed English text of the kind; slice-specific facts are in args.",
      +                  "type": "string"
      +                },
      +                "severity": {
      +                  "description": "'warning' when the figures are affected, 'info' otherwise.",
      +                  "enum": [
      +                    "info",
      +                    "warning"
      +                  ],
      +                  "type": "string"
      +                }
      +              },
      +              "required": [
      +                "kind",
      +                "severity",
      +                "message",
      +                "basket_refs",
      +                "args"
      +              ],
      +              "type": "object"
      +            },
      +            "type": "array"
      +          },
      +          "partner_set_label": {
      +            "description": "The partner set's label.",
      +            "type": "string"
      +          },
      +          "quantity_unit": {
      +            "additionalProperties": false,
      +            "description": "The unit of every 'quantity' series: net mass in tonnes.",
      +            "properties": {
      +              "label": {
      +                "anyOf": [
      +                  {
      +                    "type": "string"
      +                  },
      +                  {
      +                    "type": "null"
      +                  }
      +                ],
      +                "default": null,
      +                "description": "The unit's display label in the response's language."
      +              },
      +              "symbol": {
      +                "anyOf": [
      +                  {
      +                    "type": "string"
      +                  },
      +                  {
      +                    "type": "null"
      +                  }
      +                ],
      +                "default": null,
      +                "description": "The unit's display symbol (e.g. 't', 'l')."
      +              },
      +              "unit_code": {
      +                "anyOf": [
      +                  {
      +                    "type": "string"
      +                  },
      +                  {
      +                    "type": "null"
      +                  }
      +                ],
      +                "default": null,
      +                "description": "The unit's authority code (e.g. 'T', 'PST', '1000_KWH')."
      +              }
      +            },
      +            "required": [
      +              "unit_code",
      +              "label",
      +              "symbol"
      +            ],
      +            "type": "object"
      +          },
      +          "reporter_label": {
      +            "anyOf": [
      +              {
      +                "type": "string"
      +              },
      +              {
      +                "type": "null"
      +              }
      +            ],
      +            "description": "The reporter's display label; null for views spanning every reporter."
      +          },
      +          "residual_share": {
      +            "anyOf": [
      +              {
      +                "additionalProperties": false,
      +                "description": "The residual share of a slice (``Presenter.residual_share``):\n``by_level`` splits it across the level a residual sits directly under\n(``chapter``/``heading``/``subheading``), ``by_kind`` across its kind\n(``xx``/``letter`` -- the latter makes the 2002 letter→XX re-keying\nvisible in long series). One entry per present level/kind only.",
      +                "properties": {
      +                  "by_kind": {
      +                    "additionalProperties": {
      +                      "additionalProperties": false,
      +                      "description": "One residual-share figure: the part of a total's value (0-1) sitting\nin residual customs codes, plus the mass share when honestly\nmeasurable. Wire counterpart of ``core.computation.comext.residuals.ResidualShareSlice``.",
      +                      "properties": {
      +                        "quantity_share": {
      +                          "anyOf": [
      +                            {
      +                              "type": "number"
      +                            },
      +                            {
      +                              "type": "null"
      +                            }
      +                          ],
      +                          "default": null,
      +                          "description": "Share of the slice's total net mass (0-1) declared in residual customs codes. Null when net-mass coverage fails the all-or-nothing gate (see quantity_share_note) -- never a partial ratio."
      +                        },
      +                        "quantity_share_note": {
      +                          "anyOf": [
      +                            {
      +                              "type": "string"
      +                            },
      +                            {
      +                              "type": "null"
      +                            }
      +                          ],
      +                          "default": null,
      +                          "description": "Why quantity_share is null, when it is."
      +                        },
      +                        "value_share": {
      +                          "description": "Share of the slice's total value (0-1) declared in residual customs codes.",
      +                          "type": "number"
      +                        }
      +                      },
      +                      "required": [
      +                        "value_share",
      +                        "quantity_share",
      +                        "quantity_share_note"
      +                      ],
      +                      "type": "object"
      +                    },
      +                    "description": "The share split by residual kind (xx/letter) -- makes the 2002 letter→XX re-keying visible in long series.",
      +                    "propertyNames": {
      +                      "enum": [
      +                        "xx",
      +                        "letter"
      +                      ],
      +                      "type": "string"
      +                    },
      +                    "type": "object"
      +                  },
      +                  "by_level": {
      +                    "additionalProperties": {
      +                      "additionalProperties": false,
      +                      "description": "One residual-share figure: the part of a total's value (0-1) sitting\nin residual customs codes, plus the mass share when honestly\nmeasurable. Wire counterpart of ``core.computation.comext.residuals.ResidualShareSlice``.",
      +                      "properties": {
      +                        "quantity_share": {
      +                          "anyOf": [
      +                            {
      +                              "type": "number"
      +                            },
      +                            {
      +                              "type": "null"
      +                            }
      +                          ],
      +                          "default": null,
      +                          "description": "Share of the slice's total net mass (0-1) declared in residual customs codes. Null when net-mass coverage fails the all-or-nothing gate (see quantity_share_note) -- never a partial ratio."
      +                        },
      +                        "quantity_share_note": {
      +                          "anyOf": [
      +                            {
      +                              "type": "string"
      +                            },
      +                            {
      +                              "type": "null"
      +                            }
      +                          ],
      +                          "default": null,
      +                          "description": "Why quantity_share is null, when it is."
      +                        },
      +                        "value_share": {
      +                          "description": "Share of the slice's total value (0-1) declared in residual customs codes.",
      +                          "type": "number"
      +                        }
      +                      },
      +                      "required": [
      +                        "value_share",
      +                        "quantity_share",
      +                        "quantity_share_note"
      +                      ],
      +                      "type": "object"
      +                    },
      +                    "description": "The share split by the level the residual sits directly under (chapter/heading/subheading).",
      +                    "propertyNames": {
      +                      "enum": [
      +                        "chapter",
      +                        "heading",
      +                        "subheading",
      +                        "cn8",
      +                        "total"
      +                      ],
      +                      "type": "string"
      +                    },
      +                    "type": "object"
      +                  },
      +                  "quantity_share": {
      +                    "anyOf": [
      +                      {
      +                        "type": "number"
      +                      },
      +                      {
      +                        "type": "null"
      +                      }
      +                    ],
      +                    "default": null,
      +                    "description": "Share of the slice's total net mass (0-1) declared in residual customs codes. Null when net-mass coverage fails the all-or-nothing gate (see quantity_share_note) -- never a partial ratio."
      +                  },
      +                  "quantity_share_note": {
      +                    "anyOf": [
      +                      {
      +                        "type": "string"
      +                      },
      +                      {
      +                        "type": "null"
      +                      }
      +                    ],
      +                    "default": null,
      +                    "description": "Why quantity_share is null, when it is."
      +                  },
      +                  "value_share": {
      +                    "description": "Share of the slice's total value (0-1) declared in residual customs codes.",
      +                    "type": "number"
      +                  }
      +                },
      +                "required": [
      +                  "value_share",
      +                  "quantity_share",
      +                  "quantity_share_note",
      +                  "by_level",
      +                  "by_kind"
      +                ],
      +                "type": "object"
      +              },
      +              {
      +                "type": "null"
      +              }
      +            ],
      +            "description": "The part of the slice's total that sits in residual customs codes -- present for single 2/4/6-digit requests only; None for CN8, residual spellings, TOTAL and multi-code requests, and whenever the slice holds no total value."
      +          },
      +          "residual_share_note": {
      +            "anyOf": [
      +              {
      +                "additionalProperties": false,
      +                "description": "Why ``residual_share`` is null -- so a missing share never reads as\n\"no residual trade\" (a measured zero is a share of 0.0, never null).",
      +                "properties": {
      +                  "message": {
      +                    "description": "The reason in English, naming the code where relevant.",
      +                    "type": "string"
      +                  },
      +                  "reason": {
      +                    "description": "Stable identifier of the reason.",
      +                    "enum": [
      +                      "switched_off",
      +                      "multi_code",
      +                      "mixed_codes",
      +                      "pieced_basket",
      +                      "residual_spelling",
      +                      "total",
      +                      "cn8_leaf",
      +                      "no_partners",
      +                      "no_store_data",
      +                      "no_total_trade"
      +                    ],
      +                    "type": "string"
      +                  }
      +                },
      +                "required": [
      +                  "reason",
      +                  "message"
      +                ],
      +                "type": "object"
      +              },
      +              {
      +                "type": "null"
      +              }
      +            ],
      +            "description": "Why residual_share is null, when it is -- so a missing share never reads as 'no residual trade'. Null whenever residual_share is present."
      +          }
      +        },
      +        "required": [
      +          "customs_code",
      +          "levels",
      +          "customs_code_label",
      +          "frequency",
      +          "reporter_label",
      +          "partner_set_label",
      +          "quantity_unit",
      +          "residual_share",
      +          "residual_share_note",
      +          "in_eurostat_api",
      +          "baskets",
      +          "notes",
      +          "data_provenance"
      +        ],
      +        "type": "object"
      +      }
      +    },
      +    "required": [
      +      "header",
      +      "breakdown"
      +    ],
      +    "type": "object"
      +  },
      +  {
      +    "additionalProperties": {},
      +    "type": "object"
      +  }
      +]
  2. Added

TDQS

A3.9/5.0
Behavior4/5

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

Annotations already declare readOnly/idempotent/non-destructive, so the safety profile is covered. The description goes further by disclosing the discriminated `breakdown` block and its three states ('ok', 'leaf', 'unavailable' each with a `message`), which tells the agent how edge cases surface instead of a silent empty result. It stops short of describing auth, rate limits, or the shape of the per-subcode series.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Two sentences, front-loaded with the purpose before the return-shape detail, with no filler. The parenthetical '(or, for a multi-code request, compares the entered codes directly)' interrupts the main clause slightly but carries real disambiguation value, so it earns its place.

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

Completeness4/5

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

An output schema exists, so return values need not be spelled out, yet the description still clarifies the discriminating `state` field, which is the piece an agent most needs to branch on. For a tool with a heavily nested request body whose parameters are fully documented in-schema, this is nearly complete; only alternative-tool routing is absent.

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

Parameters3/5

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

Schema description coverage is 100% and the nested `query` fields (customs_code, baskets, reporter, period) are thoroughly documented in-schema, so the baseline of 3 applies. The description's mention of 'single parent customs code' vs 'multi-code request' restates semantics the `customs_code` field already carries ('Pass a list to compare codes side by side') and adds no new parameter meaning.

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

Purpose5/5

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

States a specific verb and resource ('Sub-code comparison') plus the exact scope: a single parent code is expanded into sub-codes, while a multi-code request compares the entered codes directly. The final clause ('so each sub-code plots as its own line instead of being aggregated away') separates it from aggregation-oriented siblings such as get_subtree or get_top_entities without needing the schema.

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?

The description implies when the tool fits (per-subcode line charts rather than folded totals) and distinguishes the two input modes, but it never names an alternative tool or states when NOT to use it. An agent must infer routing from the charting rationale rather than from an explicit 'use X instead' rule.

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