Skip to main content
Glama

Nove: gestação semana a semana

Data provável do parto

calculate_due_date
Read-onlyIdempotent

Use quando quiserem saber a data provável do parto (DPP) ou de quantas semanas estão. Informe a última menstruação (lmp), ou um ultrassom (data mais semanas e dias do laudo), ou a DPP que a médica passou. Retorna a DPP, as semanas e dias de hoje, o trimestre e o link da semana. Regra de Naegele (DUM + 280 dias).

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "calculate_due_date"
  }
}

Input Schema

NameRequiredDescriptionDefault
lmpNoPrimeiro dia da última menstruação (AAAA-MM-DD)
due_dateNoData provável do parto já conhecida (AAAA-MM-DD)
ultrasound_dateNoData do ultrassom (AAAA-MM-DD)
ultrasound_daysNoDias no laudo do ultrassom (0 a 6)
ultrasound_weeksNoSemanas no laudo do ultrassom

Output Schema

NameRequiredDescriptionDefault
daysNo
noteNo
errorNo
todayNo
weeksNo
methodNo
due_dateNo
trimesterNo
week_pageNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4/5.0
Behavior4/5

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

Annotations already establish this is a read-only, idempotent, non-open-world computation, so safety is covered. The description adds real value beyond them by disclosing the calculation method (Naegele) and the shape of the result (DPP, weeks/days today, trimester, week link). It stops short of stating what happens with conflicting inputs or out-of-range dates.

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?

Four sentences, front-loaded with the trigger condition and immediately followed by the input options and the return contract. No filler, though the parenthetical explanation of the ultrasound fields slightly duplicates schema descriptions that are already 100% covered.

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 five-parameter, fully-optional calculation tool with an output schema and complete annotations, the description covers trigger, input modes, method, and result shape. The remaining gap is precedence/conflict handling between LMP, ultrasound, and known DPP – a clinically meaningful omission in an otherwise complete definition.

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?

Schema coverage is 100%, so the baseline is 3, but the description earns an upgrade by explaining that the five parameters form three mutually exclusive input modes ('lmp, ou um ultrassom (data mais semanas e dias do laudo), ou a DPP'). That 'or' relationship and the fact that only one mode is needed are not expressed anywhere in the schema, where all params are simply optional.

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 outcome (data provável do parto – DPP – or current gestational weeks/days) and the underlying method (Naegele rule, DUM + 280 days), so the tool's function is unmistakable. It does not, however, differentiate itself from the sibling get_pregnancy_week, which appears to cover the same gestational-age question, leaving ambiguity about which tool to call.

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?

Strong when-to-use guidance is given: 'Use quando quiserem saber a DPP ou de quantas semanas estão', followed by the three acceptable input modes (LMP, ultrasound report, or a known DPP). What is missing is any exclusion or precedence rule – it never says which input wins when several are supplied, nor when to prefer get_pregnancy_week instead.

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.