Skip to content

v0.2.0 — copy_doc, create_folder, table borders and pinned headers

Choose a tag to compare

@damith-dasasian damith-dasasian released this 16 Aug 15:40
· 30 commits to main since this release

Added

  • copy_doc — duplicate a Doc via Drive files.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 an update_doc mode: 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 same scope as 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"); 0 unpins (#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 that edit_doc cannot 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 an edit_doc mode so edit_doc stays "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 Drive files.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_content and insert_image all take segment: "body" | "header" | "footer" (plus page for first-/even-page variants); read_doc also takes segment: "all". Writes to a header/footer that doesn't exist return no_segment listing what does, and createSegment: true creates it (default header/footer only — the API cannot create first-/even-page ones). Implemented by threading segmentId through the existing request builders, not a parallel set of tools.
  • A body read no longer looks empty when it isn't (#23). read_doc now 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, so read_doc returned markdown with no image at all and the doc read as having no logo.
  • search_drive / list_folder results now carry parents — 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