set_docs_shared
Set who can read a line's generated API docs. Use the lowest level that achieves what the user asked for: link is enough to share with specific people. Set public only when the user has explicitly asked for public docs, and pass userApprovedPublic: true to confirm it. off: only project members, through the panel. link: anyone holding the unguessable address in docsUrl reads them without an account; search engines and AI crawlers are asked to stay out. public: anyone can read them at a stable address, and search engines and AI assistants can find them. replaceLink: true (only with link, on a line already shared by link) retires the current address at once, even in draft mode, and returns the new docsUrl. The docsSharing and docsUrl fields on each line read (list_lines) reflect the current state. Requires edit access.
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": {
"lineKey": "<lineKey>",
"level": "<level>"
},
"name": "set_docs_shared"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| level | Yes | Who can read the docs: off, link or public. | |
| lineKey | Yes | The line key, e.g. "v1". | |
| commitMode | No | Defaults to publish. Draft writes require draftRevision. | |
| replaceLink | No | true to replace the current link with a new one; valid only with level "link" on a line already shared by link. Takes effect at once, never staged. | |
| draftRevision | No | Current line draft revision, required for draft writes. | |
| userApprovedPublic | No | Required as true to move a line to level "public" from another level; confirms the user explicitly asked for public docs. |