Skip to main content
Glama

evm_generate_permit

Generate an EIP-2612 permit signature for gasless ERC20 token approvals, enabling off-chain approval and meta-transactions without an on-chain approve() transaction.

Instructions

Generate EIP-2612 permit signature for gasless token approvals.

Creates off-chain approval signature that can be used instead of on-chain approve() transactions. Enables gasless user experiences and meta-transactions.

PARAMETERS:

  • chain: Target EVM chain

  • tokenAddress: ERC20 token with EIP-2612 support

  • owner: Token owner address

  • spender: Address to approve

  • value: Approval amount in token units

  • privateKey: Owner's private key for signing

  • deadline: Unix timestamp expiry (optional, default: 1 hour)

EIP-2612 PERMIT: • No approve() transaction needed • Saves gas fees for users • One-time use signature • Can be submitted by relayers • Signature valid until deadline

Returns permit signature (v,r,s), transaction data, and usage examples.

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": {
      "chain": "<chain>",
      "tokenAddress": "<tokenAddress>",
      "owner": "<owner>",
      "spender": "<spender>",
      "value": "<value>",
      "privateKey": "<privateKey>"
    },
    "name": "evm_generate_permit"
  }
}

Input Schema

NameRequiredDescriptionDefault
chainYes
ownerYesToken owner address
valueYesApproval amount
spenderYesAddress to approve
deadlineNoUnix timestamp deadline
privateKeyYesOwner private key
tokenAddressYesERC20 token address (must support EIP-2612)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

A4.3/5.0
Behavior4/5

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

With no annotations, the description carries the full burden and does well: it discloses that the signature is off-chain, one-time-use, relayer-submittable, and valid only until deadline, and it names the return payload (v,r,s plus transaction data). It omits the security-relevant behavior around handling the owner's private key and whether anything is broadcast or stored, which matters for a signing operation.

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?

Front-loaded with the core purpose, then structured into parameters and a permit-behavior bullet list, which is easy to scan. The bullet list partially repeats the opening paragraph ('no approve() transaction needed', 'signature valid until deadline'), costing some tightness.

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 7-parameter signing tool with no output schema or annotations, the description covers what is produced, the time-bounded nature of the signature, and the gasless rationale. It leaves gaps an agent would want: private-key handling guarantees, per-chain permit domain expectations, and failure behavior for non-EIP-2612 tokens.

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

Parameters4/5

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

Schema coverage is 86%, so the baseline is 3, but the description adds genuine value beyond the schema: the deadline's default of one hour and that value is expressed in token units. It restates some schema text (owner, spender, tokenAddress) without adding further constraint detail such as address formats.

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?

States a specific verb and resource ('Generate EIP-2612 permit signature') and immediately scopes it as an off-chain alternative to on-chain approve() transactions, which cleanly separates it from the approve/broadcast siblings. An agent can tell what this produces (v,r,s signature) without opening the 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?

Gives clear context for use: gasless approvals, meta-transactions, relayer submission, and substituting for approve(). It also implies a prerequisite ('ERC20 token with EIP-2612 support'). It stops short of explicit when-not-to-use guidance, such as what to do for tokens lacking EIP-2612 or when an on-chain approval is still required.

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

Deploy Server

Other Tools