Skip to main content
Glama
sand0vvv

mayan-mcp

by sand0vvv

Check an ERC20 allowance for the Mayan forwarder

check_allowance
Read-onlyIdempotent

Check the ERC20 token allowance that the Mayan forwarder has for an owner address on a given chain, and verify if it covers a required swap amount.

Instructions

Read how much of an ERC20 token the Mayan forwarder is currently allowed to spend on someone's behalf, and whether that covers a swap. Read-only: performs an eth_call and nothing else. Requires MAYAN_RPC_URL_ to be configured for the chain.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
chainYesEVM chain the token lives on.
decimalsNoToken decimals, purely to render the amounts readably.
owner_addressYesAddress that would be spending the token.
token_addressYesERC20 token contract address.
required_base_unitsNoAmount the swap needs, in base units, to compare against. From build_swap.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
chainYes
ownerYes
spenderYesAlways the Mayan forwarder, from the SDK constant.
sufficientYesNull when no required amount was given.
token_addressYes
approve_neededYes
required_base_unitsYes
allowance_base_unitsYes
Behavior5/5

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

Annotations already declare readOnlyHint, idempotentHint, etc. The description adds that it performs an eth_call and requires MAYAN_RPC_URL_<CHAIN>, providing valuable context beyond the annotations without contradiction.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Two sentences, no unnecessary words, front-loaded with core purpose. Every sentence adds value.

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 existence of an output schema and thorough annotations, the description covers the main behavioral aspects (read-only, RPC requirement) and is complete for an agent to decide when and how to invoke the tool.

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 100%, so baseline is 3. The description adds meaning by explaining that required_base_units comes from build_swap and that owner_address is the spender, enhancing understanding beyond the 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 clearly states the tool reads an ERC20 allowance for the Mayan forwarder and checks if it covers a swap. It distinguishes itself from sibling tools (e.g., build_swap, get_quote) by focusing on a read-only allowance check.

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 specifies the tool is read-only and requires RPC URL configuration. While it implies pre-swap usage, it does not explicitly state when not to use it or compare directly with siblings, but the context is clear.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/sand0vvv/mayan-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server