replace_docstring
Replace or insert a Python docstring on a function or class without modifying the function body. Provide the target symbol and the new docstring as a valid triple-quoted string literal.
Instructions
Replace or insert a Python docstring on a function or class. Python-only. The new_docstring should be a valid Python string literal including its surrounding triple quotes.
Use this when: You want to add or update a Python docstring without touching
the function body.
Don't use this when: You're editing a # comment above the symbol -> use
replace_leading_comment. You're in a non-Python file -> no equivalent tool.
Example: target="LRUCache.get" new_docstring=(triple-quoted string, e.g. with three double-quotes before and after the summary text)
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| target | Yes | ||
| file_path | Yes | ||
| new_docstring | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |