Skip to main content
Glama

OpenZeppelin Cairo Contracts

Cairo ERC20

cairo-erc20

Make a fungible token per the ERC-20 standard.

Returns the source code of the generated contract, formatted in a Markdown code block. Does not write to disk.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
infoNoMetadata about the contract and author
nameYesThe name of the contract
votesNoWhether to keep track of historical balances for voting in on-chain governance, with a way to delegate one's voting power to a trusted account.
accessNo
macrosNoThe macros to use for the contract.
symbolYesThe short symbol for the token
appNameNoRequired when votes is enabled, for hashing and signing typed structured data. Name for domain separator implementing SNIP12Metadata trait. Prevents two applications from producing the same hash.
premintNoThe number of tokens to premint for the deployer.
wrapperNoWhether to include ERC20Wrapper functionality for depositing and withdrawing an underlying token.
burnableNoWhether token holders will be able to destroy their tokens
decimalsNoThe number of decimals to use for the contract. Defaults to 18.
mintableNoWhether privileged accounts will be able to create more supply or emit more tokens
pausableNoWhether privileged accounts will be able to pause specifically marked functionality. Useful for emergency response.
flashmintNoConfiguration object for the ERC20FlashMint extension (ERC-3156 flash loans). The extension is included only when `enabled` is true; the other fields tune the loan limit, fee, and fee destination.
appVersionNoRequired when votes is enabled, for hashing and signing typed structured data. Version for domain separator implementing SNIP12Metadata trait. Prevents two versions of the same application from producing the same hash.
upgradeableNoWhether the smart contract is upgradeable.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • addedInput schema / properties / flashmint
      Added value: +{
      +  "description": "Configuration object for the ERC20FlashMint extension (ERC-3156 flash loans). The extension is included only when `enabled` is true; the other fields tune the loan limit, fee, and fee destination.",
      +  "properties": {
      +    "enabled": {
      +      "description": "Whether to include ERC20FlashMint functionality, allowing flash loans of tokens compliant with ERC-3156.",
      +      "type": "boolean"
      +    },
      +    "feeDestination": {
      +      "default": "burn",
      +      "description": "Where the flash loan fee is sent. 'burn' sends it to the zero address (effectively burning it). 'fee_receiver' adds a constructor argument that the deployer must populate with a non-zero address; the address is stored on-chain and validated at deploy time.",
      +      "enum": [
      +        "burn",
      +        "fee_receiver"
      +      ],
      +      "type": "string"
      +    },
      +    "feeMode": {
      +      "default": "percent",
      +      "description": "Mode for the flash loan fee. 'percent' charges a percentage of the loaned amount (value provided via feePercent). 'custom' emits a TODO stub for the caller to implement.",
      +      "enum": [
      +        "percent",
      +        "custom"
      +      ],
      +      "type": "string"
      +    },
      +    "feePercent": {
      +      "default": "0",
      +      "description": "Percentage of the loan amount charged as the flash loan fee. Number between 0 and 100, fractional values supported (e.g. \"0.0013725\"). Used when feeMode is 'percent'. Defaults to 0 (no fee).",
      +      "type": "string"
      +    },
      +    "maxAmount": {
      +      "default": "max",
      +      "description": "Maximum amount of tokens that can be flash-loaned in a single call. Use the literal string \"max\" to inherit the default (the maximum representable u256 minus the current total supply), or a non-negative number in the token's decimal units to set a custom cap. A value of 0 effectively disables flash loans without removing the extension.",
      +      "type": "string"
      +    }
      +  },
      +  "required": [
      +    "enabled"
      +  ],
      +  "type": "object"
      +}
  2. Changed1 schema field changed
    • addedInput schema / properties / wrapper
      Added value: +{
      +  "description": "Whether to include ERC20Wrapper functionality for depositing and withdrawing an underlying token.",
      +  "type": "boolean"
      +}
  3. Changed8 schema fields changed
    • addedInput schema / properties / access / properties / darDefaultDelayIncrease / default
      Added value: +"5 days"
    • changedInput schema / properties / access / properties / darDefaultDelayIncrease / description
      Previous value: -"The default delay increase in seconds for the default admin role (in case Roles (Default Admin Rules) is used)."New value: +"The default delay increase for the default admin role (in case Roles (Default Admin Rules) is used). Default is \"5 days\"."
    • addedInput schema / properties / access / properties / darInitialDelay / default
      Added value: +"1 day"
    • changedInput schema / properties / access / properties / darInitialDelay / description
      Previous value: -"The initial delay for the default admin role (in case Roles (Default Admin Rules) is used)."New value: +"The initial delay for the default admin role (in case Roles (Default Admin Rules) is used). Default is \"1 day\"."
    • addedInput schema / properties / access / properties / darMaxTransferDelay / default
      Added value: +"30 days"
    • changedInput schema / properties / access / properties / darMaxTransferDelay / description
      Previous value: -"The maximum delay in seconds for a default admin transfer (in case Roles (Default Admin Rules) is used)."New value: +"The maximum delay for a default admin transfer (in case Roles (Default Admin Rules) is used). Default is \"30 days\"."
    • changedInput schema / properties / access / required
      Previous value: -[
      -  "type",
      -  "darInitialDelay",
      -  "darDefaultDelayIncrease",
      -  "darMaxTransferDelay"
      -]New value: +[
      +  "type"
      +]
    • changedInput schema / required
      Previous value: -[
      -  "name",
      -  "symbol",
      -  "access"
      -]New value: +[
      +  "name",
      +  "symbol"
      +]
  4. First observed

TDQS

A3.8/5.0
Behavior4/5

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

With no annotations provided, the description carries the behavioral disclosure burden. It usefully states that the tool returns source code in a Markdown code block and explicitly notes it does not write to disk, which clarifies side effects and output format. It does not mention every edge behavior, but the key safety-relevant behavior is disclosed.

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?

The description is only two sentences and every sentence adds value: the first states the purpose, and the second clarifies output format and side-effect behavior. It is front-loaded with the core purpose and contains no fluff.

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?

Given the tool's complexity, the description covers the essential context: what it generates, how the result is returned, and that it has no filesystem side effect. The extensive input schema covers parameter details, so the description does not need to repeat them. A brief note about language/platform fit could improve completeness, but the tool name supplies that context.

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 94%, so the parameter schemas already carry detailed explanations for most options. The tool description itself adds no parameter-level semantics, which is acceptable but does not go beyond what the schema provides.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description states a specific action and resource: 'Make a fungible token per the ERC-20 standard.' This clearly differentiates it from non-fungible siblings like cairo-erc721 and cairo-erc1155. However, it does not explicitly distinguish it from other ERC-20 sibling tools in different languages, relying on the tool name for that distinction.

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

Usage Guidelines3/5

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

The usage context is implied: use this tool when an ERC-20 fungible token contract source is needed. There is no explicit guidance about when to prefer cairo-erc20 over solidity-erc20, stylus-erc20, or tron-trc20, nor any stated exclusions or alternatives.

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