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)), }, ], }; }, ); }

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