Skip to main content
Glama

create_document_from_xml

Create a Word .docx file directly from XML, saving it to a chosen path. This lets XML-producing workflows like XSLT generate styled reports without requiring .NET, OOXML, or the Word DSL API.

Instructions

Builds a new Word document from XML matching Kookerella.FsWordDsl's own embedded schema (Xml.xsd) and saves it to disk - the inverse of generate_xml. The natural target for a caller that already produces data as XML (e.g. an XSLT pipeline generating a report) and wants to reach Word without learning the OOXML schema, this library's own F#/C# API, or needing .NET installed at all - like generate_xml, the .NET work happens inside this server, so any language can call it directly, and a human with no MCP client at all can get the same result via fsworddsl-mcp build from a plain shell. Covers the same section/paragraph-level feature set generate_xml does; unlike create_document, this isn't limited to plain paragraph text - named styles, tables, images, and every other modeled feature can be expressed in the XML.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
xmlYesThe document XML content - a <document> root element matching Xml.xsd.
pathYesOutput file path, e.g. "C:\reports\memo.docx". The directory must already exist.

Schema Changelog

Changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. First observedv0.1.0

TDQS

A4.2/5.0
Behavior4/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure, and it does so well: it states the side effect of saving to disk, places execution server-side, notes that .NET is not needed by the caller, and gives the CLI equivalent. It does not explicitly describe return values or error/validation behavior, but it is otherwise transparent about what the tool does and how it operates.

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

Conciseness3/5

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

The core purpose is front-loaded, and the comparisons with generate_xml and create_document are valuable. However, the description is long and includes tangential details such as the plain-shell CLI path and the fact that any language can call it; these are useful context but could be trimmed without losing essential selection and invocation guidance.

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

Completeness4/5

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

Given the tool's complexity and the absence of annotations and output schema, the description is largely complete: it explains when to use it, what feature set it covers, how it relates to siblings, and where the heavy lifting happens. The only real gaps are explicit return-value expectations and behavior on validation failure or file overwrite, but these do not severely undermine the agent's ability to call it correctly.

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%, so the input schema already fully documents the xml and path parameters. The description reinforces that the XML must match Xml.xsd and that the output is a Word document saved to disk, but it does not add substantial parameter-level meaning beyond what the schema provides. The baseline of 3 is appropriate.

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?

The description opens with a specific verb and resource: 'Builds a new Word document from XML ... and saves it to disk.' It also distinguishes this tool from close siblings by calling it the inverse of generate_xml and by contrasting it with create_document, which is limited to plain paragraph text. This makes the tool's purpose and scope immediately clear.

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

Usage Guidelines5/5

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

The description gives explicit guidance on when to use this tool: when a caller already produces XML, wants to reach Word without learning OOXML, the library API, or .NET, and needs the full feature set including styles, tables, and images. It names alternatives (generate_xml and create_document) and even clarifies the exclusions: unlike create_document, this tool is not limited to plain text.

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

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/Kookerella-Ltd/Kookerella.FsWordDsl'

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