Skip to main content
Glama

FetologIA — calculadoras de medicina fetal

Idade gestacional, data provável do parto e concepção

calcular_idade_gestacional
Read-onlyIdempotent

Idade gestacional, data provável do parto e concepção. IG, DPP e concepção por DUM (Naegele), exame anterior de ultrassom, CCN (Robinson-Fleming corrigida), biometria (Hadlock 1984) ou FIV/ICSI, e comparação DUM × USG pela regra ACOG CO 700. Faixa de validade: CCN de 5 a 84 mm. Exame anterior: IG no exame entre 4+0 e 43+6 semanas; a data de referência não pode ser anterior ao exame. Biometria (Hadlock): idade calculada entre 12 e 42 semanas. Ciclo menstrual de 21 a 35 dias. FIV/ICSI: transferência em D3 ou D5. Referências: Regra de Naegele (DPP = DUM + 280 dias, ajustada pelo tamanho do ciclo). Exame anterior de ultrassom: IG do exame + dias decorridos; DPP = data do exame + (280 − IG no exame, em dias). Robinson HP, Fleming JE. Br J Obstet Gynaecol 1975 — fórmula do CCN com correção 1,037. Hadlock FP et al. Radiology 1984 — idade gestacional por DBP, CC, CA e CF (15 combinações). ACOG/AIUM/SMFM Committee Opinion 700 (2017) — Methods for estimating the due date. Página para o médico conferir: https://fetologia.com/calculadoras/idade-gestacional Material de estudo (origem do método, técnica de medida, interpretação): https://fetologia.com/calculadoras/idade-gestacional/entenda

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": {
      "modo": "<modo>"
    },
    "name": "calcular_idade_gestacional"
  }
}

Input Schema

NameRequiredDescriptionDefault
dumNoData ISO (YYYY-MM-DD) da última menstruação. Obrigatório em modo "dum" e "comparar_dum_usg".
modoYesdum=cálculo por última menstruação (Naegele); usg_anterior=a partir de um exame anterior de ultrassom (data_usg + IG que o exame definiu, em ig_usg_semanas/ig_usg_dias); ccn=por comprimento cabeça-nádega no 1º trim (Robinson-Fleming); biometria=Hadlock 1984 no 2º/3º trim; fiv=FIV/ICSI a partir de data de transferência; comparar_dum_usg=compara DUM com medida USG aplicando regra ACOG CO 700.
ca_cmNoLEGADO — CA em centímetros. Prefira ca_mm.
ca_mmNoCA (circunferência abdominal) em milímetros.
cc_cmNoLEGADO — CC em centímetros. Prefira cc_mm.
cc_mmNoCC (circunferência cefálica) em milímetros.
cf_cmNoLEGADO — CF em centímetros. Prefira cf_mm.
cf_mmNoCF (comprimento do fêmur) em milímetros.
ccn_mmNoComprimento cabeça-nádega em milímetros (5-84 mm). Usado em modo "ccn" e "comparar_dum_usg" se método=ccn.
dbp_cmNoLEGADO — DBP em centímetros. Prefira dbp_mm; se os dois vierem, vale o de milímetros.
dbp_mmNoDBP (diâmetro biparietal) em milímetros. Usado em modo "biometria".
data_usgNoData ISO (YYYY-MM-DD) do ultrassom. Obrigatório em modo "ccn", "biometria" e "comparar_dum_usg".
ciclo_diasNoTamanho do ciclo em dias (default 28). Usado em modo "dum" e "comparar_dum_usg".
usg_metodoNoEm modo "comparar_dum_usg": qual método USG usar para comparação contra DUM.
ig_usg_diasNoDias além das semanas completas no exame anterior (0 a 6). Padrão 0.
ig_usg_semanasNoSemanas completas de IG definidas no exame anterior de ultrassom. Obrigatório em modo "usg_anterior".
data_referenciaNoData ISO (YYYY-MM-DD) para cálculo de IG hoje. Default: data atual.
dia_transferenciaNoDia do desenvolvimento embrionário no transfer (3=clivagem, 5=blastocisto). Usado em modo "fiv".
data_transferenciaNoData ISO da transferência embrionária. Obrigatório em modo "fiv".

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed4 schema fields changed
    • addedInput schema / properties / ig_usg_dias
      Added value: +{
      +  "description": "Dias além das semanas completas no exame anterior (0 a 6). Padrão 0.",
      +  "maximum": 6,
      +  "minimum": 0,
      +  "type": "integer"
      +}
    • addedInput schema / properties / ig_usg_semanas
      Added value: +{
      +  "description": "Semanas completas de IG definidas no exame anterior de ultrassom. Obrigatório em modo \"usg_anterior\".",
      +  "maximum": 43,
      +  "minimum": 4,
      +  "type": "integer"
      +}
    • changedInput schema / properties / modo / description
      Previous value: -"dum=cálculo por última menstruação (Naegele); ccn=por comprimento cabeça-nádega no 1º trim (Robinson-Fleming); biometria=Hadlock 1984 no 2º/3º trim; fiv=FIV/ICSI a partir de data de transferência; comparar_dum_usg=compara DUM com medida USG aplicando regra ACOG CO 700."New value: +"dum=cálculo por última menstruação (Naegele); usg_anterior=a partir de um exame anterior de ultrassom (data_usg + IG que o exame definiu, em ig_usg_semanas/ig_usg_dias); ccn=por comprimento cabeça-nádega no 1º trim (Robinson-Fleming); biometria=Hadlock 1984 no 2º/3º trim; fiv=FIV/ICSI a partir de data de transferência; comparar_dum_usg=compara DUM com medida USG aplicando regra ACOG CO 700."
    • changedInput schema / properties / modo / enum
      Previous value: -[
      -  "dum",
      -  "ccn",
      -  "biometria",
      -  "fiv",
      -  "comparar_dum_usg"
      -]New value: +[
      +  "dum",
      +  "usg_anterior",
      +  "ccn",
      +  "biometria",
      +  "fiv",
      +  "comparar_dum_usg"
      +]
  2. Changed8 schema fields changed
    • changedInput schema / properties / ca_cm / description
      Previous value: -"CA (Circunferência Abdominal) em cm."New value: +"LEGADO — CA em centímetros. Prefira ca_mm."
    • addedInput schema / properties / ca_mm
      Added value: +{
      +  "description": "CA (circunferência abdominal) em milímetros.",
      +  "exclusiveMinimum": 0,
      +  "type": "number"
      +}
    • changedInput schema / properties / cc_cm / description
      Previous value: -"CC (Circunferência Cefálica) em cm."New value: +"LEGADO — CC em centímetros. Prefira cc_mm."
    • addedInput schema / properties / cc_mm
      Added value: +{
      +  "description": "CC (circunferência cefálica) em milímetros.",
      +  "exclusiveMinimum": 0,
      +  "type": "number"
      +}
    • changedInput schema / properties / cf_cm / description
      Previous value: -"CF (Comprimento do Fêmur) em cm."New value: +"LEGADO — CF em centímetros. Prefira cf_mm."
    • addedInput schema / properties / cf_mm
      Added value: +{
      +  "description": "CF (comprimento do fêmur) em milímetros.",
      +  "exclusiveMinimum": 0,
      +  "type": "number"
      +}
    • changedInput schema / properties / dbp_cm / description
      Previous value: -"DBP (Diâmetro Biparietal) em cm. Usado em modo \"biometria\"."New value: +"LEGADO — DBP em centímetros. Prefira dbp_mm; se os dois vierem, vale o de milímetros."
    • addedInput schema / properties / dbp_mm
      Added value: +{
      +  "description": "DBP (diâmetro biparietal) em milímetros. Usado em modo \"biometria\".",
      +  "exclusiveMinimum": 0,
      +  "type": "number"
      +}
  3. First observed

TDQS

A3.9/5.0
Behavior4/5

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

Annotations already declare readOnlyHint, idempotentHint and destructiveHint=false, so safety needs no restating. Beyond that, the description discloses the underlying formulas (Naegele DPP = DUM + 280 adjusted by cycle length; prior-exam DPP = exam date + (280 − IG in days)), the 1.037 CRL correction, Hadlock's 15 parameter combinations, and the governing ACOG opinion — meaningful algorithmic transparency for a clinical calculator. What it does not state is the shape of the returned result.

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?

Purpose is front-loaded, followed by validity constraints, then reference basis, then verification links — a sensible order. The opening sentence essentially restates the title, and the bibliography plus the two fetologia.com links occupy a fair share of the text, but they justify the clinical provenance of the formulas rather than being filler.

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

Completeness4/5

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

For a 19-parameter, six-mode clinical calculator with no output schema, the description covers inputs, mode selection, validity bounds, formulas and the ACOG comparison rule. The main remaining gap is that it only loosely signals what comes back (IG values, DPP, conception date, comparison verdict), without field-level detail.

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% across all 19 parameters, including per-mode requirements and the legacy cm-vs-mm precedence rules, so the baseline is 3. The description corroborates the mode semantics and adds the numeric validity ranges and citation basis for each method, but adds little parameter-level meaning the schema does not already carry.

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

Purpose4/5

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

The description names a specific resource set (IG, DPP, data de concepção) and enumerates the six calculation pathways: DUM/Naegele, prior ultrasound, CCN (Robinson-Fleming), biometry (Hadlock 1984), IVF/ICSI, and DUM vs. USG comparison per ACOG CO 700. It is unambiguous about what is being computed, but it never contrasts itself with the sibling calculators (e.g., calcular_medidas_fetais, calcular_intergrowth), leaving that differentiation to the agent.

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

Usage Guidelines4/5

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

Validity windows act as concrete use-when constraints: CCN 5–84 mm, prior exam between 4+0 and 43+6 weeks, Hadlock 12–42 weeks, cycle 21–35 days, transfer on D3 or D5. It also states the key precondition that the reference date cannot precede the exam. It stops short of explicit when-not guidance or routing to sibling tools, but the method-selection constraints are clear.

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