Skip to main content
Glama
OpenZeppelin

OpenZeppelin Contracts MCP Server

Official
by OpenZeppelin

Cairo Custom

cairo-custom

Build a custom Cairo smart contract with your chosen name, access control, pause, upgrade, and license options. Receive the generated source code as Markdown, with no file written to disk.

Instructions

Make a custom smart contract.

Returns the source code of the generated contract, formatted in a Markdown code block. Does not write to disk.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
infoNoMetadata about the contract and author
nameYesThe name of the contract
accessNo
macrosNoThe macros to use for the contract.
pausableNoWhether privileged accounts will be able to pause specifically marked functionality. Useful for emergency response.
upgradeableNoWhether the smart contract is upgradeable.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed6 schema fields changedv1.0.1
    • removedInput schema / properties / access / anyOf
      Removed value: -[
      -  {
      -    "const": "ownable",
      -    "type": "string"
      -  },
      -  {
      -    "const": "roles",
      -    "type": "string"
      -  }
      -]
    • removedInput schema / properties / access / description
      Removed value: -"The 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."
    • addedInput schema / properties / access / properties
      Added value: +{
      +  "darDefaultDelayIncrease": {
      +    "default": "5 days",
      +    "description": "The default delay increase for the default admin role (in case Roles (Default Admin Rules) is used). Default is \"5 days\".",
      +    "type": "string"
      +  },
      +  "darInitialDelay": {
      +    "default": "1 day",
      +    "description": "The initial delay for the default admin role (in case Roles (Default Admin Rules) is used). Default is \"1 day\".",
      +    "type": "string"
      +  },
      +  "darMaxTransferDelay": {
      +    "default": "30 days",
      +    "description": "The maximum delay for a default admin transfer (in case Roles (Default Admin Rules) is used). Default is \"30 days\".",
      +    "type": "string"
      +  },
      +  "type": {
      +    "anyOf": [
      +      {
      +        "anyOf": [
      +          {
      +            "anyOf": [
      +              {
      +                "const": "ownable",
      +                "type": "string"
      +              },
      +              {
      +                "const": "roles",
      +                "type": "string"
      +              }
      +            ]
      +          },
      +          {
      +            "const": "roles-dar",
      +            "type": "string"
      +          }
      +        ]
      +      },
      +      {
      +        "const": false,
      +        "type": "boolean"
      +      }
      +    ],
      +    "description": "The 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. Roles (Default Admin Rules) provides additional enforced security measures on top of standard Roles mechanism for managing the most privileged role: default admin."
      +  }
      +}
    • addedInput schema / properties / access / required
      Added value: +[
      +  "type"
      +]
    • addedInput schema / properties / access / type
      Added value: +"object"
    • addedInput schema / properties / macros
      Added value: +{
      +  "description": "The macros to use for the contract.",
      +  "properties": {
      +    "withComponents": {
      +      "description": "Whether to use the \"with_components\" macro for simplified contract structure.",
      +      "type": "boolean"
      +    }
      +  },
      +  "required": [
      +    "withComponents"
      +  ],
      +  "type": "object"
      +}
  2. Changed5 schema fields changedv1.0.0
    • removedInput schema / additionalProperties
      Removed value: -false
    • addedInput schema / properties / access / anyOf
      Added value: +[
      +  {
      +    "const": "ownable",
      +    "type": "string"
      +  },
      +  {
      +    "const": "roles",
      +    "type": "string"
      +  }
      +]
    • removedInput schema / properties / access / enum
      Removed value: -[
      -  "ownable",
      -  "roles"
      -]
    • removedInput schema / properties / access / type
      Removed value: -"string"
    • removedInput schema / properties / info / additionalProperties
      Removed value: -false
  3. First observed

TDQS

A3.8/5.0
Behavior4/5

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

Even though annotations are absent, the description discloses critical behaviors: it returns source code, formats it as Markdown, and does not write to disk. This transparently signals a side-effect-free generation process. It stops short of mentioning more subtle behaviors (e.g., output length or dependency on network), but is strong for a code generator.

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 exceptionally concise: two sentences convey purpose, return format, and side-effect involvement. Every phrase adds value, with the key information front-loaded.

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?

For a code-generation tool, the description covers the essential behaviors: what it does, what it returns, and what it doesn't do (write to disk). The input schema fully documents parameters, and no output schema is present, so the text appropriately focuses on the generation outcome. It could mention deployment explicitly, but that is reasonably implied by 'returns source code.'

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 high (83%) and includes detailed explanations for nested objects like 'access' and 'macros'. The description adds no parameter-specific context beyond the schema, so the baseline of 3 is appropriate.

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 function ('Make a custom smart contract') and explicitly notes the output (source code in a Markdown code block). The term 'custom' distinguishes it from the sibling template-based tools, making its unique role clear.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No explicit guidance is given on when to choose this tool over siblings like cairo-erc20 or cairo-governor. The word 'custom' implies a fallback for non-standard contracts, but the description never states criteria, exclusions, or alternatives.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.