ai_docstring
Add docstrings / doc comments to code — Add documentation comments to every function, method and class in a code snippet (purpose, params with types, returns, raised errors) in the right style for the language: Google/NumPy docstrings (Python), JSDoc/TSDoc, Javadoc, C# XML doc, GoDoc, rustdoc, PHPDoc, YARD. Returns the full documented code plus an offline check that every original code line is preserved in order (codeUnchanged=false lists altered lines). Params: code (required, max 8000 chars), language=auto|python|javascript|typescript|java|csharp|go|rust|php|ruby, style=auto|google|numpy|jsdoc|javadoc|... . Price: $0.008 USDC (Base, via x402).
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": "ai_docstring"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| code | Yes | Source code to document, e.g. function add(a, b) { return a + b } |