Skip to main content
Glama

BabyData pregnancy calculators

Pregnancy weeks calculator

pregnancy_weeks
Read-onlyIdempotent

Work out how many weeks and days pregnant someone is, the trimester and progress through the 40 weeks, from either the LMP or the due date. Informational only, not medical advice.

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": "pregnancy_weeks"
  }
}

Input Schema

NameRequiredDescriptionDefault
lmpNoFirst day of last period as YYYY-MM-DD.
asOfNoReference date YYYY-MM-DD (default today).
dueDateNoDue date as YYYY-MM-DD (LMP is worked back as dueDate minus 280 days).

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A3.8/5.0
Behavior4/5

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

Annotations already declare readOnlyHint, idempotentHint, non-destructive, and closed-world, so the safety profile is covered. The description adds value beyond that by stating the informational-only disclaimer ('not medical advice') and by disclosing the outputs returned, which the annotations cannot convey.

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?

Two sentences with no wasted wording: the capability and inputs come first, and the disclaimer sits at the end where it belongs. Everything stated 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?

There is no output schema, and the description compensates by naming what is returned (weeks and days, trimester, 40-week progress). It omits that all three parameters are optional and that asOf defaults to today, though the schema covers those details.

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%, so lmp, asOf, and dueDate are already fully documented including the 280-day back-calculation. The description adds only the notion that LMP and due date are alternative entry points, which is a modest gain over the schema; baseline 3 applies.

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 verb and resource ('work out how many weeks and days pregnant someone is') and enumerates the outputs: weeks/days, trimester, and progress through the 40 weeks. It does not name or contrast itself with the sibling calculate_due_date, which computes the reverse direction, so the agent must infer the distinction.

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?

It clarifies that the calculation can proceed from either the LMP or the due date, which is useful input-selection guidance, and it signals the informational (non-clinical) framing. However, it never tells the agent when to prefer this tool over calculate_due_date or calculate_ovulation, so sibling routing is left implicit.

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