Skip to main content
Glama

Anos disponíveis e frescor dos cubos

get_available_years
Read-onlyIdempotent

Determine which SIH-SUS years are available and verify data cube freshness versus healthbr-data, with stale partition and era-specific metadata per year.

Instructions

Retorna os anos disponíveis nos dados do SIH-SUS carregados e o frescor dos cubos em relação ao espelho healthbr-data (freshness.status: current, stale, unknown, pending ou disabled; quando stale, lista por ano as partições reeditadas pelo MS, regeneradas, retiradas ou novas na janela). Por ano, o que muda entre as eras do SIH: race_available (raça/cor só de 2008), cid_revision (9 = CID-9 de 6 dígitos em 1992–1997, 10 = CID-10; 1997 tem as duas), icsap_list_revision (cid9-derivada, não oficial, em 1992–1997), uf_basis (arquivo em 1992–1997, residencia de 1998), municipality_available, currency e records_date_imputed.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
noteNoAviso sobre o que `years` significa
errorNoFalha ao listar os anos
yearsNoAnos com cubos Parquet presentes localmente
currencyNoMoeda de `value` — chave é o ano (string)
uf_basisNoBase do eixo `uf` — chave é o ano (string)
freshnessNoFrescor dos cubos locais frente ao espelho healthbr-data
data_rangeNoIntervalo dos anos locais
provenanceYesBloco de proveniência do portfólio: fonte, URL, competência, extração, diagnóstico de origem, citação e licença; e, só quando há o que dizer, avisos, o que o servidor calculou e se o número ainda pode mudar
years_cid9NoAnos em que o cubo usa CID-9 (1992–1997)
attributionYesURLs canônicas das fontes desta resposta (lista de atribuição)
cid_revisionNoInternações por revisão da CID — chave é o ano (string)
csap_universeNoUniverso do % ICSAP — chave é o ano (string)
cubes_channelNoCanal público dos cubos e cache local
race_availableNoRaça/cor disponível — chave é o ano (string)
icsap_availableNoICSAP disponível — chave é o ano (string)
population_yearsNoCobertura dos arquivos de população por UF: o que as ferramentas de taxa aceitam
years_uf_arquivoNoAnos em que `uf` é a do estabelecimento (1992–1997)
years_without_raceNoAnos sem raça/cor (1998–2007)
icsap_list_revisionNoLista ICSAP por revisão da CID — chave é o ano (string)
records_date_imputedNoDatas imputadas — chave é o ano (string)
municipality_availableNoMunicípio disponível — chave é o ano (string)

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed6 schema fields changedv1.7.0
    • changedOutput schema / properties / provenance / description
      Previous value: -"Bloco de proveniência (contrato v1.1): fonte, URL, competência, extração, diagnóstico de origem, citação e licença"New value: +"Bloco de proveniência do portfólio: fonte, URL, competência, extração, diagnóstico de origem, citação e licença; e, só quando há o que dizer, avisos, o que o servidor calculou e se o número ainda pode mudar"
    • addedOutput schema / properties / provenance / properties / derivation_note
      Added value: +{
      +  "description": "Como o número foi calculado; presente junto com derived",
      +  "type": "string"
      +}
    • addedOutput schema / properties / provenance / properties / derived
      Added value: +{
      +  "description": "Presente (true) quando o número foi calculado por este servidor — os cubos SIH são somas das internações dos arquivos do DATASUS",
      +  "type": "boolean"
      +}
    • addedOutput schema / properties / provenance / properties / notices
      Added value: +{
      +  "description": "Avisos que acompanham o dado (ex.: cubo atrás do espelho healthbr-data, frescor não verificado). Ausente quando não há aviso",
      +  "items": {
      +    "type": "string"
      +  },
      +  "minItems": 1,
      +  "type": "array"
      +}
    • changedOutput schema / properties / provenance / properties / retrieval / description
      Previous value: -"Diagnóstico de origem desta chamada (contrato v1.1): idas ao canal sih/cubos/ do healthbr-data (manifesto e arquivos que faltavam no disco), tentativas somadas e anomalias contornadas; unstable=true quando houve anomalia. null = a resposta veio do DISCO (cache aquecido) ou o bloco não é do canal (listas de referência)"New value: +"Diagnóstico de origem desta chamada: idas ao canal sih/cubos/ do healthbr-data (manifesto e arquivos que faltavam no disco), tentativas somadas e anomalias contornadas; unstable=true quando houve anomalia. null = a resposta veio do DISCO (cache aquecido) ou o bloco não é do canal (listas de referência)"
    • addedOutput schema / properties / provenance / properties / revision
      Added value: +{
      +  "additionalProperties": false,
      +  "description": "Se o número ainda pode mudar: provisional quando algum ano da resposta ainda tem competências abertas no SIH (o total ainda pode crescer); current nos demais — o DATASUS reedita arquivos de competências passadas",
      +  "properties": {
      +    "note": {
      +      "description": "O específico da fonte: o que revisa, quando, por quê",
      +      "type": [
      +        "string",
      +        "null"
      +      ]
      +    },
      +    "status": {
      +      "description": "current = versão vigente, a fonte pode revisá-la; provisional = preliminar, incompleta ou sujeita a mudança (não compare como se fosse fechada); final = não muda mais, declarado pela fonte",
      +      "enum": [
      +        "current",
      +        "provisional",
      +        "final"
      +      ],
      +      "type": "string"
      +    }
      +  },
      +  "required": [
      +    "status",
      +    "note"
      +  ],
      +  "type": "object"
      +}
  2. Changed2 schema fields changedv1.4.1
    • addedOutput schema / properties / provenance / properties / field_sources
      Added value: +{
      +  "description": "Presente só quando a resposta junta partes de origens ou momentos distintos: para cada grupo de campos, a URL, a extração e se veio do cache. Ausente nas respostas de uma origem só",
      +  "items": {
      +    "additionalProperties": false,
      +    "description": "Proveniência de um grupo de campos da resposta: de onde veio e quando foi extraído",
      +    "properties": {
      +      "data_vintage": {
      +        "description": "Vintage/competência da sub-fonte",
      +        "type": [
      +          "string",
      +          "null"
      +        ]
      +      },
      +      "dataset_id": {
      +        "description": "Identificador do conjunto da sub-fonte",
      +        "type": [
      +          "string",
      +          "null"
      +        ]
      +      },
      +      "fields": {
      +        "description": "Campos do payload atribuídos a esta sub-fonte",
      +        "items": {
      +          "type": "string"
      +        },
      +        "minItems": 1,
      +        "type": "array"
      +      },
      +      "retrieved_at": {
      +        "description": "ISO-8601 da extração desta sub-fonte na origem",
      +        "type": [
      +          "string",
      +          "null"
      +        ]
      +      },
      +      "served_from_cache": {
      +        "description": "true se esta sub-fonte veio do cache do servidor (retrieved_at é o da extração original); false se foi buscada nesta chamada; null se o servidor não distingue",
      +        "type": [
      +          "boolean",
      +          "null"
      +        ]
      +      },
      +      "source_url": {
      +        "description": "URL canônica da sub-fonte que originou estes campos",
      +        "type": "string"
      +      }
      +    },
      +    "required": [
      +      "fields",
      +      "source_url",
      +      "dataset_id",
      +      "data_vintage",
      +      "retrieved_at"
      +    ],
      +    "type": "object"
      +  },
      +  "minItems": 1,
      +  "type": "array"
      +}
    • changedOutput schema / properties / provenance / properties / retrieved_at / description
      Previous value: -"Instante REAL da extração na origem (ISO-8601) — para os cubos SIH, a safra do sidecar (extração no FTP do DATASUS), nunca o instante do download"New value: +"Instante REAL da extração na origem (ISO-8601) — para os cubos SIH, o download MAIS ANTIGO, do FTP do DATASUS, entre os .dbc que alimentaram a resposta (cópia idêntica ao original naquela data, MD5 registrado no sidecar), nunca o instante da chamada"
  3. Changed4 schema fields changedv1.2.3
    • changedOutput schema / properties / provenance / description
      Previous value: -"Bloco de proveniência (contrato v1.0): fonte, URL, competência, extração e licença"New value: +"Bloco de proveniência (contrato v1.1): fonte, URL, competência, extração, diagnóstico de origem, citação e licença"
    • addedOutput schema / properties / provenance / properties / retrieval
      Added value: +{
      +  "description": "Diagnóstico de origem desta chamada (contrato v1.1): idas ao canal sih/cubos/ do healthbr-data (manifesto e arquivos que faltavam no disco), tentativas somadas e anomalias contornadas; unstable=true quando houve anomalia. null = a resposta veio do DISCO (cache aquecido) ou o bloco não é do canal (listas de referência)",
      +  "oneOf": [
      +    {
      +      "additionalProperties": false,
      +      "description": "Diagnóstico de origem da chamada: como o dado foi obtido. Medição real do servidor; unstable=true pede ao agente que trate o dado como obtido com dificuldade",
      +      "properties": {
      +        "anomalies": {
      +          "description": "Anomalias superadas até o sucesso, somadas por classe, em ordem fixa; [] se nenhuma",
      +          "items": {
      +            "additionalProperties": false,
      +            "properties": {
      +              "count": {
      +                "description": "Ocorrências desta classe na chamada",
      +                "minimum": 1,
      +                "type": "integer"
      +              },
      +              "kind": {
      +                "description": "Classe da anomalia (vocabulário fechado do contrato)",
      +                "enum": [
      +                  "timeout",
      +                  "network",
      +                  "http_4xx",
      +                  "http_5xx",
      +                  "rate_limited",
      +                  "malformed_body"
      +                ],
      +                "type": "string"
      +              }
      +            },
      +            "required": [
      +              "kind",
      +              "count"
      +            ],
      +            "type": "object"
      +          },
      +          "type": "array"
      +        },
      +        "attempts": {
      +          "description": "Tentativas somadas, incluindo as repetidas (>= requests)",
      +          "minimum": 1,
      +          "type": "integer"
      +        },
      +        "requests": {
      +          "description": "Idas distintas à origem que compõem esta resposta (fatias, páginas)",
      +          "minimum": 1,
      +          "type": "integer"
      +        },
      +        "unstable": {
      +          "description": "true se houve repetição (attempts > requests) ou alguma anomalia",
      +          "type": "boolean"
      +        }
      +      },
      +      "required": [
      +        "requests",
      +        "attempts",
      +        "anomalies",
      +        "unstable"
      +      ],
      +      "type": "object"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ]
      +}
    • changedOutput schema / properties / provenance / properties / retrieved_at / description
      Previous value: -"Instante REAL da extração na origem (ISO-8601)"New value: +"Instante REAL da extração na origem (ISO-8601) — para os cubos SIH, a safra do sidecar (extração no FTP do DATASUS), nunca o instante do download"
    • changedOutput schema / properties / provenance / required
      Previous value: -[
      -  "source",
      -  "source_url",
      -  "data_vintage",
      -  "retrieved_at",
      -  "citation",
      -  "license"
      -]New value: +[
      +  "source",
      +  "source_url",
      +  "data_vintage",
      +  "retrieved_at",
      +  "retrieval",
      +  "citation",
      +  "license"
      +]
  4. Changed1 schema field changedv0.17.0
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "additionalProperties": false,
      +  "anyOf": [
      +    {
      +      "required": [
      +        "years",
      +        "data_range",
      +        "note",
      +        "race_available",
      +        "years_without_race",
      +        "cid_revision",
      +        "years_cid9",
      +        "icsap_available",
      +        "icsap_list_revision",
      +        "uf_basis",
      +        "years_uf_arquivo",
      +        "municipality_available",
      +        "currency",
      +        "records_date_imputed",
      +        "csap_universe",
      +        "population_years",
      +        "cubes_channel",
      +        "freshness"
      +      ]
      +    },
      +    {
      +      "required": [
      +        "error",
      +        "years"
      +      ]
      +    }
      +  ],
      +  "description": "Anos com cubo local, o que cada ano carrega (revisão da CID, raça/cor, município, moeda, universo ICSAP), cobertura da população, canal de cubos e frescor",
      +  "properties": {
      +    "attribution": {
      +      "description": "URLs canônicas das fontes desta resposta (lista de atribuição)",
      +      "items": {
      +        "type": "string"
      +      },
      +      "type": "array"
      +    },
      +    "cid_revision": {
      +      "additionalProperties": {
      +        "additionalProperties": {
      +          "description": "Internações naquela revisão; null quando o sidecar não traz o total",
      +          "type": [
      +            "number",
      +            "null"
      +          ]
      +        },
      +        "description": "Revisão da CID (\"9\" ou \"10\") → internações",
      +        "type": "object"
      +      },
      +      "description": "Internações por revisão da CID — chave é o ano (string)",
      +      "type": "object"
      +    },
      +    "csap_universe": {
      +      "additionalProperties": {
      +        "additionalProperties": false,
      +        "description": "Universo do % ICSAP como o csapAIH; null em cubo anterior ao builder 2.6.0",
      +        "properties": {
      +          "excluded": {
      +            "additionalProperties": {
      +              "description": "Internações fora do universo por este motivo",
      +              "type": "number"
      +            },
      +            "description": "Motivo de exclusão → internações",
      +            "type": "object"
      +          },
      +          "method": {
      +            "description": "Método (csapAIH)",
      +            "type": "string"
      +          },
      +          "records_in_universe": {
      +            "description": "Internações dentro do universo",
      +            "type": [
      +              "number",
      +              "null"
      +            ]
      +          }
      +        },
      +        "required": [
      +          "method",
      +          "records_in_universe",
      +          "excluded"
      +        ],
      +        "type": [
      +          "object",
      +          "null"
      +        ]
      +      },
      +      "description": "Universo do % ICSAP — chave é o ano (string)",
      +      "type": "object"
      +    },
      +    "cubes_channel": {
      +      "additionalProperties": false,
      +      "description": "Canal público dos cubos e cache local",
      +      "properties": {
      +        "base_url": {
      +          "description": "URL do canal público de cubos",
      +          "type": "string"
      +        },
      +        "cache_dir": {
      +          "description": "Pasta do cache local; null quando desligado",
      +          "type": [
      +            "string",
      +            "null"
      +          ]
      +        },
      +        "enabled": {
      +          "description": "false quando o cache de cubos está desligado",
      +          "type": "boolean"
      +        },
      +        "manifest_generated_at": {
      +          "description": "Quando o manifesto foi gerado; null sem manifesto",
      +          "type": [
      +            "string",
      +            "null"
      +          ]
      +        },
      +        "manifest_source": {
      +          "description": "De onde veio o manifesto",
      +          "enum": [
      +            "remote",
      +            "disk",
      +            "none",
      +            "disabled"
      +          ]
      +        },
      +        "note": {
      +          "description": "Como o cache baixa os anos pedidos",
      +          "type": "string"
      +        },
      +        "published_years": {
      +          "description": "Anos publicados no manifesto do canal",
      +          "items": {
      +            "type": "number"
      +          },
      +          "type": "array"
      +        }
      +      },
      +      "required": [
      +        "enabled",
      +        "base_url",
      +        "published_years",
      +        "cache_dir",
      +        "manifest_source"
      +      ],
      +      "type": "object"
      +    },
      +    "currency": {
      +      "additionalProperties": {
      +        "description": "Moeda de `value` por competência; null quando o sidecar não informa",
      +        "items": {
      +          "additionalProperties": false,
      +          "properties": {
      +            "code": {
      +              "description": "Código ISO 4217 (BRE, BRR, BRL)",
      +              "type": "string"
      +            },
      +            "from": {
      +              "description": "Primeira competência (AAAA-MM)",
      +              "type": "string"
      +            },
      +            "name": {
      +              "description": "Nome da moeda",
      +              "type": "string"
      +            },
      +            "symbol": {
      +              "description": "Símbolo (Cr$, CR$, R$)",
      +              "type": "string"
      +            },
      +            "to": {
      +              "description": "Última competência (AAAA-MM)",
      +              "type": "string"
      +            }
      +          },
      +          "required": [
      +            "from",
      +            "to",
      +            "code",
      +            "symbol",
      +            "name"
      +          ],
      +          "type": "object"
      +        },
      +        "type": [
      +          "array",
      +          "null"
      +        ]
      +      },
      +      "description": "Moeda de `value` — chave é o ano (string)",
      +      "type": "object"
      +    },
      +    "data_range": {
      +      "additionalProperties": false,
      +      "description": "Intervalo dos anos locais",
      +      "properties": {
      +        "first_year": {
      +          "description": "Primeiro ano local; ausente quando não há cubo",
      +          "type": "number"
      +        },
      +        "last_year": {
      +          "description": "Último ano local; ausente quando não há cubo",
      +          "type": "number"
      +        },
      +        "total_years": {
      +          "description": "Quantos anos",
      +          "type": "number"
      +        }
      +      },
      +      "required": [
      +        "total_years"
      +      ],
      +      "type": "object"
      +    },
      +    "error": {
      +      "description": "Falha ao listar os anos",
      +      "type": "string"
      +    },
      +    "freshness": {
      +      "additionalProperties": false,
      +      "description": "Frescor dos cubos locais frente ao espelho healthbr-data",
      +      "properties": {
      +        "checked_at": {
      +          "description": "Instante (UTC) da última checagem; null se nunca terminou",
      +          "type": [
      +            "string",
      +            "null"
      +          ]
      +        },
      +        "cubes": {
      +          "description": "Cubos atrasados frente ao espelho",
      +          "items": {
      +            "additionalProperties": false,
      +            "properties": {
      +              "behind": {
      +                "description": "true quando alguma lista acima tem item",
      +                "type": "boolean"
      +              },
      +              "cube_year": {
      +                "description": "Ano do cubo",
      +                "type": "number"
      +              },
      +              "new_in_window": {
      +                "description": "Competências publicadas depois do build",
      +                "items": {
      +                  "type": "string"
      +                },
      +                "type": "array"
      +              },
      +              "reedited": {
      +                "description": "Partições cujo .dbc de origem mudou (reedição do MS)",
      +                "items": {
      +                  "type": "string"
      +                },
      +                "type": "array"
      +              },
      +              "removed": {
      +                "description": "Partições que saíram do manifesto",
      +                "items": {
      +                  "type": "string"
      +                },
      +                "type": "array"
      +              },
      +              "reprocessed": {
      +                "description": "Partições regeneradas pelo espelho",
      +                "items": {
      +                  "type": "string"
      +                },
      +                "type": "array"
      +              }
      +            },
      +            "required": [
      +              "cube_year",
      +              "reedited",
      +              "reprocessed",
      +              "removed",
      +              "new_in_window",
      +              "behind"
      +            ],
      +            "type": "object"
      +          },
      +          "type": "array"
      +        },
      +        "error": {
      +          "description": "Erro da checagem; null quando não houve",
      +          "type": [
      +            "string",
      +            "null"
      +          ]
      +        },
      +        "manifest_last_updated_local": {
      +          "description": "Manifesto com que os cubos foram gerados",
      +          "type": [
      +            "string",
      +            "null"
      +          ]
      +        },
      +        "manifest_last_updated_remote": {
      +          "description": "Manifesto público lido agora",
      +          "type": [
      +            "string",
      +            "null"
      +          ]
      +        },
      +        "manifest_url": {
      +          "description": "URL do manifesto do espelho",
      +          "type": [
      +            "string",
      +            "null"
      +          ]
      +        },
      +        "method": {
      +          "description": "Como checou: sonda parcial ou manifesto inteiro",
      +          "enum": [
      +            "range",
      +            "full",
      +            null
      +          ]
      +        },
      +        "status": {
      +          "description": "Frescor dos cubos frente ao espelho",
      +          "enum": [
      +            "disabled",
      +            "pending",
      +            "current",
      +            "stale",
      +            "unknown"
      +          ]
      +        }
      +      },
      +      "required": [
      +        "status",
      +        "checked_at",
      +        "method",
      +        "manifest_url",
      +        "manifest_last_updated_local",
      +        "manifest_last_updated_remote",
      +        "cubes",
      +        "error"
      +      ],
      +      "type": "object"
      +    },
      +    "icsap_available": {
      +      "additionalProperties": {
      +        "description": "true quando o cubo tem a marcação ICSAP",
      +        "type": "boolean"
      +      },
      +      "description": "ICSAP disponível — chave é o ano (string)",
      +      "type": "object"
      +    },
      +    "icsap_list_revision": {
      +      "additionalProperties": {
      +        "additionalProperties": {
      +          "description": "Lista usada (portaria-221-2008 ou cid9-derivada)",
      +          "type": "string"
      +        },
      +        "description": "Revisão → lista",
      +        "type": "object"
      +      },
      +      "description": "Lista ICSAP por revisão da CID — chave é o ano (string)",
      +      "type": "object"
      +    },
      +    "municipality_available": {
      +      "additionalProperties": {
      +        "description": "false quando `municipality_code` é nulo em todas as linhas",
      +        "type": "boolean"
      +      },
      +      "description": "Município disponível — chave é o ano (string)",
      +      "type": "object"
      +    },
      +    "note": {
      +      "description": "Aviso sobre o que `years` significa",
      +      "type": "string"
      +    },
      +    "population_years": {
      +      "additionalProperties": false,
      +      "description": "Cobertura dos arquivos de população por UF: o que as ferramentas de taxa aceitam",
      +      "properties": {
      +        "aggregated": {
      +          "additionalProperties": false,
      +          "description": "pop_uf_agregado.parquet — faixa etária quinquenal por UF e sexo (1991–1999)",
      +          "properties": {
      +            "age": {
      +              "description": "Grão etário do arquivo",
      +              "type": "string"
      +            },
      +            "age_groups": {
      +              "description": "Faixas etárias quinquenais (só no arquivo agregado)",
      +              "items": {
      +                "type": "string"
      +              },
      +              "type": "array"
      +            },
      +            "first_year": {
      +              "description": "Primeiro ano coberto",
      +              "type": "number"
      +            },
      +            "last_year": {
      +              "description": "Último ano coberto",
      +              "type": "number"
      +            },
      +            "source": {
      +              "description": "Arquivo parquet que serve o intervalo",
      +              "type": "string"
      +            }
      +          },
      +          "required": [
      +            "first_year",
      +            "last_year",
      +            "source",
      +            "age"
      +          ],
      +          "type": [
      +            "object",
      +            "null"
      +          ]
      +        },
      +        "detailed": {
      +          "additionalProperties": false,
      +          "description": "pop_uf.parquet — idade simples por UF e sexo (projeções IBGE, 2000+)",
      +          "properties": {
      +            "age": {
      +              "description": "Grão etário do arquivo",
      +              "type": "string"
      +            },
      +            "age_groups": {
      +              "description": "Faixas etárias quinquenais (só no arquivo agregado)",
      +              "items": {
      +                "type": "string"
      +              },
      +              "type": "array"
      +            },
      +            "first_year": {
      +              "description": "Primeiro ano coberto",
      +              "type": "number"
      +            },
      +            "last_year": {
      +              "description": "Último ano coberto",
      +              "type": "number"
      +            },
      +            "source": {
      +              "description": "Arquivo parquet que serve o intervalo",
      +              "type": "string"
      +            }
      +          },
      +          "required": [
      +            "first_year",
      +            "last_year",
      +            "source",
      +            "age"
      +          ],
      +          "type": [
      +            "object",
      +            "null"
      +          ]
      +        },
      +        "first_year": {
      +          "description": "Primeiro ano com população por UF (união dos dois arquivos)",
      +          "type": "number"
      +        },
      +        "last_year": {
      +          "description": "Último ano com população por UF",
      +          "type": "number"
      +        }
      +      },
      +      "required": [
      +        "first_year",
      +        "last_year",
      +        "detailed",
      +        "aggregated"
      +      ],
      +      "type": [
      +        "object",
      +        "null"
      +      ]
      +    },
      +    "provenance": {
      +      "additionalProperties": false,
      +      "description": "Bloco de proveniência (contrato v1.0): fonte, URL, competência, extração e licença",
      +      "properties": {
      +        "citation": {
      +          "description": "Citação pronta para uso",
      +          "type": "string"
      +        },
      +        "data_vintage": {
      +          "description": "Competência ou safra do dado segundo a fonte; null quando a fonte não expõe",
      +          "type": [
      +            "string",
      +            "null"
      +          ]
      +        },
      +        "license": {
      +          "description": "Regime legal do dado (id SPDX quando há)",
      +          "type": [
      +            "string",
      +            "null"
      +          ]
      +        },
      +        "retrieved_at": {
      +          "description": "Instante REAL da extração na origem (ISO-8601)",
      +          "type": "string"
      +        },
      +        "source": {
      +          "description": "Fonte oficial do dado",
      +          "type": "string"
      +        },
      +        "source_url": {
      +          "description": "URL canônica que reproduz a consulta ou localiza a fonte",
      +          "type": "string"
      +        }
      +      },
      +      "required": [
      +        "source",
      +        "source_url",
      +        "data_vintage",
      +        "retrieved_at",
      +        "citation",
      +        "license"
      +      ],
      +      "type": "object"
      +    },
      +    "race_available": {
      +      "additionalProperties": {
      +        "description": "true quando o cubo tem raça/cor",
      +        "type": "boolean"
      +      },
      +      "description": "Raça/cor disponível — chave é o ano (string)",
      +      "type": "object"
      +    },
      +    "records_date_imputed": {
      +      "additionalProperties": {
      +        "description": "Internações que entraram com data imputada",
      +        "type": "number"
      +      },
      +      "description": "Datas imputadas — chave é o ano (string)",
      +      "type": "object"
      +    },
      +    "uf_basis": {
      +      "additionalProperties": {
      +        "description": "Base do eixo `uf`",
      +        "enum": [
      +          "residencia",
      +          "arquivo"
      +        ]
      +      },
      +      "description": "Base do eixo `uf` — chave é o ano (string)",
      +      "type": "object"
      +    },
      +    "years": {
      +      "description": "Anos com cubos Parquet presentes localmente",
      +      "items": {
      +        "type": "number"
      +      },
      +      "type": "array"
      +    },
      +    "years_cid9": {
      +      "description": "Anos em que o cubo usa CID-9 (1992–1997)",
      +      "items": {
      +        "type": "number"
      +      },
      +      "type": "array"
      +    },
      +    "years_uf_arquivo": {
      +      "description": "Anos em que `uf` é a do estabelecimento (1992–1997)",
      +      "items": {
      +        "type": "number"
      +      },
      +      "type": "array"
      +    },
      +    "years_without_race": {
      +      "description": "Anos sem raça/cor (1998–2007)",
      +      "items": {
      +        "type": "number"
      +      },
      +      "type": "array"
      +    }
      +  },
      +  "required": [
      +    "provenance",
      +    "attribution"
      +  ],
      +  "type": "object"
      +}
  5. Changed1 schema field changedv0.15.4
    • addedInput schema / additionalProperties
      Added value: +false
  6. First observedv0.12.1

TDQS

A3.7/5.0
Behavior4/5

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

Annotations already cover safety (readOnly, idempotent, non-destructive) and closed-world scope, so the bar is lower. The description still adds real behavioral context beyond them: the freshness.status enum meanings (current, stale, unknown, pending, disabled) and the fact that stale cubes enumerate re-edited, regenerated, withdrawn or new partitions per year.

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

Conciseness3/5

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

The purpose is front-loaded in the opening clause, which is good. But the body is a single dense run-on that enumerates seven per-year fields (race_available, cid_revision, icsap_list_revision, uf_basis, municipality_available, currency, records_date_imputed) that an output schema would already carry, diluting the key freshness message.

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 needn't be spelled out, yet the description supplies the freshness-state semantics the schema likely cannot. With no parameters and full schema coverage, the definition is essentially complete for a metadata tool; only the lack of when-to-use routing is missing.

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

Parameters4/5

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

The tool takes zero parameters, so there are no argument semantics to explain; the baseline is 4. The description correctly offers no parameter discussion, nothing misleading.

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

Purpose4/5

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

States a specific verb+resource: it returns the available years present in the loaded SIH-SUS data plus the freshness of cubes against the healthbr-data mirror. It is clearly distinguishable in effect from the data-querying siblings, but it never names or contrasts with an alternative tool, so it stops short of a 5.

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 this is a discovery/metadata step (learn which years exist and how fresh they are) but never states when to call it versus list_csap_groups or get_hospitalizations, nor flags that it takes no arguments. Usage must be inferred from the returned content.

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