Tool tree
gradeNot graded
list_documentsAnswer
List every LaTeX document in this workspace with title, block count, open render errors, and a short snippet. Use this first to discover document IDs before reading or editing.
View tool JSON
{
"name": "list_documents",
"kind": "answer",
"impl": "imperative",
"description": "List every LaTeX document in this workspace with title, block count, open render errors, and a short snippet. Use this first to discover document IDs before reading or editing.",
"inputSchema": {
"type": "object",
"properties": {
"query": {
"type": "string",
"description": "Optional text filter matched against document titles and content."
}
}
}
}get_documentAnswer
Read one document's full structure: every block with its stable ID, LaTeX source, render status, and comment threads. This is the primary way to understand the document before editing. Always call this before insert_blocks or update_block.
View tool JSON
{
"name": "get_document",
"kind": "answer",
"impl": "imperative",
"description": "Read one document's full structure: every block with its stable ID, LaTeX source, render status, and comment threads. This is the primary way to understand the document before editing. Always call this before insert_blocks or update_block.",
"inputSchema": {
"type": "object",
"properties": {
"documentId": {
"type": "string",
"description": "Document ID from list_documents."
},
"includeComments": {
"type": "boolean",
"description": "Include comment threads in the response. Default true."
}
},
"required": [
"documentId"
]
}
}get_render_errorsAnswer
Get every live KaTeX render error in a document: block ID, error message, character position, source context, and a suggested fix when one is known. Use this after any edit to verify the document compiles, and to find and repair your own mistakes.
View tool JSON
{
"name": "get_render_errors",
"kind": "answer",
"impl": "imperative",
"description": "Get every live KaTeX render error in a document: block ID, error message, character position, source context, and a suggested fix when one is known. Use this after any edit to verify the document compiles, and to find and repair your own mistakes.",
"inputSchema": {
"type": "object",
"properties": {
"documentId": {
"type": "string",
"description": "Document ID from list_documents."
},
"blockId": {
"type": "string",
"description": "Optional: restrict the check to a single block."
}
},
"required": [
"documentId"
]
}
}get_document_outlineAnswer
Get a compact outline of a document: section headings, numbered theorems, and labeled equations with their numbers and block IDs. Much lighter than get_document. Use it to orient yourself or to pick anchor block IDs before editing.
View tool JSON
{
"name": "get_document_outline",
"kind": "answer",
"impl": "imperative",
"description": "Get a compact outline of a document: section headings, numbered theorems, and labeled equations with their numbers and block IDs. Much lighter than get_document. Use it to orient yourself or to pick anchor block IDs before editing.",
"inputSchema": {
"type": "object",
"properties": {
"documentId": {
"type": "string",
"description": "Document ID from list_documents."
}
},
"required": [
"documentId"
]
}
}search_documentsAnswer
Find text or LaTeX across the workspace (case-insensitive substring). Returns each match as a block with its ID and surrounding context, so the agent can quote, update, or comment on it. Use before editing to locate where a concept, label, or command appears.
View tool JSON
{
"name": "search_documents",
"kind": "answer",
"impl": "imperative",
"description": "Find text or LaTeX across the workspace (case-insensitive substring). Returns each match as a block with its ID and surrounding context, so the agent can quote, update, or comment on it. Use before editing to locate where a concept, label, or command appears.",
"inputSchema": {
"type": "object",
"properties": {
"query": {
"type": "string",
"description": "Text to find, e.g. 'pythagorean', 'thm:', '\\\\int'."
},
"documentId": {
"type": "string",
"description": "Optional: restrict the search to one document. Default: all documents."
}
},
"required": [
"query"
]
}
}create_documentAction
Create and open a new LaTeX document from a template (blank, notes, problem_set, exam, paper_section). Optionally seed it with initial blocks. Use when the user wants to start something new.
View tool JSON
{
"name": "create_document",
"kind": "act",
"impl": "imperative",
"description": "Create and open a new LaTeX document from a template (blank, notes, problem_set, exam, paper_section). Optionally seed it with initial blocks. Use when the user wants to start something new.",
"inputSchema": {
"type": "object",
"properties": {
"title": {
"type": "string",
"description": "Human-readable document title."
},
"template": {
"type": "string",
"enum": [
"blank",
"notes",
"problem_set",
"exam",
"paper_section",
"demo"
],
"description": "Template that pre-loads typical structure: problem_set, exam, notes, paper_section, or blank."
},
"initialBlocks": {
"type": "array",
"description": "Optional initial blocks as {type, latex} objects.",
"items": {
"type": "object",
"properties": {
"type": {
"type": "string",
"enum": [
"text",
"equation",
"align",
"theorem",
"figure",
"table",
"code",
"preamble"
]
},
"latex": {
"type": "string"
}
},
"required": [
"type",
"latex"
]
}
}
},
"required": [
"title",
"template"
]
}
}insert_blocksAction
Insert new LaTeX blocks after an anchor block (or at the start). Blocks render immediately; the response reports each block's render status and the surrounding context so you can verify placement. figure blocks support TikZ diagrams (\begin{tikzpicture}...\end{tikzpicture}). Check get_render_errors afterward to self-correct.
View tool JSON
{
"name": "insert_blocks",
"kind": "act",
"impl": "imperative",
"description": "Insert new LaTeX blocks after an anchor block (or at the start). Blocks render immediately; the response reports each block's render status and the surrounding context so you can verify placement. figure blocks support TikZ diagrams (\\begin{tikzpicture}...\\end{tikzpicture}). Check get_render_errors afterward to self-correct.",
"inputSchema": {
"type": "object",
"properties": {
"documentId": {
"type": "string",
"description": "Target document ID."
},
"afterBlockId": {
"type": "string",
"description": "Insert after this block ID, or use \"start\" for the beginning."
},
"blocks": {
"type": "array",
"description": "Blocks to insert, each {type, latex}.",
"items": {
"type": "object",
"properties": {
"type": {
"type": "string",
"enum": [
"text",
"equation",
"align",
"theorem",
"figure",
"table",
"code",
"preamble"
],
"description": "text (prose with inline $math$), equation (display math), align (multi-line), theorem, figure, table, code, preamble (macro definitions)."
},
"latex": {
"type": "string",
"description": "LaTeX source for the block."
}
},
"required": [
"type",
"latex"
]
}
}
},
"required": [
"documentId",
"afterBlockId",
"blocks"
]
}
}update_blockAction
Replace (or append to) the LaTeX source of a single block by ID. The block re-renders immediately and the response reports the new render status. Use this to fix errors reported by get_render_errors. Prefer this over rewriting whole documents.
View tool JSON
{
"name": "update_block",
"kind": "act",
"impl": "imperative",
"description": "Replace (or append to) the LaTeX source of a single block by ID. The block re-renders immediately and the response reports the new render status. Use this to fix errors reported by get_render_errors. Prefer this over rewriting whole documents.",
"inputSchema": {
"type": "object",
"properties": {
"documentId": {
"type": "string",
"description": "Target document ID."
},
"blockId": {
"type": "string",
"description": "Block ID to update."
},
"latex": {
"type": "string",
"description": "New LaTeX source for the block."
},
"mode": {
"type": "string",
"enum": [
"replace",
"append"
],
"description": "Replace the whole block (default) or append to it."
}
},
"required": [
"documentId",
"blockId",
"latex"
]
}
}delete_blockSensitive Action
Delete a single block (and its comment threads) by ID. The document re-renders without it. Only delete when the user asks for removal.
View tool JSON
{
"name": "delete_block",
"kind": "transact",
"impl": "imperative",
"description": "Delete a single block (and its comment threads) by ID. The document re-renders without it. Only delete when the user asks for removal.",
"inputSchema": {
"type": "object",
"properties": {
"documentId": {
"type": "string",
"description": "Target document ID."
},
"blockId": {
"type": "string",
"description": "Block ID to delete."
}
},
"required": [
"documentId",
"blockId"
]
}
}undo_last_changeAction
Undo the most recent edit in a document, but only when it was made by the agent. If the user typed something more recently, the call refuses and explains why, so you never silently revert the user's work. Use this when the user asks you to take an edit back.
View tool JSON
{
"name": "undo_last_change",
"kind": "act",
"impl": "imperative",
"description": "Undo the most recent edit in a document, but only when it was made by the agent. If the user typed something more recently, the call refuses and explains why, so you never silently revert the user's work. Use this when the user asks you to take an edit back.",
"inputSchema": {
"type": "object",
"properties": {
"documentId": {
"type": "string",
"description": "Document ID from list_documents."
}
},
"required": [
"documentId"
]
}
}add_commentAction
Add an agent-authored comment anchored to a block. The comment appears in the margin next to the rendered block, clearly marked as agent-authored. Use comments to explain, question, or tutor without changing the user's math.
View tool JSON
{
"name": "add_comment",
"kind": "act",
"impl": "imperative",
"description": "Add an agent-authored comment anchored to a block. The comment appears in the margin next to the rendered block, clearly marked as agent-authored. Use comments to explain, question, or tutor without changing the user's math.",
"inputSchema": {
"type": "object",
"properties": {
"documentId": {
"type": "string",
"description": "Target document ID."
},
"blockId": {
"type": "string",
"description": "Block to anchor the comment to."
},
"text": {
"type": "string",
"description": "Comment text. Inline $math$ is rendered."
},
"quote": {
"type": "string",
"description": "Optional exact quote from the block to highlight."
}
},
"required": [
"documentId",
"blockId",
"text"
]
}
}reply_to_commentAction
Append an agent reply to an existing comment thread. Use this to answer questions the user asked in the margin, in context.
View tool JSON
{
"name": "reply_to_comment",
"kind": "act",
"impl": "imperative",
"description": "Append an agent reply to an existing comment thread. Use this to answer questions the user asked in the margin, in context.",
"inputSchema": {
"type": "object",
"properties": {
"documentId": {
"type": "string",
"description": "Target document ID."
},
"threadId": {
"type": "string",
"description": "Thread ID to reply to."
},
"text": {
"type": "string",
"description": "Reply text. Inline $math$ is rendered."
}
},
"required": [
"documentId",
"threadId",
"text"
]
}
}resolve_commentAction
Mark a comment thread resolved (or reopen it). Use when the discussion has concluded so the margin stays clean.
View tool JSON
{
"name": "resolve_comment",
"kind": "act",
"impl": "imperative",
"description": "Mark a comment thread resolved (or reopen it). Use when the discussion has concluded so the margin stays clean.",
"inputSchema": {
"type": "object",
"properties": {
"documentId": {
"type": "string",
"description": "Target document ID."
},
"threadId": {
"type": "string",
"description": "Thread ID to resolve."
},
"resolved": {
"type": "boolean",
"description": "Resolve (default true) or reopen the thread."
}
},
"required": [
"documentId",
"threadId"
]
}
}set_viewAction
Control what the user sees: switch between source, preview, and split modes, and optionally scroll to a specific block. Use this to draw attention to an edit. For example, after fixing a render error, switch to preview and scroll to the corrected block.
View tool JSON
{
"name": "set_view",
"kind": "act",
"impl": "imperative",
"description": "Control what the user sees: switch between source, preview, and split modes, and optionally scroll to a specific block. Use this to draw attention to an edit. For example, after fixing a render error, switch to preview and scroll to the corrected block.",
"inputSchema": {
"type": "object",
"properties": {
"documentId": {
"type": "string",
"description": "Target document ID."
},
"mode": {
"type": "string",
"enum": [
"source",
"split",
"preview"
],
"description": "source shows LaTeX code, preview shows rendered math, split shows both."
},
"scrollToBlockId": {
"type": "string",
"description": "Optional block ID to scroll into view."
}
},
"required": [
"documentId",
"mode"
]
}
}export_documentAction
Compile the document into a complete, compilable .tex file (with preamble, geometry, theorem declarations, and TikZ when used) and download it for the user. Set returnContent to also receive the full .tex source in the response for verification. Use when they want to keep working in Overleaf or another LaTeX environment.
View tool JSON
{
"name": "export_document",
"kind": "act",
"impl": "imperative",
"description": "Compile the document into a complete, compilable .tex file (with preamble, geometry, theorem declarations, and TikZ when used) and download it for the user. Set returnContent to also receive the full .tex source in the response for verification. Use when they want to keep working in Overleaf or another LaTeX environment.",
"inputSchema": {
"type": "object",
"properties": {
"documentId": {
"type": "string",
"description": "Document ID to export."
},
"returnContent": {
"type": "boolean",
"description": "Include the full .tex source in the response (default false)."
}
},
"required": [
"documentId"
]
}
}filter_documentsAction
Filter the documents in the workspace sidebar by title or content. Use this when the user asks to find, search, or locate one of their documents.
View tool JSON
{
"name": "filter_documents",
"kind": "act",
"impl": "declarative",
"description": "Filter the documents in the workspace sidebar by title or content. Use this when the user asks to find, search, or locate one of their documents.",
"inputSchema": {
"type": "object",
"properties": {
"query": {
"type": "string",
"description": "Search documents…"
}
}
}
}