Skip to main content
Glama
OpenZeppelin

OpenZeppelin Contracts MCP Server

Official
by OpenZeppelin

stylus-erc721

Generate ERC-721 compliant NFT smart contracts using OpenZeppelin libraries. Configure token properties like burnability and enumerability, then receive formatted source code.

Instructions

Make a non-fungible token per the ERC-721 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
nameYesThe name of the contract
burnableNoWhether token holders will be able to destroy their tokens
enumerableNoWhether to allow on-chain enumeration of all tokens or those owned by an account. Increases gas cost of transfers.
infoNoMetadata about the contract and author

Implementation Reference

  • The handler function that executes the tool logic: takes input options and generates the ERC721 Stylus Rust code using erc721.print.
    async ({ name, burnable, enumerable, info }) => {
      const opts: ERC721Options = {
        name,
        burnable,
        enumerable,
        info,
      };
      return {
        content: [
          {
            type: 'text',
            text: safePrintRustCodeBlock(() => erc721.print(opts)),
          },
        ],
      };
    },
  • Zod schema for input validation of the stylus-erc721 tool parameters.
    export const erc721Schema = {
      name: z.string().describe(commonDescriptions.name),
      burnable: z.boolean().optional().describe(commonDescriptions.burnable),
      enumerable: z.boolean().optional().describe(stylusERC721Descriptions.enumerable),
      ...commonSchema,
    } as const satisfies z.ZodRawShape;
  • Registration of the 'stylus-erc721' tool with the MCP server, including name, prompt, schema, and handler.
    export function registerStylusERC721(server: McpServer): RegisteredTool {
      return server.tool(
        'stylus-erc721',
        makeDetailedPrompt(stylusPrompts.ERC721),
        erc721Schema,
        async ({ name, burnable, enumerable, info }) => {
          const opts: ERC721Options = {
            name,
            burnable,
            enumerable,
            info,
          };
          return {
            content: [
              {
                type: 'text',
                text: safePrintRustCodeBlock(() => erc721.print(opts)),
              },
            ],
          };
        },
      );
    }
Behavior4/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It clearly states the tool generates contract source code in Markdown format and doesn't write to disk, which are important behavioral traits. However, it doesn't mention potential side effects like gas costs (implied by 'enumerable' parameter), error conditions, or rate limits, leaving some gaps for a code-generation tool.

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 extremely concise (three sentences) and front-loaded with the core purpose. Every sentence adds value: first states what it does, second specifies the return format, third clarifies what it doesn't do. There's zero wasted text or redundancy.

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 (generating ERC-721 contracts with multiple configuration options) and no output schema, the description provides good context about what it returns and what it doesn't do. However, it could be more complete by mentioning the programming language (implied as Stylus from tool name) or typical use cases. The absence of annotations means the description should ideally cover more behavioral aspects.

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 100%, so the schema already documents all 4 parameters thoroughly. The description doesn't add any parameter-specific information beyond what's in the schema. According to guidelines, when schema coverage is high (>80%), the baseline score is 3 even with no param info in the description.

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's purpose with specific verb ('Make') and resource ('non-fungible token per the ERC-721 standard'), and distinguishes it from siblings by specifying the ERC-721 standard. It also explicitly mentions what it returns ('source code of the generated contract, formatted in a Markdown code block') and what it doesn't do ('Does not write to disk').

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 description implies usage context by specifying 'per the ERC-721 standard' and mentioning it returns source code without writing to disk, which suggests it's for generating contract code rather than deployment. However, it lacks explicit guidance on when to use this tool versus alternatives like 'stylus-erc1155' or 'solidity-erc721', and doesn't mention prerequisites or exclusions.

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/OpenZeppelin/contracts-wizard'

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