Skip to main content
Glama

OpenZeppelin Cairo Contracts

Cairo Governor

cairo-governor

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.

TDQS

A4/5.0
Behavior4/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 transparently states that the tool returns source code formatted as a Markdown code block and explicitly says it does not write to disk. This is valuable context about side effects and output format, though it does not cover every possible behavioral nuance.

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 two sentences long, front-loaded with the tool's purpose, and immediately follows with the key output behavior. Every sentence provides necessary information with no filler or redundancy.

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?

Given the tool's complexity (17 parameters, nested objects, no output schema), the description covers the essential contextual points: what it generates, the output format, and its non-destructive behavior. The absence of details about parameter interactions is mitigated by the rich schema descriptions. It is slightly lean for such a complex tool but still adequate.

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 100%, so the schema already fully documents all 17 parameters. The description adds no parameter-specific meaning, which is acceptable given the high schema coverage. The baseline of 3 applies because the schema handles the heavy lifting.

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 a specific action: 'Make a contract to implement governance, such as for a DAO.' It also clarifies the output by noting it returns source code in a Markdown code block. This distinguishes the tool from sibling contract generators like cairo-erc20 or cairo-account by its governance focus.

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 phrase 'such as for a DAO' implies a governance use case, but no explicit comparison with alternatives or exclusions is provided. While the sibling tool names suggest other contract types, the description itself does not state when to prefer this tool over them.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

TDQS

A4/5.0
Disambiguation4/5

Each tool maps to a clearly named contract type—account, ERC standards, governance, multisig, vesting—so agents can generally tell them apart. However, cairo-custom is a generic 'make any custom smart contract' option that overlaps conceptually with all the specialized generators, creating minor ambiguity.

Naming Consistency5/5

All tools follow the same cairo-<type> naming convention, using lowercase and hyphens consistently. This makes the tool family predictable and easy to navigate.

Tool Count5/5

Nine tools is a well-scoped set for a contract generation server. Each tool represents a common smart contract template, and there are enough options to cover standard use cases without overwhelming the tool surface.

Completeness4/5

The set covers the major OpenZeppelin Cairo contract categories: tokens, account abstraction, governance, multisig, vesting, and a custom fallback. A few common patterns like proxy or access control are not explicitly included, but the generic cairo-custom tool helps fill those gaps.

Resources