Add NatSpec documentation
natspec_documentGenerate NatSpec documentation for Solidity files and return it without modifying source, or write updates in place with a .sol.bak backup or to a separate output file.
Instructions
Generate NatSpec documentation for a Solidity file with kritisi. By default the documented source is returned without touching any file. Set write=true for an in-place update with a .sol.bak backup, or set output to write to a separate file.
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": {
"path": "<path>"
},
"name": "natspec_document"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | Path to a .sol file | |
| write | No | Update the source file in place and keep a .sol.bak backup | |
| output | No | Write the documented source to this path (implies writing) | |
| provider | No | AI provider (default: openrouter) | openrouter |
| overwrite | No | Allow replacing an existing output file |