Skip to main content
Glama

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault

No arguments

Instructions

Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.

This server publishes no instructions, or was last inspected before Glama recorded them.

Capabilities

Features and capabilities supported by this server

Protocol revision2025-11-25

CapabilityDetails
tools
{
  "listChanged": false
}
experimental
{}

Tools

Functions exposed to the LLM to take actions

NameDescription
create_fileA

Create a new file in a Typleaf project. Auto-creates parent folders. Commits and pushes immediately.

create_projectA

Create a new blank Typleaf project via the web API. Pass compiler='typst' to make it a Typst project — a new project defaults to pdflatex, and a project holding .typ files but left on pdflatex fails to compile with confusing TeX errors. Requires TYPLEAF_SESSION.

list_projectsA

List all projects on your Typleaf instance. Requires TYPLEAF_SESSION. Returns project names and IDs — use any ID with other tools.

list_filesA

List files in a Typleaf project, optionally filtered by extension.

read_fileA

Read the contents of a file from a Typleaf project.

project_infoA

Report what KIND of project this is before doing anything else: whether it is Typst or LaTeX, which file is the likely compile root, how many source files it has, and which bibliography files it declares. Cheap (one file listing, no compile). Call this first when you do not already know the project's format — it tells you whether to write = Heading or \section{}.

search_filesA

Regex search across every text file in the project. Use this to answer 'which files call X?' or 'where is Y defined?' — it is one request regardless of project size, whereas list_files plus read_file per candidate is one round trip per file and pulls whole documents into context to find a few lines.

Returns file, line number and the matching line, grouped by file. Binary files are skipped. Results are capped and the cap is reported, so a truncated result is never mistaken for a complete one.

verify_citationsA

Detect likely-hallucinated references in the project's bibliography. Reads the project's bibliography — BibTeX (.bib) and Typst's native Hayagriva (.yml) alike — then verifies each entry's DOI / arXiv id against free authoritative catalogues (CrossRef, arXiv) with ZERO LLM calls. Returns three buckets: verified (catalogue match), suspicious (a concrete identifier that definitively does NOT resolve — high-confidence), and unverifiable (no identifier / coverage gap / book / rate-limit — reported separately and NEVER as fabrication). For a Typst project it ALSO reports keys cited in the source with no matching bibliography entry, which render as broken '?' references. Use to sanity-check an AI-assisted draft before submission.

get_sectionsA

Parse a source file and extract its heading structure. Typst (.typ) and LaTeX (.tex) are both supported; the parser is chosen from the file extension. For Typst this reports =-markup headings (the same ones the Typleaf editor's outline pane shows) as heading1..headingN; for LaTeX, \section/\subsection/etc. Returns types, titles, hierarchy levels, and content previews.

get_section_contentA

Get the full content of a specific section by its title. Typst (.typ) and LaTeX (.tex) are both supported; the parser is chosen from the file extension.

list_historyA

Show git commit history for the project.

get_diffA

Get a git diff between refs or the working tree. Useful for reviewing recent changes.

status_summaryA

Get a quick overview: format (Typst or LaTeX), file count, and the heading structure of the root document.

edit_fileB

Surgical search-and-replace edit in a file. old_string must match exactly once. Commits and pushes immediately.

rewrite_fileB

Replace entire file contents. Commits and pushes immediately.

update_sectionB

Update a section's body by title, preserving its heading line. Typst (.typ) and LaTeX (.tex) are both supported; the parser is chosen from the file extension. Commits and pushes immediately.

write_filesA

Apply a coordinated change across SEVERAL files, all-or-nothing. Use this instead of calling edit_file/rewrite_file in a loop whenever the edits belong together — converting call sites to a new helper, renaming a symbol across chapters, updating a template and its users. A loop that fails halfway leaves the project in a state that is neither old nor new, and you find out when the compile breaks.

Every edit is validated and resolved BEFORE anything is written, so the common failures (missing file, search string matching twice or not at all, bad path) touch nothing. If a write still fails, the files already written are restored. Each entry takes either content (full replacement) or old_string+new_string (surgical, must match exactly once).

set_compilerA

Set the project's compiler — most often to 'typst'. This is what makes a project a Typst project: Typleaf's CLSI only builds a Typst sync map when the compiler is 'typst' AND the root document ends in .typ, so a project full of .typ files left on pdflatex fails with TeX errors that never mention Typst, and PDF-position tools (locate_in_pdf, section_page_map) silently return nothing. Requires TYPLEAF_SESSION.

sync_projectA

Pull the latest changes from Typleaf (git pull).

upload_fileA

Upload a local (possibly BINARY) file into a Typleaf project. Use this for images (PNG/JPG), PDFs, and other non-text assets that must not be UTF-8 decoded. Commits and pushes immediately.

delete_fileC

Delete a file from the project. Commits and pushes immediately.

compile_projectA

Trigger PDF compilation on Typleaf. Returns compilation status and output file list. Works for Typst and LaTeX alike — the engine comes from the project's compiler setting (see set_compiler). Requires TYPLEAF_SESSION.

download_pdfA

Download the compiled PDF to a local path. Call compile_project first. Requires TYPLEAF_SESSION.

download_logA

Fetch the compilation log from Typleaf and summarise it. For a Typst project the log holds typst's own error: / warning: diagnostics with file:line:column (typst writes no TeX-style log at all), and this tool parses them into a compact list. For a LaTeX project the raw log is returned. Requires TYPLEAF_SESSION.

get_page_countA

Compile the project and report the TOTAL number of pages in the PDF. Use this to answer 'how many pages is it?' or to drive a fill-exactly-N-pages editing loop. For LaTeX the count is read from the log; for Typst it is measured from the PDF, since typst prints no page count anywhere. Requires TYPLEAF_SESSION.

locate_in_pdfA

Find WHERE a given source line lands in the compiled PDF. Returns the page number and bounding rectangle(s) {page,h,v,width,height} in PostScript points (v measured from the page top). Omit file to use the compile root. This is the element→page-position capability the source parser cannot provide.

Backed by SyncTeX for LaTeX and by Typleaf's Typst sync map for Typst. The Typst result is COARSER: it resolves to the enclosing block rather than the exact line, and content inside #let/#show template bodies or repeated #for loops carries no anchor at all. Requires TYPLEAF_SESSION.

section_page_mapA

Compile once, then map EVERY heading to the PDF page it starts on, plus the total page count and how full the last page is. This is the 'perceive the position of each element on the page' overview — ideal for judging how content is distributed across pages and for a fill-exactly-N-pages workflow. Omit file to use the compile root.

Cost differs by format: a LaTeX project resolves every heading from one offline SyncTeX parse, while a Typst project needs one request PER heading (Typleaf keeps its sync map inside the build directory, so there is nothing to download) — slow on a long document, and it can race the server's build eviction. The text-area fullness figures are LaTeX-only; Typst reports no page geometry. Requires TYPLEAF_SESSION.

download_source_zipA

Download the full project source as a ZIP file to a local path. Requires TYPLEAF_SESSION.

download_sourceA

Download the project source and extract it into a local directory. Creates the directory if missing. Fails if the directory is not empty unless overwrite=true. Requires TYPLEAF_SESSION.

Prompts

Interactive templates invoked by user choice

NameDescription

No prompts

Resources

Contextual data attached and managed by the client

NameDescription

No resources

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/superzeldalink/typleaf-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server