Skip to main content
Glama

PayStage — x402 payment safety and spend policy

evaluate_velocity

Read-only

transparent risk assessments. Call this when an agent is about to make its Nth payment and you need to know whether the rate itself is the risk. Verdict is pay | review | do_not_pay over a rolling window (per-hour and per-day spend, count of payees). Returns the decision plus which window was breached. Read-only: it reads the history you pass in, holds no keys, and calls no external service.

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": {
      "proposed": "<proposed>"
    },
    "name": "evaluate_velocity"
  }
}

Input Schema

NameRequiredDescriptionDefault
now_msNo
policyNo
historyNo
proposedYes
policy_pathNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A3.6/5.0
Behavior4/5

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

Annotations already cover read-only and closed-world, so 'holds no keys, and calls no external service' largely restates them. The description adds genuine value beyond annotations by specifying the verdict vocabulary, the rolling-window dimensions (per-hour and per-day spend, payee count), and that it 'Returns the decision plus which window was breached.' That return-shape disclosure is the main behavioral contribution, but it does not cover policy/limits handling.

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 body is dense and front-loads the trigger condition and the verdict semantics. The leading fragment 'transparent risk assessments.' is a dangling phrase that does not earn its place and reads as marketing padding. Otherwise the sentences are efficient with no redundancy.

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

Completeness3/5

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

There is no output schema, and the description compensates by describing the verdict values and the 'which window was breached' result. However, for a five-parameter tool with nested objects and policy inputs, the description leaves significant parameter and policy semantics unexplained. It is adequate for understanding the return and intent, not for invoking confidently.

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

Parameters2/5

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

Schema description coverage is 0% across five parameters including nested objects, so the description must carry the burden. It mentions the 'history you pass in' and alludes to the proposed payment, but says nothing about now_ms, policy, or policy_path, nor about the fields inside history/proposed entries. With half the parameters undocumented in both schema and prose, this is a clear gap.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description states a specific decision output (pay | review | do_not_pay) over a rolling per-hour/per-day window, which is a concrete verb+resource. It implicitly differentiates from per-payment checks by asking whether 'the rate itself is the risk,' but it never names a sibling tool. The opening fragment 'transparent risk assessments.' is weak framing rather than a purpose statement.

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?

Explicit trigger is given: 'Call this when an agent is about to make its Nth payment and you need to know whether the rate itself is the risk.' That is a clear when-to-use condition that implies a velocity/rate check rather than a single-payment check. It lacks named alternatives and any when-not-to-use exclusion, so it falls short of a 5.

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.