Skip to main content
Glama

Create document on letterhead

create_matter_document

Typesets markdown as a PDF or DOCX on the firm's letterhead and files it in the matter's Dropbox folder. Does not overwrite. A first call returns a preview; a second call with confirm true and that preview_id applies the change. Sign-in required.

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": {
      "matter_id": "<matter_id>",
      "title": "<title>",
      "markdown": "<markdown>"
    },
    "name": "create_matter_document"
  }
}

Input Schema

NameRequiredDescriptionDefault
titleYesDocument title, printed under the letterhead. Also the file name unless file_name is given.
formatNopdf (default) or docx for an editable copy.
confirmNofalse or omitted returns a preview; true applies the change identified by preview_id.
markdownYesDocument body as markdown: headings, lists, bold/italic, quotes.
file_nameNoOptional file name without extension. Fails if a file with that name already exists.
matter_idYesMatter identifier from find_matter or list_open_matters.
subfolderNoOptional existing folder inside the matter folder.
preview_idNopreview_id is the id returned by this tool's preview call. Required when confirm is true.
idempotency_keyNoOptional. A retry with the same key returns the first result without a second write. Defaults to preview_id.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed5 schema fields changed
    • changedInput schema / properties / confirm / description
      Previous value: -"Must be omitted or false on the first call — that only previews. Never invent a preview_id. After the person agrees, call again with confirm: true AND the preview_id this server returned."New value: +"false or omitted returns a preview; true applies the change identified by preview_id."
    • changedInput schema / properties / file_name / description
      Previous value: -"Optional file name without extension. Must not already exist."New value: +"Optional file name without extension. Fails if a file with that name already exists."
    • changedInput schema / properties / idempotency_key / description
      Previous value: -"Optional. A retry with the same key returns the first result instead of writing again. Defaults to preview_id."New value: +"Optional. A retry with the same key returns the first result without a second write. Defaults to preview_id."
    • changedInput schema / properties / markdown / description
      Previous value: -"The document body you wrote, as markdown: headings, lists, bold/italic, quotes."New value: +"Document body as markdown: headings, lists, bold/italic, quotes."
    • changedInput schema / properties / preview_id / description
      Previous value: -"Exactly the preview_id this server returned on a prior call for these arguments. Required with confirm: true. Never generate or reuse one from another tool or conversation."New value: +"preview_id is the id returned by this tool's preview call. Required when confirm is true."
  2. First observed

TDQS

A3.8/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=false, destructiveHint=false and openWorldHint=false, so mutation scope is partly structured. The description adds real value beyond that: the two-call preview/apply protocol, the non-overwrite guarantee, and the sign-in requirement. It stops short of describing what the preview returns or what happens to the preview on error, so it earns credit but not top marks.

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?

Four short sentences with the core action front-loaded and the preview protocol second; sign-in last. Nothing is wasted, though the sentences are terse enough that the preview step reads slightly telegraphically.

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 9-parameter mutation with no output schema, the description covers the safety-critical behavior (no overwrite, confirm gate, auth). It leaves open what the preview returns and how a stale preview_id behaves after file changes, which an agent would benefit from knowing before calling.

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 description coverage is 100% and every parameter, including confirm, preview_id and idempotency_key, is already documented in the schema. The description reinforces the confirm/preview_id relationship but adds no format or constraint detail the schema lacks, so baseline 3 applies.

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?

States a specific verb and resource ('Typesets markdown as a PDF or DOCX on the firm's letterhead') plus the destination ('files it in the matter's Dropbox folder'). That distinguishes it cleanly from siblings like create_dropbox_folder or download_matter_document without needing the schema.

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

Usage Guidelines4/5

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

Gives clear operational context: preview-first then confirm with preview_id, no overwriting, sign-in required. It doesn't name an explicit alternative for cases like editing an existing document, but the when-to-use context for a new letterhead document is unambiguous.

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