create_bookmark
Create a named anchor at a chosen position in a Google Doc so you can look up that location later without hardcoding raw indices; the underlying range updates as edits occur.
Instructions
Create a lightweight, named anchor point at a single position in a Google Doc.
The Docs API has no dedicated bookmark-creation endpoint (Docs UI bookmarks
can only be inserted by hand). This is a convenience wrapper around
create_named_range that spans the single character at index, giving you a
named position you can look up later without hardcoding raw indices — the
range's bounds shift automatically as the API tracks surrounding edits.
Use get_doc_structure to find a suitable index.
Args: doc_id: The Google Doc file ID. name: Name for the bookmark. Not required to be unique; 1-256 UTF-16 code units. index: Document position to anchor at (the character at this index is included in the underlying named range).
Returns: Confirmation with docId, namedRangeId, name, index.
Note: This is not a Docs UI bookmark: it won't appear in Insert > Bookmark and cannot be used as an internal hyperlink target (the Link object only supports UI-created bookmarks and headings, not named ranges). Use create_named_range directly for an anchor spanning more than one character.
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": {
"doc_id": "<doc_id>",
"name": "<name>",
"index": "<index>"
},
"name": "create_bookmark"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | ||
| index | Yes | ||
| doc_id | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||