Skip to main content
Glama

Parse Vietnamese date phrase

vn_lunar_parse_date
Read-onlyIdempotent

Convert Vietnamese lunar, relative, or Gregorian date phrases into a solar date. Handles expressions like "mùng 1 Tết" or "3 ngày nữa" with an optional reference date.

Instructions

Turn a Vietnamese date phrase into a solar date: lunar ("rằm tháng Giêng năm sau", "mùng 1 Tết", "23 tháng Chạp"), relative ("ngày mai", "3 ngày nữa", "thứ Sáu tuần sau") or Gregorian. ref (yyyy-mm-dd) defaults to today in UTC+7.

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": {
      "text": "<text>"
    },
    "name": "vn_lunar_parse_date"
  }
}

Input Schema

NameRequiredDescriptionDefault
refNo
textYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.2/5.0
Behavior3/5

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

Annotations already declare readOnly, idempotent, closed-world and non-destructive, so the safety profile is covered. The description adds the useful behavioral detail that the reference date defaults to today in UTC+7 — a timezone assumption not in the schema — but says nothing about the return value's format or failure behavior for unrecognized phrases.

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, front-loaded with the verb and scope, then the parameter default. The parenthetical example lists are dense with information rather than padding, and nothing can be removed without losing scope detail.

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?

With no output schema and only two parameters, the definition covers the essentials: what inputs are valid and how the reference date resolves. The main remaining gap is what the returned solar date looks like (format, timezone of the result), which an agent must guess.

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 description coverage is 0%, so the description must carry the parameter meaning, and it does: it documents ref as yyyy-mm-dd with a default of today in UTC+7, which the schema omits entirely. For text it conveys meaning through the enumerated phrase families rather than a formal definition, leaving the distinction from ref slightly implicit.

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?

Names a specific verb and resource ("Turn a Vietnamese date phrase into a solar date") and enumerates three concrete input families — lunar, relative, Gregorian — each with real examples. That scope definition is what separates it from the structured-conversion siblings like vn_lunar_to_solar, even though none is named.

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?

The three accepted phrase categories give an agent a clear picture of when this tool applies, and the examples ("rằm tháng Giêng năm sau", "3 ngày nữa") bound the grammar. It stops short of naming an alternative for already-structured lunar dates or stating what happens for unparseable input.

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