Skip to main content
Glama

Lilia Editor

Insert content

add_block

Insert 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

NameRequiredDescriptionDefault
typeYesBlock type, e.g. paragraph, heading, equation.
afterIdNoInsert after this block id; omit to append at the end.
contentYesJSON content for the type, e.g. {"text":"…"}, {"text":"…","level":2}, {"latex":"…"}.
documentIdYesThe document id.

Schema Changelog

Changes observed during successful MCP inspections.

No schema history has been recorded yet.

TDQS

A4.6/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Beyond the annotations (which only say this is a non-read-only, non-idempotent, non-destructive write), the description discloses that the new block id is returned, that the open editor reflects the change immediately, how to undo it, and that an unknown type is refused. Much of the remaining bulk is per-type field documentation rather than behavior, so it earns a 4 rather than a 5.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The purpose, examples, and routing guidance are correctly front-loaded, and nearly every clause carries information. However, the field specification is delivered as one dense run-on paragraph with semicolon-chained types, which is hard to scan and buries items like the TikZ and algorithm variants mid-stream.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a mutating insert tool with no output schema, the description covers what an agent needs: accepted types, required fields per type, ignored-field behavior, error on unknown type, returned id, and how to reverse the change. Nothing material about calling it correctly is left unstated.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The schema documents all four parameters at 100% coverage, but its 'content' is an untyped JSON string; the description supplies the real semantics by spelling out required fields per type (equation {latex, equationMode, numbered?}, table {headers, rows, caption, columnAlign, rowColors}, algorithm line kinds, figure vs TikZ, CV entry mapping). It also explains text-mark handling and LaTeX escaping ('to print a brace write \{ \}'), which the schema does not.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

'Insert one piece of content' is a precise verb+resource, and the description immediately enumerates the block types it accepts (heading, paragraph, equation, list, table, figure, theorem, quote, code). It also names siblings it is not: 'For a whole section of LaTeX at once, paste_content is quicker' and '(or use add_section)' for headings, so an agent can differentiate without opening other schemas.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Placement guidance is explicit ('after a given block or at the end'), and two alternatives are routed by condition: add_section for section headings, paste_content when a whole LaTeX section is needed at once. It even states the undo path via restore_version with the reply's undo.versionId, which is a usage rule an agent cannot infer.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources