Skip to main content
Glama
OpenZeppelin

OpenZeppelin Contracts MCP Server

Official
by OpenZeppelin

stylus-erc1155

Generate ERC-1155 smart contract source code with customizable features like burnable tokens and supply tracking for creating non-fungible tokens.

Instructions

Make a non-fungible token per the ERC-1155 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
supplyNoWhether to keep track of total supply of tokens
infoNoMetadata about the contract and author

Implementation Reference

  • Handler function that constructs ERC1155Options from inputs and generates Rust code using erc1155.print(opts), returning it as text content.
    async ({ name, burnable, supply, info }) => { const opts: ERC1155Options = { name, burnable, supply, info, }; return { content: [ { type: 'text', text: safePrintRustCodeBlock(() => erc1155.print(opts)), }, ], }; },
  • Zod schema for 'stylus-erc1155' tool parameters: name (required), burnable/supply (optional booleans), and common info.
    export const erc1155Schema = { name: z.string().describe(commonDescriptions.name), burnable: z.boolean().optional().describe(commonDescriptions.burnable), supply: z.boolean().optional().describe(stylusERC1155Descriptions.supply), ...commonSchema, } as const satisfies z.ZodRawShape;
  • Registers the 'stylus-erc1155' tool on McpServer with name, detailed prompt from stylusPrompts.ERC1155, erc1155Schema, and the handler function.
    export function registerStylusERC1155(server: McpServer): RegisteredTool { return server.tool( 'stylus-erc1155', makeDetailedPrompt(stylusPrompts.ERC1155), erc1155Schema, async ({ name, burnable, supply, info }) => { const opts: ERC1155Options = { name, burnable, supply, info, }; return { content: [ { type: 'text', text: safePrintRustCodeBlock(() => erc1155.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