midnight-document-contract
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)
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"code": "<code>"
},
"name": "midnight-document-contract"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| code | Yes | Compact contract code to document | |
| format | No | Documentation format (default: markdown) |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| documentation | Yes | Generated documentation | |
| format | Yes | Format of the documentation | |
| samplingAvailable | Yes | Whether sampling capability was available |