Skip to main content
Glama

midnight-document-contract

Read-onlyIdempotent

Generate comprehensive documentation for Compact smart contracts in Markdown or JSDoc format, including overview, state variables, and usage examples.

Instructions

📝 AI-POWERED DOCUMENTATION GENERATION

Generates comprehensive documentation for Compact smart contracts. Uses the client's LLM to create detailed, human-readable docs.

FORMATS: • markdown - Full Markdown documentation with examples • jsdoc - JSDoc-style inline comments

MARKDOWN INCLUDES: • Contract overview and purpose • State variables with privacy annotations • Circuit function documentation • Witness function documentation • Usage examples • Security considerations

⚠️ REQUIRES: Client with sampling capability (e.g., Claude Desktop)

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
codeYesCompact contract code to document
formatNoDocumentation format (default: markdown)

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
documentationYesGenerated documentation
formatYesFormat of the documentation
samplingAvailableYesWhether sampling capability was available
Behavior4/5

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

Annotations already declare read-only and idempotent hints. Description adds valuable context: uses client's LLM, requires sampling capability, and warns about side-effect (documentation generation). No contradiction. Minor deduction for not detailing other behavioral aspects.

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?

Well-structured with bullet points and formatting, but slightly verbose (emoji, heavy bold). Could be trimmed without losing information. Front-loaded with key purpose.

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 output schema exists (not shown but signaled), description doesn't need to cover return values. It covers input requirements, format options, and output contents. Missing error handling or rate limits, but acceptable for this tool type.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema has 100% coverage with brief descriptions. Description adds meaning by detailing what markdown includes (sections like contract overview, examples) and that jsdoc is inline comments. This informs agent about output content, adding value beyond schema.

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?

Description clearly states it generates comprehensive documentation for Compact smart contracts, specifies formats (markdown, jsdoc) and lists contents. This verb-resource pair is distinct from sibling tools like midnight-explain-circuit.

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

Usage Guidelines4/5

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

Explicitly states requirement for client sampling capability (e.g., Claude Desktop), guiding when to use. However, it doesn't contrast with alternatives or state when not to use, so slight deduction.

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/Olanetsoft/midnight-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server