{
  "name": "docx-to-markdown",
  "summary": "Converts a Word .docx to Markdown, surfacing anything that did not translate as warnings.",
  "rationale": "A faithful docx→Markdown conversion needs a real OOXML engine plus a hardened fetch: an agent that fetches the URL itself walks past every SSRF control, and carrying mammoth per call is not something an agent does inline.",
  "family": "documents",
  "price_usd": "0.005",
  "free": false,
  "timeout_ms": 40000,
  "max_timeout_seconds": 61,
  "input_schema": {
    "$schema": "https://json-schema.org/draft/2020-12/schema",
    "type": "object",
    "properties": {
      "url": {
        "type": "string",
        "maxLength": 2048,
        "format": "uri",
        "description": "Absolute http(s) URL of the .docx, up to 2048 characters; redirects are followed, the body must be a zip, and mammoth must find a Word document in it."
      }
    },
    "required": [
      "url"
    ],
    "additionalProperties": false
  },
  "input_example": {
    "url": "https://grist.tools/samples/documents/garden-handbook.docx"
  },
  "output_example": {
    "source_url": "https://grist.tools/samples/documents/garden-handbook.docx",
    "chars": 341,
    "warnings": [],
    "markdown": "# Community Garden Handbook\n\nPlots are assigned for **one season** and renewed each spring.\n\n## Watering\n\n-   Water early in the morning.\n-   Use the rain barrels first.\n-   Log each watering on the shed board.\n\n## Tools\n\nReturn every tool to the shed _before sunset_.\n\nThe seasonal calendar lives on [the garden site](https://grist.tools/)."
  },
  "errors": [
    "invalid_input",
    "blocked_target",
    "unreachable_target",
    "upstream_timeout",
    "unsupported_content_type",
    "too_large",
    "unprocessable",
    "internal"
  ]
}