Skip to main content
Glama

撤销 agent 授权

build_agent_revoke
Read-only

Build an unsigned transaction for a user wallet to sign that revokes an agent's trading permissions, resetting usage limits, expiry, and gas budget; optionally clear USDC/WBNB allowances.

Instructions

agent 专用通道:生成用户主钱包要签的撤销交易,立即收回 agent 的交易权限(次数、到期、gas 报销一起清零)。可选同时把 USDC / WBNB 授权额度清零。

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": {
      "account": "<account>",
      "agent": "<agent>",
      "resetUsdcAllowance": "<resetUsdcAllowance>",
      "resetGasBudget": "<resetGasBudget>"
    },
    "name": "build_agent_revoke"
  }
}

Input Schema

NameRequiredDescriptionDefault
agentYes要撤销的 agent 地址
accountYes用户钱包地址(交易的签名人和收款人)
resetGasBudgetYes同时把 WBNB gas 预算授权清零
resetUsdcAllowanceYes同时把 USDC 授权清零(网页下单时会重新请求授权)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

A4.1/5.0
Behavior4/5

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

The annotations only mark this tool as readOnly and non-destructive, so they do not explain that the tool builds an unsigned transaction that the user's main wallet must sign, nor that the revocation takes effect only after signing; those points are useful context beyond the annotations. The description also discloses side effects that happen after signing (quota, expiry, and gas reimbursement cleared). One minor tension remains: destructiveHint=false is set even though the resulting transaction removes permissions, but because the tool itself is a transaction builder, the description does not contradict the annotation outright.

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 description is two tight sentences that lead with the channel and action, then list the side effects in one parenthetical. Nothing is wasted, though 'agent 专用通道' plus '撤销 agent 授权' partially repeats the title.

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?

For a 4-parameter builder with full schema coverage and no output schema, the description covers purpose and effects well. It would be stronger if it said what the response contains (an unsigned transaction payload) and what the caller should do next, but the essential call-shaping information is present.

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

Parameters3/5

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

Schema description coverage is 100%, so the schema already defines all four parameters, and the description only restates their effect in aggregate (USDC/WBNB allowances zeroed). That aggregate phrasing also sits slightly awkwardly against the fact that both reset flags are required with defaults, while the description calls them optional. Baseline 3 applies.

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 names a concrete verb and resource ('生成…撤销交易', revoking the agent's trading permissions) and immediately enumerates the scope being zeroed out (次数、到期、gas 报销). That makes it easy to tell apart from the opposite sibling build_agent_authorize without opening either schema.

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?

The description makes the usage context explicit: it is the agent-dedicated path for revoking access, and the optional USDC/WBNB allowance resets are explained. What is missing is any stated alternative or prerequisite, for example checking status via get_agent_access first, or saying that this tool is not the path for non-agent revocations.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.