v0.2.0 — copy_doc, create_folder, table borders and pinned headers
Added
-
copy_doc— duplicate a Doc via Drivefiles.copy, with an optional new name and target folder. Copying preserves what a markdown round-trip cannot rebuild (headers/footers, image sizing, exact formatting), so a template can be reused instead of recreated. Kept as its own tool rather than anupdate_docmode: it creates a file rather than mutating one (#24). -
create_folder— create a Drive folder, optionally inside a parent (URL or id). Previously the only way to make a folder was the Drive UI (#25). -
set_table_style({ border })— cell border width (pt), color (hex), dash style, and which sides, over the samescopeas padding/background.border: { width: 0 }makes a table borderless (#21). -
set_table_style({ headerRows })— repeat the top N rows on every page (Docs' "pin header rows");0unpins (#19). -
insert_content— insert new markdown-rendered content at a structural position:at: "end"(default),"top", or a unique text anchor to insert right after. This is the only path to content thatedit_doccannot anchor: a paragraph after a table that ends the doc (a table cell can't anchor an insert outside the table, and Docs' mandatory trailing empty paragraph has no text to match). Kept as its own tool rather than anedit_docmode soedit_docstays "replace this exact text" (#20). -
export_doc— export a Doc to a local file: pdf (default), docx, odt, rtf, txt, html, epub, or md, via Drivefiles.export. Google renders server-side, so pagination and page setup match the editor. Note Drive refuses exports over 10 MB (#22).
Changed
- Headers and footers are reachable everywhere text is (#23).
read_doc,edit_doc,set_style,get_style,insert_contentandinsert_imageall takesegment: "body" | "header" | "footer"(pluspagefor first-/even-page variants);read_docalso takessegment: "all". Writes to a header/footer that doesn't exist returnno_segmentlisting what does, andcreateSegment: truecreates it (default header/footer only — the API cannot create first-/even-page ones). Implemented by threadingsegmentIdthrough the existing request builders, not a parallel set of tools. - A body read no longer looks empty when it isn't (#23).
read_docnow reports the headers/footers it did not render, with paragraph and image counts. This was a wrong answer, not a missing one: a letterhead's logo lives in the page header, soread_docreturned markdown with no image at all and the doc read as having no logo. search_drive/list_folderresults now carryparents— each entry lists its parent folder(s) as{ id, name }, so a hit can be traced upward (e.g. to create a sibling folder). Parent names are resolved once per distinct id, and degrade to the bare id if a lookup fails (#26).
Install: npx -y @dasasian/gdocs-mcp@0.2.0 · npm · docs
Full diff: v0.1.1...v0.2.0