Skip to main content
Glama

x402 agent toolkit: service finder, payment safety, Solana & web tools

Duration parser

duration_parse
Read-onlyIdempotent

Parse ISO 8601 (P1DT2H30M), hh:mm:ss or human durations ('1h 30m', '2 weeks') to seconds, ISO and human form; optional end time from a start date. Free: 10 calls/day; then $0.001/call via x402 (MCP params._meta["x402/payment"] or HTTP) or X-API-Key credits. [served by tools.moneytools.dev]

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": {
      "duration": "<duration>"
    },
    "name": "duration_parse"
  }
}

Input Schema

NameRequiredDescriptionDefault
fromNoISO start time
durationYesduration

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.2/5.0
Behavior4/5

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

Annotations already declare readOnlyHint, idempotentHint, destructiveHint=false and openWorldHint, so the safety profile is covered; the description adds genuinely useful context beyond them — rate limits (10 calls/day), pricing ($0.001/call), and the two payment paths (x402 via params._meta or X-API-Key credits) plus the serving host. It does not describe failure behavior for unparseable input or output shape, which keeps it short of a 5.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Two sentences: the first front-loads formats, conversion outputs and the optional start-date behavior; the second delivers the commercial/access constraints compactly with the x402 key path in parentheses. No filler, and the serving host is bracketed at the end where it belongs.

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?

Output schema exists, so return values need not be spelled out, and both parameters are documented at 100% coverage. What remains is minor: whether 'from' alone yields an end time and what the human-form output looks like are slightly underspecified, but the tool is simple enough (one required string) that no critical calling information is missing.

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 100%, so baseline is 3, but the description earns an extra point by explaining the semantic effect of the otherwise vaguely labeled 'from' parameter — it acts as a start date from which an optional end time is computed. That is outcome-level meaning the schema's 'ISO start time' label does not convey.

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?

States a specific verb (parse) and resource (durations) and enumerates the accepted input formats with concrete examples (P1DT2H30M, hh:mm:ss, '1h 30m', '2 weeks') plus the outputs produced (seconds, ISO and human form). An agent can identify exactly what this does without opening the schema, and no sibling in the list overlaps with duration parsing.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Usage context is implied rather than stated: the agent can infer 'use this to convert a duration string to seconds,' and the phrase 'optional end time from a start date' hints at when the second parameter is relevant. However, there is no explicit when-to-use/when-not guidance or routing to any alternative, and the pricing block occupies the space where that guidance would go.

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