Insert content
add_blockInsert one piece of content: a section heading, paragraph, equation (LaTeX), list, table, figure, theorem, quote or code, after a given block or at the end. Examples: paragraph {"text":"…"}; section heading {"text":"Results","level":1} (or use add_section); equation {"latex":"E = mc^2"}; list {"items":[{"text":"…"}],"kind":"bullet"}. For a whole section of LaTeX at once, paste_content is quicker. Returns the new block id. The open editor shows the change at once; to undo it, give the reply's undo.versionId to restore_version. An unknown type is refused. Fields by type (others are ignored): paragraph {text}; heading {text, level 1-6, label?}; equation {latex, equationMode: display|inline, label?, numbered?}; theorem {text, theoremType: theorem|lemma|definition|proposition|corollary|remark|example|proof, title?, label?, numbered?}; list {items:[{text}], kind: bullet|numbered|description — for description items:[{text: term, description}]}; table {headers:[...], rows:[[...]], caption?, label?, columnAlign?, rowColors?: {odd: hex like #F2F2F2, even: hex} (odd = first body row)}; figure {src, caption?, label?, width 0-1, alt?} or TikZ {kind:"tikz", source, caption?, label?, alt?} (alt: a description for readers who can't see it; ACM prints it as \Description); code {code, language?, caption?, label?}; blockquote {text, attribution?, variant?: verse}; abstract {text}; algorithm {caption?, label?, lines:[{kind, text}]} with kind statement|require|ensure|if|elsif|else|endif|for|forall|endfor|while|endwhile|repeat|until|return|comment, or {code} with \STATE / \IF{…} lines; callout {text, title?, variant?}; footnote {text}; embed {code} — raw LaTeX printed as written; bibliography {text} — BibTeX entries (@article{key, …}) or lines "@cite[key] Author — Title"; frontMatter / backMatter {subType: preface|foreword|acknowledgements|dedication|afterword|appendix, text, title?}; CV: personalInfo {name, headline, email, phones:[{number}], homepage, location}, cvSection {title}, cvEntry {period, role, org, location, highlight?, description, tech:[]} (firstName/lastName, organization, startDate/endDate are mapped). Text fields take Lilia marks: bold, italic, $maths$, (…), Theorem~(thm:x) for a reference, @cite{key} for a citation. LaTeX typed in text stays LaTeX (commands, {…} groups, \ control spaces): to print a brace write { }, a backslash \textbackslash{} (MCP-32); %, &, #, _ print as typed.
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": {
"documentId": "<documentId>",
"type": "<type>",
"content": "<content>"
},
"name": "add_block"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| type | Yes | Block type, e.g. paragraph, heading, equation. | |
| afterId | No | Insert after this block id; omit to append at the end. | |
| content | Yes | JSON content for the type, e.g. {"text":"…"}, {"text":"…","level":2}, {"latex":"…"}. | |
| documentId | Yes | The document id. |