Skip to main content
Glama
OpenZeppelin

OpenZeppelin Contracts MCP Server

Official
by OpenZeppelin

Cairo Governor

cairo-governor

Generate a DAO governance contract with configurable voting delay, period, quorum, and timelock. Returns the complete source code as a Markdown block.

Instructions

Make a contract to implement governance, such as for a DAO.

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
delayYesThe delay since proposal is created until voting starts, in readable date time format matching /^(\d+(?:\.\d+)?) +(second|minute|hour|day|week|month|year)s?$/, default is "1 day".
votesNoThe type of voting to use. Either erc20votes, meaning voting power with a votes-enabled ERC20 token. Either erc721votes, meaning voting power with a votes-enabled ERC721 token. Voters can entrust their voting power to a delegate.
macrosNoThe macros to use for the contract.
periodYesThe length of period during which people can cast their vote, in readable date time format matching /^(\d+(?:\.\d+)?) +(second|minute|hour|day|week|month|year)s?$/, default is "1 week".
appNameNoRequired when votes is enabled, for hashing and signing typed structured data. Name for domain separator implementing SNIP12Metadata trait. Prevents two applications from producing the same hash.
decimalsNoThe number of decimals to use for the contract, default is 18 for ERC20Votes and 0 for ERC721Votes (because it does not apply to ERC721Votes).
settingsNoWhether to allow governance to update voting settings (delay, period, proposal threshold).
timelockNoWhether to add a delay to actions taken by the Governor. Gives users time to exit the system if they disagree with governance decisions. If "openzeppelin", Module compatible with OpenZeppelin's TimelockController.
clockModeNoThe clock mode used by the voting token. For now, only timestamp mode where the token uses voting durations expressed as timestamps is supported. For Governor, this must be chosen to match what the ERC20 or ERC721 voting token uses.
appVersionNoRequired when votes is enabled, for hashing and signing typed structured data. Version for domain separator implementing SNIP12Metadata trait. Prevents two versions of the same application from producing the same hash.
quorumModeNoThe type of quorum mode to use, either by percentage or absolute value.
upgradeableNoWhether the smart contract is upgradeable.
quorumPercentNoThe percent required, in cases of quorumMode equals percent.
quorumAbsoluteNoThe absolute quorum required, in cases of quorumMode equals absolute.
proposalThresholdNoMinimum number of votes an account must have to create a proposal, default is 0.
Behavior3/5

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

With no annotations, the description carries the full burden. It usefully discloses that the tool does not write to disk and returns source code in a Markdown code block, which addresses safety and output format. However, it does not mention other behaviors like execution time, dependencies, or failure modes, which would be valuable for a complex 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 concise: two sentences, front-loaded with the core purpose and immediately clarifying output format and lack of side effects. Every sentence earns its place without redundancy.

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

Completeness2/5

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

Despite having a rich schema, the description lacks high-level context about the generated contract's capabilities (e.g., voting, timelock, upgradeability). It does not clarify that this is Cairo-specific or how it relates to the solidity-governor sibling. No output schema or annotations further burden the description, which falls short for a complex tool with 17 parameters.

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 for all 17 parameters, so the description does not need to add parameter explanations. The baseline of 3 applies; the description adds no parameter context beyond what the schema already provides.

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 states a clear action: generate a governance contract (e.g., for a DAO). However, it does not explicitly distinguish itself from sibling tools like solidity-governor; the Cairo-specific nature is only implied by the tool name, not described.

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?

The description provides no guidance on when to choose this tool over alternatives, such as solidity-governor or other contract generators. It only states what the tool does, with no mention of use cases, prerequisites, or when it would be inappropriate.

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