Skip to main content
Glama

typst_write_file

Create or overwrite text files in Typst projects, syncing Yjs CRDT updates via WebSocket and REST.

Instructions

Create or overwrite a text file (.typ, .bib, .toml, etc.) in a https://typst.app project, synchronizing the Yjs CRDT update via WebSocket (/editing/v3) and REST (/v1/files/:projectId/:fileId/yjs).

Input Schema

NameRequiredDescriptionDefault
contentYesFull UTF-8 text content to write
filePathYesFile path/name (e.g. 'main.typ') or file ID
projectIdYesThe Typst project ID
preferWebSocketNoAlso push real-time TextUpdate over /editing/v3 WebSocket before REST persistence (default: true)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.2

TDQS

B3.2/5.0
Behavior3/5

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

No annotations are provided, so the description carries the behavioral burden. It usefully discloses Yjs CRDT synchronization via WebSocket and REST endpoints and notes that it creates or overwrites, but it omits authentication requirements, overwrite consequences, error behavior, and limits.

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

Conciseness4/5

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

It is a single front-loaded sentence with the main action stated first. The WebSocket/REST detail is dense but still relevant, and there is little wasted text.

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

Completeness3/5

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

For a mutation tool with no annotations and no output schema, the description is adequate but incomplete: it does not mention authentication prerequisites, failure modes, return behavior, or how it relates to typst_edit_file. The fully described input schema compensates partially.

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

Parameters3/5

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

Schema coverage is 100%, and all four parameters are already documented in the input schema. The description adds only file-type examples and no additional parameter semantics, so the baseline of 3 is appropriate.

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

Purpose4/5

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

The description states a specific verb and resource: "Create or overwrite a text file" in a typst.app project. It is clear what the tool does, though it does not explicitly distinguish itself from the sibling typst_edit_file tool.

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

Usage Guidelines2/5

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

It implies use for creating or overwriting files but gives no explicit guidance on when to use this versus typst_edit_file or other file tools. There are no when-not conditions or alternative recommendations.

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