wraft-mcp
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| PORT | No | Listen port (default 8080). | 8080 |
| WRAFT_API_KEY | Yes | Wraft API key (unscoped; use least-privilege user). | |
| MAX_BODY_BYTES | No | Request body cap (default 2 MiB). | 2 MiB |
| WRAFT_BASE_URL | Yes | Upstream Wraft instance. Must be https:// (http://localhost allowed for local testing only). | |
| ALLOWED_ORIGINS | No | Comma-separated browser origins. Fail-closed: unset = every request with Origin header rejected. |
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
| Capability | Details |
|---|---|
| tools | {} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| list_content_typesA | List Wraft content types (document variants such as NDA, Offer Letter). Each includes its fields (name, type, required) — field names determine the machine names used by create_document_from_template. Paginated. |
| list_data_templatesA | List Wraft data templates (pre-authored document bodies with fillable placeholder fields). Use a template id with get_data_template or create_document_from_template. Paginated. |
| get_data_templateA | Get one data template with its content type and fields. The content_type.fields list gives each field's name; the machine name for create_document_from_template is the lowercased name with spaces as underscores and other characters stripped (e.g. "Client Name" → client_name). |
| create_data_templateA | Author a new data template for a content type from markdown. Write [Field Name] placeholders in the body and title_template — they become fillable holder fields, and MUST match the content type's field names (see list_content_types). Supported markdown: #-###### headings, paragraphs, - bullets, 1. numbered lists, > quotes, ---, bold, italic. The result reports any placeholders that didn't match a field (left as plain text) — fix and recreate if needed. NOT idempotent. |
| list_documentsA | List documents (content instances) in the organisation. Paginated — check total_pages and paginate before concluding a document doesn't exist. |
| get_documentA | Get one document with its content, content type, state, versions, and approval systems. |
| create_document_from_templateA | PREFERRED way to create a document: fills a data template's placeholder fields and creates the document in one step. Get field machine names from get_data_template (content_type.fields → lowercase name, spaces to underscores, e.g. "Client Name" → client_name). NOT idempotent: if the call times out, the document may still have been created — list_documents before retrying. |
| create_documentA | Create a document from a raw payload (escape hatch — prefer create_document_from_template). serialized must be an object: {title, body (markdown), serialized (JSON-encoded ProseMirror doc), fields (JSON-encoded field-values map)}. NOT idempotent: if the call times out, the document may still have been created — list_documents before retrying. |
| update_documentA | Update a document's content. serialized has the same object shape as create_document. Fails if the document is no longer editable (approval flow complete). Metadata is NOT updated here. NOT idempotent: if the call times out, the document may still have been created — list_documents before retrying. |
| build_documentA | Generate the document's PDF. Runs synchronously and can take up to two minutes — do not retry a timed-out build without checking get_document first (the build may have completed; retrying creates another build version). Fails with 422 if the document is locked (approval flow complete). |
| transition_document_stateA | Move a document to another state in its flow. Get valid state ids from list_flow_states (the document's flow is on its content type). Transitions may be rejected if the flow requires an approver the API key's user is not. |
| list_flowsA | List Wraft approval flows. Paginated. |
| get_flowC | Get one flow with its states. |
| list_flow_statesA | List the states of a flow in order (returns a plain array, not paginated). Use a state's id with transition_document_state. Note: states can carry approver requirements — a transition may be rejected if the API key's user is not an eligible approver. |
| whoamiA | Get the current user for the configured API key (name, email, organisation, roles). Use to verify connectivity and see which organisation the key operates on. |
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
No prompts | |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
No resources | |
TDQS
Scored across 15 tools
Most tools target distinct resources and actions (documents, templates, flows, content types), with clear verb-prefixed names. The main potential confusion is between create_document_from_template and create_document, and between get_flow and list_flow_states, but the descriptions clarify their respective purposes well.
The majority follow a consistent verb_noun pattern: get_, list_, create_, update_, build_, transition_. The only outlier is 'whoami', a common utility convention, so it doesn't disrupt overall readability.
With 15 tools, the server sits at the upper end of the ideal range but every tool serves a distinct necessary function for document management, template authoring, and approval flows. No redundant or superfluous tools are present.
Core document lifecycle is covered: create (two ways), read, update, build PDF, and transition states. Missing delete operations for documents/templates and an update for data templates are minor gaps that agents can work around, but they don't prevent primary workflows.