Skip to main content
Glama
OpenZeppelin

OpenZeppelin Contracts MCP Server

Official
by OpenZeppelin

Cairo ERC20

cairo-erc20

Generate a Cairo ERC-20 fungible token contract with configurable features such as minting, burning, pausing, voting, flash loans, and access control. Returns the source code as a Markdown block.

Instructions

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 changedv1.0.9
    • 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 changedv1.0.8
    • addedInput schema / properties / wrapper
      Added value: +{
      +  "description": "Whether to include ERC20Wrapper functionality for depositing and withdrawing an underlying token.",
      +  "type": "boolean"
      +}
  3. Changed6 schema fields changedv1.0.1
    • removedInput schema / properties / access / anyOf
      Removed value: -[
      -  {
      -    "const": "ownable",
      -    "type": "string"
      -  },
      -  {
      -    "const": "roles",
      -    "type": "string"
      -  }
      -]
    • removedInput schema / properties / access / description
      Removed value: -"The type of access control to provision. Ownable is a simple mechanism with a single account authorized for all privileged actions. Roles is a flexible mechanism with a separate role for each privileged action. A role can have many authorized accounts."
    • addedInput schema / properties / access / properties
      Added value: +{
      +  "darDefaultDelayIncrease": {
      +    "default": "5 days",
      +    "description": "The default delay increase for the default admin role (in case Roles (Default Admin Rules) is used). Default is \"5 days\".",
      +    "type": "string"
      +  },
      +  "darInitialDelay": {
      +    "default": "1 day",
      +    "description": "The initial delay for the default admin role (in case Roles (Default Admin Rules) is used). Default is \"1 day\".",
      +    "type": "string"
      +  },
      +  "darMaxTransferDelay": {
      +    "default": "30 days",
      +    "description": "The maximum delay for a default admin transfer (in case Roles (Default Admin Rules) is used). Default is \"30 days\".",
      +    "type": "string"
      +  },
      +  "type": {
      +    "anyOf": [
      +      {
      +        "anyOf": [
      +          {
      +            "anyOf": [
      +              {
      +                "const": "ownable",
      +                "type": "string"
      +              },
      +              {
      +                "const": "roles",
      +                "type": "string"
      +              }
      +            ]
      +          },
      +          {
      +            "const": "roles-dar",
      +            "type": "string"
      +          }
      +        ]
      +      },
      +      {
      +        "const": false,
      +        "type": "boolean"
      +      }
      +    ],
      +    "description": "The type of access control to provision. Ownable is a simple mechanism with a single account authorized for all privileged actions. Roles is a flexible mechanism with a separate role for each privileged action. A role can have many authorized accounts. Roles (Default Admin Rules) provides additional enforced security measures on top of standard Roles mechanism for managing the most privileged role: default admin."
      +  }
      +}
    • addedInput schema / properties / access / required
      Added value: +[
      +  "type"
      +]
    • addedInput schema / properties / access / type
      Added value: +"object"
    • addedInput schema / properties / macros
      Added value: +{
      +  "description": "The macros to use for the contract.",
      +  "properties": {
      +    "withComponents": {
      +      "description": "Whether to use the \"with_components\" macro for simplified contract structure.",
      +      "type": "boolean"
      +    }
      +  },
      +  "required": [
      +    "withComponents"
      +  ],
      +  "type": "object"
      +}
  4. Changed6 schema fields changedv1.0.0
    • removedInput schema / additionalProperties
      Removed value: -false
    • addedInput schema / properties / access / anyOf
      Added value: +[
      +  {
      +    "const": "ownable",
      +    "type": "string"
      +  },
      +  {
      +    "const": "roles",
      +    "type": "string"
      +  }
      +]
    • removedInput schema / properties / access / enum
      Removed value: -[
      -  "ownable",
      -  "roles"
      -]
    • removedInput schema / properties / access / type
      Removed value: -"string"
    • addedInput schema / properties / decimals
      Added value: +{
      +  "description": "The number of decimals to use for the contract. Defaults to 18.",
      +  "type": "string"
      +}
    • removedInput schema / properties / info / additionalProperties
      Removed value: -false
  5. 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.