Skip to main content
Glama

Crypto & Macro Market Data (Tanod)

count_or_add_business_days

Read-onlyIdempotent

utilpeek: Count business days between two dates or add working days, skipping public holidays. For the holiday list use get_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. Docs: https://tanod.dev/learn/business-days-api.html

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": {
      "mode": "<mode>",
      "start": "<start>"
    },
    "name": "count_or_add_business_days"
  }
}

Input 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).
countryNoISO 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).
subdivisionNoSubdivision code or name for that country (e.g. CA or California for US).
include_startNocount only: count the start date (default true).

Output 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. Changed21 schema fields changed
    • removedInput schema / properties / country / default
      Removed value: -null
    • changedInput schema / properties / country / description
      Previous value: -"Optional ISO 3166-1 alpha-2 country whose public holidays are not business days (the /v1/holidays data; dates in 1990-2100)."New value: +"ISO 3166-1 alpha-2 country whose public holidays are not business days (the /v1/holidays data; dates in 1990-2100)."
    • removedInput schema / properties / country / title
      Removed value: -"Country"
    • removedInput schema / properties / days / default
      Removed value: -null
    • removedInput schema / properties / days / title
      Removed value: -"Days"
    • removedInput schema / properties / end / default
      Removed value: -null
    • removedInput schema / properties / end / title
      Removed value: -"End"
    • removedInput schema / properties / include_end / default
      Removed value: -null
    • removedInput schema / properties / include_end / title
      Removed value: -"Include End"
    • removedInput schema / properties / include_start / default
      Removed value: -null
    • removedInput schema / properties / include_start / title
      Removed value: -"Include Start"
    • removedInput schema / properties / mode / title
      Removed value: -"Mode"
    • removedInput schema / properties / start / title
      Removed value: -"Start"
    • removedInput schema / properties / subdivision / default
      Removed value: -null
    • changedInput schema / properties / subdivision / description
      Previous value: -"Optional subdivision code or name for that country (e.g. CA or California for US)."New value: +"Subdivision code or name for that country (e.g. CA or California for US)."
    • removedInput schema / properties / subdivision / title
      Removed value: -"Subdivision"
    • removedInput schema / properties / weekend / title
      Removed value: -"Weekend"
    • removedInput schema / title
      Removed value: -"count_or_add_business_daysArguments"
    • removedOutput schema / properties / holidays_skipped / items
      Removed value: -{
      -  "properties": {
      -    "date": {
      -      "type": [
      -        "string",
      -        "null"
      -      ]
      -    },
      -    "name": {
      -      "type": [
      -        "string",
      -        "null"
      -      ]
      -    },
      -    "weekday": {
      -      "type": [
      -        "string",
      -        "null"
      -      ]
      -    }
      -  },
      -  "type": [
      -    "object",
      -    "null"
      -  ]
      -}
    • removedOutput schema / properties / source / properties
      Removed value: -{
      -  "library": {
      -    "type": [
      -      "string",
      -      "null"
      -    ]
      -  },
      -  "license": {
      -    "type": [
      -      "string",
      -      "null"
      -    ]
      -  },
      -  "url": {
      -    "type": [
      -      "string",
      -      "null"
      -    ]
      -  }
      -}
    • removedOutput schema / properties / weekend / items
      Removed value: -{
      -  "type": [
      -    "string",
      -    "null"
      -  ]
      -}
  2. 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"
      +}
  3. Added

TDQS

A4.4/5.0
Behavior5/5

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

Beyond the read-only/idempotent annotations, the description discloses hard limits (ranges up to 20 years, country-bounded dates 1990-2100), the 422-on-bad-input-and-not-charged behavior, pricing, free tier, typical latency, and a caveat that holiday rules come from a library and need official confirmation for payroll use. That is exactly the extra context annotations cannot carry.

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?

The core purpose and the sibling pointer come first, followed by return behavior, then constraints, then operational facts. It is dense and slightly repetitive in re-listing the parameter names, but nearly every clause earns its place.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a tool with 9 parameters, an output schema, and mode-dependent behavior, the description covers return semantics (including skipped holidays), edge cases (negative counts, days=0), input limits, and cost. Nothing an agent needs to call it correctly is missing.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

With 100% schema description coverage the schema already documents all nine parameters, so the baseline is 3. The description adds some meaning by tying include_start/include_end defaults to NETWORKDAYS and the half-open numpy.busday_count behavior, but it largely restates what the schema already says.

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?

The description names both operations with specific verbs and resources (count business days between two dates; add N working days to a date) and names the alternative tool (get_public_holidays) for the adjacent need. An agent can distinguish this from sibling tools 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?

It explicitly routes the agent to get_public_holidays for the holiday list and explains which mode to pick (count vs add) with the Excel NETWORKDAYS/WORKDAY analogues. It stops short of stating when NOT to use the tool, but the mode-level guidance is clear.

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.