Skip to main content
Glama

EAN Check barcode and shipping tools

julian_date

Read-onlyIdempotent

Convert a day-number date code (a "Julian date" on packaging: DDD, YDDD, YYDDD, CYYDDD or YYYYDDD) or an astronomical Julian Date (JD, MJD) to a calendar date, or a calendar date to every code form. Give code or date, not both. Dates from 1583-01-01 to 9999-12-31. A code that is not a date gets an error and a hint, not a guess. An answer for a code with a year in it says how old the date is, counted from today; for a three-digit code, the day this year once it has come.

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

Input Schema

NameRequiredDescriptionDefault
codeNoOne code as printed: 3 digits (day of year, as on egg cartons), 4 (last digit of year + day), 5 (two-digit year + day), 6 (JD Edwards CYYDDD) or 7 (four-digit year + day). A separator between year and day is allowed (25-319, 2025-319, 2025.319). Letters around one group of digits are left out ("LOT 25319 B2" reads 25319); two groups of digits ("042 155") are refused as two codes. For an astronomy number send the decimals (2460994.5) or put JD or MJD in front (MJD 61360). One code per call.
dateNoA Gregorian calendar date as YYYY-MM-DD, from 1583-01-01 to 9999-12-31, to get its day number and codes.
todayNoOptional, YYYY-MM-DD, from 1583-01-01 to 9999-12-31 (default: today in UTC). The date a one-digit or two-digit year is read against, and the date the age of the result is counted from. A two-digit year is read as a year from today minus 89 years to today plus 10, moved to stay inside 1583 to 9999; a one-digit year as the latest year ending in that digit, not after this year. Set it to the date the item was handled when the code is old.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.3/5.0
Behavior4/5

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

Annotations already cover safety (readOnly, idempotent, non-open-world), and the description adds real behavior: invalid codes return an error plus a hint rather than a guessed date, and results for year-bearing codes include an age computed from `today`. The supported date range 1583-01-01 to 9999-12-31 is stated. Missing: nothing on output shape beyond the age note, but that is minor.

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 conversion direction and the accepted code forms, then constraints. Dense but each sentence carries usable information; the parenthetical code list is long but necessary for recognition.

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?

No output schema exists, so the description must hint at returns, which it does (calendar date, all code forms, plus an age for year-bearing inputs). Range limits and the error-not-guess behavior round out what an agent needs for a 3-parameter, 0-required conversion tool.

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 would be 3, but the description adds the mutual-exclusivity rule between `code` and `date` that the schema does not express (no oneOf/anyOf). It also explains the semantics of `today` beyond the schema's own text — a replay point for interpreting short years.

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 and resource: convert between day-number packaging codes (DDD/YDDD/YYDDD/CYYDDD/YYYYDDD) or astronomical JD/MJD and a calendar date, and the reverse. The accepted code dialects are enumerated, so an agent can distinguish this from siblings like identify_code or convert_upc_e without opening the schema.

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?

Gives a clear selection rule — supply `code` or `date`, not both — plus when to set `today` ("set it to the date the item was handled when the code is old"). It does not name a sibling alternative for ambiguous inputs, but the input-mode split is unambiguous enough to act on.

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