explain_signature
Explains a single function's intended UX copy and risk tier from an ERC-7730 descriptor, returning a plain-language consequence sentence and the reasoning behind the risk level.
Instructions
PURPOSE: Review UX copy for ONE function of an ERC-7730 descriptor — an unbound actor->action->object consequence sentence ('You let {spender} move up to {amount} of your tokens…'), a risk tier (CRITICAL/HIGH/MEDIUM/LOW), and the specific reason it earned that tier. Returns {found, function, sentence, tier, reason}. GUIDELINES: Use this only while authoring or reviewing confirmation copy. It is not bound to chain, sender, destination, calldata, or value and MUST NOT approve a pending signature. Use preflight_transaction for every pending call. LIMITATIONS: Explains a single function's intent and comprehension risk; it does not run the danger-primitive scan (use check_descriptor / scan_contract for that) and does not simulate on-chain effects. Returns found=false with the available function names if the name is not in the descriptor. EXAMPLE: explain_signature({"descriptor": {…}, "function": "approve"}) -> {"found": true, "tier": "HIGH", "sentence": "You let … spend up to …", "reason": "an ERC-20 allowance lets the spender pull tokens…"}
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| function | No | Exact function NAME to explain (not the full signature), e.g. 'approve' or 'setApprovalForAll'. | |
| signature | No | Preferred canonical signature, e.g. 'approve(address,uint256)'; required for overloads. | |
| descriptor | Yes | The ERC-7730 descriptor JSON. |