Skip to main content
Glama

ScorpTech x402 Tools

Day Count

day_count
Read-onlyIdempotent

Day-count conventions and accrued interest for bonds, loans and swaps: days and year fraction between two dates under ACT/360, ACT/365F, ACT/ACT ISDA, NL/365, 30/360 (ISDA bond basis), 30/360 US (SIA end-of-February rules), 30E/360 and 30E/360 ISDA, with simple interest on a principal; or, for a fixed-coupon bond, the coupon schedule around a settlement date (previous / next coupon, end-of-month rule), accrued days and accrued interest per face amount, including ACT/ACT ICMA (Treasuries). Matches QuantLib. Returns JSON with: start, end, actualDays, principal, ratePct, results, notes. Price: $0.001 USDC per successful call (x402, Base or Solana). Same tool over HTTPS: GET https://scorptech.it.com/api/x402/v1/day-count

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "day_count"
  }
}

Input Schema

NameRequiredDescriptionDefault
endNo
modeNobetween
startNo
ratePctNobetween: annual simple rate for the interest amount; coupon: coupon rate
maturityNocoupon: maturity date; between: termination date for 30E/360 ISDA
frequencyNocoupon: payments per year
principalNo
conventionNoall
settlementNocoupon: settlement date

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.3/5.0
Behavior4/5

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

Beyond the annotations (readOnly, idempotent, non-destructive, openWorld) it discloses the x402 payment model, the exact per-call price, the supported chains, an alternate HTTPS endpoint, the output JSON keys, and that results match QuantLib. That is meaningful operational context an agent needs before calling. It omits failure behavior — what happens on an unpaid or rejected call, and whether retries are billed.

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 computation is front-loaded in the first sentence, and the second covers the coupon branch; pricing and endpoint come last, where they belong. It is a dense block with some run-on listing, but nearly every clause carries information an agent needs.

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 nine parameters, no output schema and 44% schema coverage, the description does the heavy lifting: it enumerates the return keys, covers both modes, the convention set, and the payment/transport details. The remaining gap is edge-case behavior for invalid date or mode combinations rather than missing core information.

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 coverage is only 44%, so the description has to carry weight, and it does: it spells out all convention identifiers and their conventions (30/360 US SIA end-of-February rules, 30E/360 ISDA, ACT/ACT ICMA for Treasuries), and explains that principal and rate feed a simple-interest calculation in 'between' mode. It still leaves 'all' as the convention default and the roles of 'results'/'notes' unexplained.

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 states a concrete verb-and-resource pair ('day-count conventions and accrued interest') and enumerates the exact scope: eight named conventions, simple interest on principal, and a second mode for fixed-coupon bond coupon schedules. It is unmistakable against the sibling '*_count' number-theory tools, which do nothing similar.

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 clearly separates the two operating modes — generic day count between two dates versus coupon-schedule accrual for a fixed-coupon bond around a settlement date — which tells an agent which branch to pick. It does not give an explicit 'use X when, not Y' statement or warn about invalid parameter combinations (e.g. settlement without maturity).

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.

Resources