Skip to main content
Glama
OpenZeppelin

OpenZeppelin Contracts MCP Server

Official
by OpenZeppelin

solidity-erc1155

Generate ERC-1155 smart contract source code for creating semi-fungible or non-fungible tokens with customizable features like burnable, pausable, and upgradeable options.

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
uriYesThe location of the metadata for the token. Clients will replace any instance of {id} in this string with the tokenId.
burnableNoWhether token holders will be able to destroy their tokens
pausableNoWhether privileged accounts will be able to pause specifically marked functionality. Useful for emergency response.
mintableNoWhether privileged accounts will be able to create more supply or emit more tokens
supplyNoWhether to keep track of total supply of tokens
updatableUriNoWhether privileged accounts will be able to set a new URI for all token types
accessNoThe 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. Managed enables a central contract to define a policy that allows certain callers to access certain functions.
upgradeableNoWhether the smart contract is upgradeable. Transparent uses more complex proxy with higher overhead, requires less changes in your contract. Can also be used with beacons. UUPS uses simpler proxy with less overhead, requires including extra code in your contract. Allows flexibility for authorizing upgrades.
infoNoMetadata about the contract and author

Implementation Reference

  • Handler function that executes the tool: constructs ERC1155Options from inputs, generates Solidity contract code using OpenZeppelin Wizard's erc1155.print(), and formats it safely as text content.
    async ({ name, uri, burnable, pausable, mintable, supply, updatableUri, access, upgradeable, info }) => {
      const opts: ERC1155Options = {
        name,
        uri,
        burnable,
        pausable,
        mintable,
        supply,
        updatableUri,
        access,
        upgradeable,
        info,
      };
      return {
        content: [
          {
            type: 'text',
            text: safePrintSolidityCodeBlock(() => erc1155.print(opts)),
          },
        ],
      };
    },
  • Zod schema object defining the input parameters and validation for the solidity-erc1155 tool.
    export const erc1155Schema = {
      name: z.string().describe(commonDescriptions.name),
      uri: z.string().describe(solidityERC1155Descriptions.uri),
      burnable: z.boolean().optional().describe(commonDescriptions.burnable),
      pausable: z.boolean().optional().describe(commonDescriptions.pausable),
      mintable: z.boolean().optional().describe(commonDescriptions.mintable),
      supply: z.boolean().optional().describe(solidityERC1155Descriptions.supply),
      updatableUri: z.boolean().optional().describe(solidityERC1155Descriptions.updatableUri),
      ...commonSchema,
    } as const satisfies z.ZodRawShape;
  • Registration function that registers the 'solidity-erc1155' tool on the MCP server with prompt, schema, and handler.
    export function registerSolidityERC1155(server: McpServer): RegisteredTool {
      return server.tool(
        'solidity-erc1155',
        makeDetailedPrompt(solidityPrompts.ERC1155),
        erc1155Schema,
        async ({ name, uri, burnable, pausable, mintable, supply, updatableUri, access, upgradeable, info }) => {
          const opts: ERC1155Options = {
            name,
            uri,
            burnable,
            pausable,
            mintable,
            supply,
            updatableUri,
            access,
            upgradeable,
            info,
          };
          return {
            content: [
              {
                type: 'text',
                text: safePrintSolidityCodeBlock(() => erc1155.print(opts)),
              },
            ],
          };
        },
      );
    }
  • Higher-level registration function that registers all Solidity tools, including ERC1155 via getRegisterFunctions.
    export function registerSolidityTools(server: McpServer) {
      Object.values(getRegisterFunctions(server)).forEach(registerTool => {
        registerTool(server);
      });
    }
  • Invocation of Solidity tools registration during server creation.
    registerSolidityTools(server);
Behavior3/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 adds some context: it returns source code in a Markdown code block and does not write to disk, which clarifies output format and a non-destructive operation. However, it lacks details on potential side effects, error conditions, or performance characteristics like rate limits, which are important for a code generation tool with multiple parameters.

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 and well-structured with only two sentences. The first sentence states the core purpose, and the second adds crucial behavioral details about output format and disk interaction. Every word earns its place, with no redundancy or unnecessary elaboration, making it easy to parse quickly.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the complexity (10 parameters, nested objects) and lack of annotations or output schema, the description is somewhat complete but has gaps. It covers the basic purpose and output format, but doesn't address error handling, example usage, or how the generated code integrates with other tools. For a tool with rich parameters and no structured output info, more context on typical use cases or limitations would enhance completeness.

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?

The input schema has 100% description coverage, providing detailed explanations for all 10 parameters. The description does not add any parameter-specific information beyond what the schema already documents, such as explaining how parameters interact or default behaviors. Since schema coverage is high, the baseline score of 3 is appropriate, as the description doesn't compensate with additional semantic insights.

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 clearly states the tool's purpose: 'Make a non-fungible token per the ERC-1155 standard.' It specifies the verb ('Make'), resource ('non-fungible token'), and standard ('ERC-1155'). However, it doesn't explicitly differentiate from sibling tools like 'solidity-erc721' or 'cairo-erc1155', which likely generate similar tokens in different languages or standards.

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 by stating it generates contract source code for ERC-1155 tokens, but provides no explicit guidance on when to use this tool versus alternatives like 'solidity-erc721' for different token standards or 'cairo-erc1155' for a different programming language. The mention of 'Does not write to disk' hints at a limitation, but doesn't offer clear alternatives 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