Skip to main content
Glama

PayStage — x402 payment safety and spend policy

evaluate_hip3_trade

Read-only

transaction scope. Call this BEFORE an agent places a HIP-3 / trade.xyz order. Verdict is allow | review | do_not_trade, with the rule that fired (notional above cap, market not allowed, leverage too high). Returns the decision and a one-line reason. Local policy only: this is not financial advice, holds no keys, and cannot place or cancel an order. Prices come from a read-only market query.

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": {
      "proposal": "<proposal>"
    },
    "name": "evaluate_hip3_trade"
  }
}

Input Schema

NameRequiredDescriptionDefault
policyNo
proposalYes
snapshotNo
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 safety (readOnlyHint=true, destructiveHint=false), and the description adds real context on top: scope is 'local policy only', it holds no keys, and cannot place or cancel an order, plus it explains the verdict vocabulary and the kinds of rules that can fire. It does not disclose latency, failure modes, or how a missing/stale snapshot is treated.

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?

Most sentences carry weight and the key instruction (call before placing an order) is front-loaded. The opening fragment 'transaction scope.' is truncated and reads as leftover text rather than a purposeful lead.

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?

It compensates well for the absent output schema by describing the verdict and one-line reason. However, for a tool with a nested proposal plus three opaque policy/snapshot parameters, the description leaves an agent guessing about what to supply for policy, policy_path, and snapshot.

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 4 parameters, including a nested proposal object. The description only implicitly touches a few nested fields via the rule names (notional/size, market/asset, leverage); it says nothing about the top-level policy, policy_path, or snapshot parameters, nor about precedence between them, leaving most of the schema undocumented.

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?

States a specific verb and resource (evaluate a HIP-3 / trade.xyz order) and even names the return shape (allow | review | do_not_trade). It does not differentiate against named siblings such as evaluate_batch or evaluate_velocity, so a 4 rather than a 5.

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 timing guidance: 'Call this BEFORE an agent places a HIP-3 / trade.xyz order.' That anchors it in the pre-trade workflow clearly. No when-not-to-use or explicit alternative routing is given, 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.