Skip to content

featherweight.tools

tools

Default tools. Import them and put them in an agent's tools allow-list.

calculate                    exact arithmetic, for totals and subtotals
current_datetime / add_to_date / days_between
                             date operations (UTC, ISO 8601)

All tools return text and do not raise, so the model can read what went wrong and react.

calculate

calculate(expression: str) -> str

Evaluate an arithmetic expression exactly, e.g. "320000 + 85000 + 45000" or "(450000 + 200000) * 0.19".

Use plain numbers (no currency signs or thousands separators) and + - * / // % ** with parentheses. Returns the result as a plain number, or an error message.

current_datetime

current_datetime() -> str

Get the current date and time in UTC as an ISO 8601 string, e.g. 2026-11-05T10:15:30+00:00.

add_to_date

add_to_date(
    date: str = "today",
    days: int = 0,
    weeks: int = 0,
    months: int = 0,
    years: int = 0,
) -> str

Add (or, with negative numbers, subtract) time to a date and return it as YYYY-MM-DD.

date is YYYY-MM-DD, or "today" (the default) for the current UTC date. Months and years are calendar based and clamp to the end of the month, e.g. 2024-01-31 plus 1 month is 2024-02-29. Example: four weeks from now is add_to_date(weeks=4).

days_between

days_between(start: str, end: str) -> str

Number of days from start to end (both YYYY-MM-DD, or "today"); negative if end is before start.