Skip to main content
Glama

Tanod Finance

utilpeek: count business days or add working days (with public holidays)

count_or_add_business_days
Read-onlyIdempotent

utilpeek: Count business days between two dates or add working days, skipping public holidays. Returns the business days between two dates (mode count; both ends included by default, like NETWORKDAYS) or the date N business days after or before a date (mode add, like WORKDAY), skipping weekends (configurable) and, with a country, its public holidays; plus the holidays skipped. Input: mode, start, for count end and optional include_start / include_end, for add days, optional weekend, country and subdivision. Ranges up to 20 years; with a country, dates in 1990-2100. Bad input is a 422 (not charged). Holiday rules are modelled by a library: confirm with an official source for legal or payroll use. Typically under 0.2 s. Price: USD 0.001. Free: 10 utilpeek calls per IP per UTC day.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
endNocount only: end date, YYYY-MM-DD, at most 20 years from start (before start gives a negative count).
daysNoadd only: business days to add (negative subtracts). The start date is never counted (like Excel WORKDAY); 0 returns start.
modeYescount: business days between start and end; add: the date `days` business days after (or before) start.
startYesStart date, YYYY-MM-DD (1900-01-01..2199-12-31).
countryNoOptional ISO 3166-1 alpha-2 country whose public holidays are not business days (the /v1/holidays data; dates in 1990-2100).
weekendNoWeekday names that are not business days (default ["sat", "sun"]; e.g. ["fri", "sat"]; [] for none).
include_endNocount only: count the end date (default true; both true is Excel NETWORKDAYS, include_end false the half-open [start, end) of numpy.busday_count).
subdivisionNoOptional subdivision code or name for that country (e.g. CA or California for US).
include_startNocount only: count the start date (default true).

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
endNo
dateNo
daysNo
modeNo
noteNo
errorNoOnly on an error result: an object {code, message}, or the reason string of an x402 PaymentRequired object.
startNo
sourceNo
countryNo
weekdayNo
weekendNo
countingNo
include_endNo
subdivisionNo
holiday_daysNo
weekend_daysNo
business_daysNo
calendar_daysNo
include_startNo
holidays_skippedNo
holidays_truncatedNo
start_is_business_dayNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "properties": {
      +    "business_days": {
      +      "type": [
      +        "integer",
      +        "null"
      +      ]
      +    },
      +    "calendar_days": {
      +      "type": [
      +        "integer",
      +        "null"
      +      ]
      +    },
      +    "counting": {
      +      "type": [
      +        "string",
      +        "null"
      +      ]
      +    },
      +    "country": {
      +      "type": [
      +        "string",
      +        "null"
      +      ]
      +    },
      +    "date": {
      +      "type": [
      +        "string",
      +        "null"
      +      ]
      +    },
      +    "days": {
      +      "type": [
      +        "integer",
      +        "null"
      +      ]
      +    },
      +    "end": {
      +      "type": [
      +        "string",
      +        "null"
      +      ]
      +    },
      +    "error": {
      +      "description": "Only on an error result: an object {code, message}, or the reason string of an x402 PaymentRequired object."
      +    },
      +    "holiday_days": {
      +      "type": [
      +        "integer",
      +        "null"
      +      ]
      +    },
      +    "holidays_skipped": {
      +      "items": {
      +        "properties": {
      +          "date": {
      +            "type": [
      +              "string",
      +              "null"
      +            ]
      +          },
      +          "name": {
      +            "type": [
      +              "string",
      +              "null"
      +            ]
      +          },
      +          "weekday": {
      +            "type": [
      +              "string",
      +              "null"
      +            ]
      +          }
      +        },
      +        "type": [
      +          "object",
      +          "null"
      +        ]
      +      },
      +      "type": [
      +        "array",
      +        "null"
      +      ]
      +    },
      +    "holidays_truncated": {
      +      "type": [
      +        "boolean",
      +        "null"
      +      ]
      +    },
      +    "include_end": {
      +      "type": [
      +        "boolean",
      +        "null"
      +      ]
      +    },
      +    "include_start": {
      +      "type": [
      +        "boolean",
      +        "null"
      +      ]
      +    },
      +    "mode": {
      +      "enum": [
      +        "count",
      +        "add",
      +        null
      +      ],
      +      "type": [
      +        "string",
      +        "null"
      +      ]
      +    },
      +    "note": {
      +      "type": [
      +        "string",
      +        "null"
      +      ]
      +    },
      +    "source": {
      +      "properties": {
      +        "library": {
      +          "type": [
      +            "string",
      +            "null"
      +          ]
      +        },
      +        "license": {
      +          "type": [
      +            "string",
      +            "null"
      +          ]
      +        },
      +        "url": {
      +          "type": [
      +            "string",
      +            "null"
      +          ]
      +        }
      +      },
      +      "type": [
      +        "object",
      +        "null"
      +      ]
      +    },
      +    "start": {
      +      "type": [
      +        "string",
      +        "null"
      +      ]
      +    },
      +    "start_is_business_day": {
      +      "type": [
      +        "boolean",
      +        "null"
      +      ]
      +    },
      +    "subdivision": {
      +      "type": [
      +        "string",
      +        "null"
      +      ]
      +    },
      +    "weekday": {
      +      "type": [
      +        "string",
      +        "null"
      +      ]
      +    },
      +    "weekend": {
      +      "items": {
      +        "type": [
      +          "string",
      +          "null"
      +        ]
      +      },
      +      "type": [
      +        "array",
      +        "null"
      +      ]
      +    },
      +    "weekend_days": {
      +      "type": [
      +        "integer",
      +        "null"
      +      ]
      +    }
      +  },
      +  "type": "object"
      +}
  2. Added

TDQS

Score is being calculated.

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources