Skip to main content
Glama
OpenZeppelin

OpenZeppelin Contracts MCP Server

Official
by OpenZeppelin

cairo-vesting

Generate smart contracts for managing gradual ERC-20 token release to beneficiaries using predefined vesting schedules.

Instructions

Make a vesting smart contract that manages the gradual release of ERC-20 tokens to a designated beneficiary based on a predefined vesting schedule.

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
startDateYesThe timestamp marking the beginning of the vesting period. In HTML input datetime-local format
durationYesThe total duration of the vesting period. In readable date time format matching /^(\d+(?:\.\d+)?) +(second|minute|hour|day|week|month|year)s?$/
cliffDurationYesThe duration of the cliff period. Must be less than or equal to the total duration. In readable date time format matching /^(\d+(?:\.\d+)?) +(second|minute|hour|day|week|month|year)s?$/
scheduleYesA vesting schedule implementation, tokens can either be vested gradually following a linear curve or with custom vesting schedule that requires the implementation of the VestingSchedule trait.
infoNoMetadata about the contract and author

Implementation Reference

  • The handler function that implements the core logic of the 'cairo-vesting' tool. It receives vesting parameters, constructs VestingOptions, and generates the Cairo contract code using the external vesting.print function wrapped in safePrintCairoCodeBlock.
    async ({ name, startDate, duration, cliffDuration, schedule, info }) => {
      const opts: VestingOptions = {
        name,
        startDate,
        duration,
        cliffDuration,
        schedule,
        info,
      };
      return {
        content: [
          {
            type: 'text',
            text: safePrintCairoCodeBlock(() => vesting.print(opts)),
          },
        ],
      };
    },
  • Zod schema defining the input shape and descriptions for the 'cairo-vesting' tool parameters.
    export const vestingSchema = {
      name: z.string().describe(commonDescriptions.name),
      startDate: z.string().describe(cairoVestingDescriptions.startDate),
      duration: z.string().describe(cairoVestingDescriptions.duration),
      cliffDuration: z.string().describe(cairoVestingDescriptions.cliffDuration),
      schedule: z.enum(['linear', 'custom']).describe(cairoVestingDescriptions.schedule),
      info: commonSchema.info,
    } as const satisfies z.ZodRawShape;
  • Registration function for the 'cairo-vesting' tool on the MCP server, specifying the tool name, prompt, schema, and handler.
    export function registerCairoVesting(server: McpServer): RegisteredTool {
      return server.tool(
        'cairo-vesting',
        makeDetailedPrompt(cairoPrompts.Vesting),
        vestingSchema,
        async ({ name, startDate, duration, cliffDuration, schedule, info }) => {
          const opts: VestingOptions = {
            name,
            startDate,
            duration,
            cliffDuration,
            schedule,
            info,
          };
          return {
            content: [
              {
                type: 'text',
                text: safePrintCairoCodeBlock(() => vesting.print(opts)),
              },
            ],
          };
        },
      );
    }
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 does reveal key behaviors: it generates source code (not writes to disk), returns formatted Markdown, and creates a vesting contract. However, it doesn't cover important aspects like whether this requires authentication, rate limits, error conditions, or what happens with invalid inputs. The disclosure is adequate but incomplete for a code generation tool.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is appropriately concise with two sentences that each serve distinct purposes: the first states the core functionality, the second specifies output format and behavioral constraint. It's front-loaded with the main purpose. While efficient, it could potentially benefit from slightly more context about when to use this tool.

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?

For a code generation tool with 6 parameters, no annotations, and no output schema, the description is minimally adequate. It covers what the tool does and the output format, but lacks information about error handling, authentication requirements, and detailed usage scenarios. The absence of output schema means the description should ideally say more about return values, though it does specify the Markdown format.

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?

With 100% schema description coverage, the baseline is 3. The description doesn't add any parameter-specific information beyond what's already documented in the schema. It mentions 'vesting schedule' generally but doesn't clarify parameter relationships or provide examples. The schema already thoroughly documents all 6 parameters with format requirements and constraints.

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 purpose: 'Make a vesting smart contract that manages the gradual release of ERC-20 tokens to a designated beneficiary based on a predefined vesting schedule.' This specifies the verb ('Make'), resource ('vesting smart contract'), and distinguishes it from sibling tools like cairo-erc20 or cairo-multisig by focusing on vesting functionality.

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 use this tool versus alternatives. It doesn't mention sibling tools like cairo-custom for other contract types or explain scenarios where vesting contracts are appropriate. The only implicit usage hint is the return format, but no explicit when/when-not instructions are provided.

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