Skip to main content
Glama

medical.pregnancy_weeks

Read-onlyIdempotent

Calculate pregnancy weeks, days, trimester, and estimated delivery date from a last menstrual period date, with an optional reference date.

Instructions

최종 월경일(LMP)로 임신 주수와 분만예정일(EDD)을 계산한다. 입력은 YYYY-MM-DD 문자열이며 reference_date를 생략하면 서버의 오늘 날짜를 쓴다. EDD = LMP + 280일(Naegele 법칙), 주수와 일수는 042주로 제한하고 삼분기(13)도 함께 반환한다. 초음파 계측으로 조정한 예정일은 반영하지 않는다.

Input Schema

NameRequiredDescriptionDefault
lmp_dateYes
reference_dateNo

Output Schema

NameRequiredDescriptionDefault
eddYes
daysYes
_metaNo서버가 붙이는 영수증(integrity), 엔진, 힌트
traceYes계산 근거(tool, formula, inputs, steps, output)
weeksYes
trimesterYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.3.0

TDQS

A4.5/5.0
Behavior4/5

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

Annotations already declare readOnly/idempotent/closed-world, and the description adds substantive context beyond them: the Naegele formula (LMP+280), clamping to 0-42 weeks, and that ultrasound-adjusted dates are ignored. Return of trimester is also disclosed.

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

Conciseness5/5

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

Front-loads the purpose, then input format, then algorithm and edge-case bounds. Dense but every clause adds decision-relevant information.

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

Completeness5/5

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

With an output schema present, the description needn't detail return values; it covers inputs, formula, clamping behavior, and a key exclusion (no ultrasound adjustment). Complete for correct invocation.

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 0%, so the description must carry the burden; it specifies lmp_date format (YYYY-MM-DD) and explains reference_date's default-to-today behavior. Both parameters are effectively documented.

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 (calculate) and resource (gestational age and EDD) with the method source (LMP). No sibling in the medical.* namespace computes pregnancy dating, so it's clearly distinguishable.

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?

Implies use when dating a pregnancy from LMP and explicitly notes the limitation that ultrasound-adjusted EDD is not reflected, which guides correct selection. No explicit alternative tool named, so not a 5.

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

Deploy Server

Other Tools