Skip to main content
Glama
OpenZeppelin

OpenZeppelin Contracts MCP Server

Official
by OpenZeppelin

stylus-erc1155

Generate ERC-1155 non-fungible token contract source code in Markdown format. Specify token name, burnability, supply tracking, and metadata. No file writes, direct code return for customization.

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
burnableNoWhether token holders will be able to destroy their tokens
infoNoMetadata about the contract and author
nameYesThe name of the contract
supplyNoWhether to keep track of total supply of tokens

Implementation Reference

  • The handler function that executes the tool logic: constructs ERC1155Options from inputs and generates Rust code using erc1155.print(opts) from @openzeppelin/wizard-stylus.
    async ({ name, burnable, supply, info }) => { const opts: ERC1155Options = { name, burnable, supply, info, }; return { content: [ { type: 'text', text: safePrintRustCodeBlock(() => erc1155.print(opts)), }, ], }; },
  • Zod schema defining the input shape for the tool: name (string), burnable (optional boolean), supply (optional boolean), and common info fields.
    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;
  • The registration function that adds the 'stylus-erc1155' tool to the MCP server, specifying name, prompt, schema, and handler.
    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