Part of the lingo docs (natural-language quantities, units, dates parser) — index: https://lingo.pascal.app/llms.txt

## MCP tools

`lingoTool()` from `@pascal-app/lingo/mcp` builds a complete MCP tool descriptor from a `lingoObject` shape: a closed JSON Schema out, `safeParse` in, and `[CODE]`-prefixed errors the model can self-correct from. Bring any MCP SDK; lingo brings the schema and the validation.

~~~ts
import { dateField, quantityField } from "@pascal-app/lingo/ai"
import { lingoTool } from "@pascal-app/lingo/mcp"

const createShipment = lingoTool({
  name: "create_shipment",
  description: "Create a shipment; natural-language values welcome.",
  input: {
    weight: quantityField({ kind: "mass", unit: "kg", min: 0, max: 500 }),
    deliverBy: dateField({ min: "2026-01-01" }),
  },
  handler: ({ weight, deliverBy }) =>
    "Shipment logged: " + weight + " kg, deliver by " + deliverBy,
})

server.registerTool(createShipment.name, {
  description: createShipment.description,
  inputSchema: createShipment.inputSchema,
}, createShipment.callback)
~~~

With `requireNow` on, `"tomorrow"` bounces back with `NOW_REQUIRED`, so a queued tool call can never drift across midnight.

Human docs: https://lingo.pascal.app/docs#mcp