Skip to main content
Glama

ERC-7715 Session-Key, Smart-Account & AI Agent Spend Cap MCP

Build ERC-7715 Session Key & Coinbase SpendPermission Payloads

build_erc7715_and_coinbase_spend_permission
Read-onlyIdempotent

Generates non-custodial ERC-7715 wallet_grantPermissions JSON-RPC and Coinbase SpendPermissionManager EIP-712 structs to bound AI agent daily/per-tx USDC spending.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "build_erc7715_and_coinbase_spend_permission"
  }
}

Input Schema

NameRequiredDescriptionDefault
chainIdNoEVM chain ID ('8453' Base, '42161' Arbitrum, '1' Ethereum, '10' Optimism, '137' Polygon)
maxPerTxUsdcNoMax per-transaction USDC cap (default 5)
smartAccountNoOwner smart account address (0x...)
agentSessionSignerNoAgent session key address (0x...)
dailyAllowanceUsdcNoMax daily USDC allowance (default 25)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A3.9/5.0
Behavior3/5

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

The annotations already declare readOnly, idempotent, non-destructive, and open-world behavior, so the safety profile is covered. The description adds one genuinely new trait, 'non-custodial', which signals that no keys are held, but it never explicitly says that this tool only produces payloads and performs no on-chain submission, which is the key behavioral distinction an agent needs.

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?

It is one front-loaded sentence with no filler, and the artifact names come first. It is dense, however: several technical terms are packed into a single clause, which is a minor readability cost rather than wasted space.

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 five-parameter, all-optional payload builder with full schema coverage and no output schema, the definition covers the input side well because the schema handles parameter details. The gap is the return value: the description never states whether one JSON object or multiple are returned, though the named artifact types partly imply the shape.

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 coverage is 100% and all five parameters are documented with names, address formats, and defaults, so a baseline of 3 is appropriate. The description phrase 'daily/per-tx USDC spending' ties dailyAllowanceUsdc and maxPerTxUsdc together conceptually, but it says nothing about chainId or the smartAccount/agentSessionSigner roles beyond what the schema already conveys.

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 specific verb ('Generates') plus two precise artifacts: the ERC-7715 wallet_grantPermissions JSON-RPC payload and the Coinbase SpendPermissionManager EIP-712 struct. That level of specificity is enough to separate it from the planning, simulation, audit, and verification siblings, none of which produce permission payloads.

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 tool's reason for existing is stated explicitly ('to bound AI agent daily/per-tx USDC spending'), so an agent knows the situation that should trigger it. It stops short of naming alternatives such as simulate_evm_tx_and_spend_firewall or spelling out when not to call it, which keeps it below 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.