Skip to main content
Glama

Get Token Approvals

get_token_approvals
Read-only

Block-accurate audit of ERC-20 allowances for a wallet across curated DeFi spenders (Uniswap, Aave, Compound, 1inch, 0x, OpenSea) on Ethereum or Base. Flags unlimited approvals by risk level (high=unknown spender, medium=trusted protocol, low=bounded). Use before swaps or after security incidents to detect active exploit vectors.

Use when: Use for a free, block-accurate Ethereum/Base check of an address's exposure to the curated spender list. For broad all-chain spender discovery, hacked/abandoned flags, or NFT-adjacent exposure use get_wallet_approvals instead.

Limitations: Covers only the tracked-asset registry and curated spenders — untracked tokens and custom spenders are excluded. Does not inspect NFT approvals or off-chain Permit2 sub-permits. An error field marks results as incomplete rather than clean.

Alternatives: get_wallet_approvals, assess_counterparty_risk

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
tokensNoToken contract addresses to check (max 50). Defaults to the platform tracked token list.
chain_idNoChain ID (1=Ethereum, 8453=Base)
spendersNoSpender contract addresses to check (max 20). Defaults to the curated DeFi protocol list.
wallet_addressYesWallet address (0x…)

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
noteYes
errorNo
chain_idYes
approvalsYes
risk_summaryYes
wallet_addressYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed17 schema fields changed
    • removedInput schema / additionalProperties
      Removed value: -false
    • addedInput schema / properties / chain_id / title
      Added value: +"Chain Id"
    • addedInput schema / properties / spenders / title
      Added value: +"Spenders"
    • addedInput schema / properties / tokens / title
      Added value: +"Tokens"
    • addedInput schema / properties / wallet_address / title
      Added value: +"Wallet Address"
    • addedInput schema / title
      Added value: +"mcp_get_token_approvalsArguments"
    • addedOutput schema / $defs
      Added value: +{
      +  "ApprovalEntry": {
      +    "properties": {
      +      "allowance_formatted": {
      +        "title": "Allowance Formatted",
      +        "type": "string"
      +      },
      +      "allowance_raw": {
      +        "title": "Allowance Raw",
      +        "type": "string"
      +      },
      +      "is_permit2": {
      +        "title": "Is Permit2",
      +        "type": "boolean"
      +      },
      +      "is_unlimited": {
      +        "title": "Is Unlimited",
      +        "type": "boolean"
      +      },
      +      "risk_level": {
      +        "enum": [
      +          "low",
      +          "medium",
      +          "high"
      +        ],
      +        "title": "Risk Level",
      +        "type": "string"
      +      },
      +      "spender_address": {
      +        "title": "Spender Address",
      +        "type": "string"
      +      },
      +      "spender_name": {
      +        "anyOf": [
      +          {
      +            "type": "string"
      +          },
      +          {
      +            "type": "null"
      +          }
      +        ],
      +        "title": "Spender Name"
      +      },
      +      "token_address": {
      +        "title": "Token Address",
      +        "type": "string"
      +      },
      +      "token_symbol": {
      +        "anyOf": [
      +          {
      +            "type": "string"
      +          },
      +          {
      +            "type": "null"
      +          }
      +        ],
      +        "title": "Token Symbol"
      +      }
      +    },
      +    "required": [
      +      "token_symbol",
      +      "token_address",
      +      "spender_name",
      +      "spender_address",
      +      "allowance_raw",
      +      "allowance_formatted",
      +      "is_unlimited",
      +      "is_permit2",
      +      "risk_level"
      +    ],
      +    "title": "ApprovalEntry",
      +    "type": "object"
      +  },
      +  "RiskSummary": {
      +    "properties": {
      +      "high_risk_approvals": {
      +        "title": "High Risk Approvals",
      +        "type": "integer"
      +      },
      +      "total_approvals": {
      +        "title": "Total Approvals",
      +        "type": "integer"
      +      },
      +      "unknown_spenders": {
      +        "title": "Unknown Spenders",
      +        "type": "integer"
      +      },
      +      "unlimited_approvals": {
      +        "title": "Unlimited Approvals",
      +        "type": "integer"
      +      }
      +    },
      +    "required": [
      +      "total_approvals",
      +      "unlimited_approvals",
      +      "high_risk_approvals",
      +      "unknown_spenders"
      +    ],
      +    "title": "RiskSummary",
      +    "type": "object"
      +  }
      +}
    • addedOutput schema / properties / approvals / items / $ref
      Added value: +"#/$defs/ApprovalEntry"
    • removedOutput schema / properties / approvals / items / properties
      Removed value: -{
      -  "allowance_formatted": {
      -    "title": "Allowance Formatted",
      -    "type": "string"
      -  },
      -  "allowance_raw": {
      -    "title": "Allowance Raw",
      -    "type": "string"
      -  },
      -  "is_permit2": {
      -    "title": "Is Permit2",
      -    "type": "boolean"
      -  },
      -  "is_unlimited": {
      -    "title": "Is Unlimited",
      -    "type": "boolean"
      -  },
      -  "risk_level": {
      -    "enum": [
      -      "low",
      -      "medium",
      -      "high"
      -    ],
      -    "title": "Risk Level",
      -    "type": "string"
      -  },
      -  "spender_address": {
      -    "title": "Spender Address",
      -    "type": "string"
      -  },
      -  "spender_name": {
      -    "anyOf": [
      -      {
      -        "type": "string"
      -      },
      -      {
      -        "type": "null"
      -      }
      -    ],
      -    "title": "Spender Name"
      -  },
      -  "token_address": {
      -    "title": "Token Address",
      -    "type": "string"
      -  },
      -  "token_symbol": {
      -    "anyOf": [
      -      {
      -        "type": "string"
      -      },
      -      {
      -        "type": "null"
      -      }
      -    ],
      -    "title": "Token Symbol"
      -  }
      -}
    • removedOutput schema / properties / approvals / items / required
      Removed value: -[
      -  "token_symbol",
      -  "token_address",
      -  "spender_name",
      -  "spender_address",
      -  "allowance_raw",
      -  "allowance_formatted",
      -  "is_unlimited",
      -  "is_permit2",
      -  "risk_level"
      -]
    • removedOutput schema / properties / approvals / items / title
      Removed value: -"ApprovalEntry"
    • removedOutput schema / properties / approvals / items / type
      Removed value: -"object"
    • addedOutput schema / properties / risk_summary / $ref
      Added value: +"#/$defs/RiskSummary"
    • removedOutput schema / properties / risk_summary / properties
      Removed value: -{
      -  "high_risk_approvals": {
      -    "title": "High Risk Approvals",
      -    "type": "integer"
      -  },
      -  "total_approvals": {
      -    "title": "Total Approvals",
      -    "type": "integer"
      -  },
      -  "unknown_spenders": {
      -    "title": "Unknown Spenders",
      -    "type": "integer"
      -  },
      -  "unlimited_approvals": {
      -    "title": "Unlimited Approvals",
      -    "type": "integer"
      -  }
      -}
    • removedOutput schema / properties / risk_summary / required
      Removed value: -[
      -  "total_approvals",
      -  "unlimited_approvals",
      -  "high_risk_approvals",
      -  "unknown_spenders"
      -]
    • removedOutput schema / properties / risk_summary / title
      Removed value: -"RiskSummary"
    • removedOutput schema / properties / risk_summary / type
      Removed value: -"object"
  2. First observed

TDQS

A4.9/5.0
Behavior5/5

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

Annotations only declare readOnlyHint=true, but the description adds extensive behavioral context beyond that: the audit is block-accurate, flags unlimited approvals by risk level, covers only tracked assets/curated spenders, does not inspect NFT or Permit2 approvals, and uses an error field to mark incomplete results rather than returning a clean bill of health. No contradiction with the readOnly annotation exists.

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 denser than necessary and has slight redundancy ('block-accurate' appears twice, and 'use get_wallet_approvals instead' appears in both the Use-when and Alternatives sections). However, the labeled sections — Use when, Limitations, Alternatives — make it scannable and every sentence adds useful selection or behavioral detail.

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

Completeness5/5

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

Given the tool's complexity, the description covers what the tool audits, when to use it, what it misses, and how errors are signaled, while the output schema handles return-value structure. All parameter meanings and defaults are available in the schema, and the limitations are explicit. An agent has everything needed to invoke it correctly.

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

Parameters5/5

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

The schema already documents all four parameters (100% coverage), and the description goes further by adding useful semantics: curated spender names, the risk-level classification, max allowances of 50 tokens and 20 spenders, and the exclusion of untracked tokens/custom spenders. This materially helps an agent choose correct values beyond the raw schema.

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 opens with a precise verb+resource: 'block-accurate audit of ERC-20 allowances for a wallet across curated DeFi spenders.' It names the exact protocols, chains, and risk classification behavior, and explicitly contrasts itself with the sibling get_wallet_approvals, so an agent can distinguish it without opening schemas.

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

Usage Guidelines5/5

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

It gives concrete triggers ('Use before swaps or after security incidents'), a direct 'Use when' statement, and an explicit alternative: 'For broad all-chain spender discovery... use get_wallet_approvals instead.' The 'Alternatives' section reinforces routing with assess_counterparty_risk. This leaves no ambiguity about when to select this tool.

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