Skip to main content
Glama

generate_fsharp_script

Convert a Word document into an F# script that rebuilds an equivalent file via dotnet fsi. Use it to inspect structure or extend with styles, tables, images, headers/footers, comments, and more.

Instructions

Reads an existing Word document and returns a self-contained F# script (using Kookerella.FsWordDsl) that rebuilds an equivalent file when run via dotnet fsi. Useful for explaining how a file is structured, or as a starting point for a caller who wants the library's full feature set (named styles, tables, images, headers/footers, comments, track changes, content controls, etc.) beyond what create_document exposes.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathYesPath to an existing .docx/.docm file to reverse-engineer into F# source.
outputFileNameYesThe output filename the generated script should save its rebuilt file to, e.g. "output.docx".

Schema Changelog

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

  1. First observedv0.1.0

TDQS

A4.4/5.0
Behavior4/5

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

With no annotations provided, the description carries full behavioral disclosure burden. It communicates that the tool reads an existing file, that it does not modify the input (it reverse-engineers), and that the output is a script requiring dotnet fsi to run. It also discloses the generated script's save target via outputFileName. It does not mention side effects, but the read-only nature is implied by 'Reads an existing Word document... reverse-engineer'.

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

Conciseness5/5

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

The description is a single, dense paragraph that front-loads the core action (reads a document, returns a script) and then provides the purpose and differentiation. Every sentence earns its place, with no filler or repetition of the schema.

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 2 required params with full schema coverage, no output schema, and no nested objects, the description covers the essential context: input, output, runtime requirement (dotnet fsi), and differentiation from create_document. It doesn't explicitly mention error cases or file access implications, but for a read-and-generate tool with this schema, the description is sufficiently complete.

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

Parameters4/5

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

Schema description coverage is 100%, so the schema fully documents both parameters. The description adds context to outputFileName by explaining that it is the filename the generated script should save its rebuilt file to, reinforcing the parameter's role in the generated output. This goes slightly beyond the schema's own description, which is helpful for an agent.

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 clearly states a specific verb ('Reads... and returns'), a specific resource (existing Word document), and the output (self-contained F# script). It also distinguishes itself from create_document by explaining it exposes the full library feature set, which differentiates it from sibling tools.

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?

The description provides clear usage context: useful for explaining a file's structure or as a starting point for full-feature generation. It implicitly contrasts with create_document, which is a key alternative among siblings, though it does not explicitly say 'when not to use this tool'. The intended use cases are clear enough for an agent to select it appropriately.

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