AgentPM™

@zack/document-convert

Convert local documents into normalized markdown or plain text with lightweight metadata.

Install
agentpm install @zack/document-convert@0.1.0
Load
Weekly downloads
1
0%
Last publish
1d ago
v0.1.0
agent.json
{
  "name": "document-convert",
  "version": "0.1.0",
  "description": "Convert local documents into normalized markdown or plain text with lightweight metadata.",
  "files": [
    "document_convert/"
  ],
  "entrypoint": {
    "args": [
      "-u",
      "document_convert/__main__.py"
    ],
    "command": "python",
    "timeout_ms": 30000
  },
  "inputs": {
    "type": "object",
    "required": [
      "path"
    ],
    "properties": {
      "path": {
        "type": "string",
        "description": "Path to the local document to convert."
      },
      "to_format": {
        "enum": [
          "markdown",
          "text"
        ],
        "type": "string",
        "default": "markdown",
        "description": "Desired output format for the converted document."
      },
      "extract_metadata": {
        "type": "boolean",
        "default": true,
        "description": "Whether to include file and conversion metadata in the output."
      }
    },
    "additionalProperties": false
  },
  "outputs": {
    "oneOf": [
      {
        "type": "object",
        "required": [
          "ok",
          "path",
          "media_type",
          "content",
          "metadata"
        ],
        "properties": {
          "ok": {
            "const": true,
            "description": "True when document conversion succeeded."
          },
          "path": {
            "type": "string",
            "description": "Original file path supplied to the tool."
          },
          "content": {
            "type": "string",
            "description": "Converted document content."
          },
          "metadata": {
            "type": "object",
            "description": "File and conversion metadata.",
            "additionalProperties": true
          },
          "media_type": {
            "type": "string",
            "description": "Detected media type for the input file."
          }
        },
        "additionalProperties": false
      },
      {
        "type": "object",
        "required": [
          "ok",
          "error"
        ],
        "properties": {
          "ok": {
            "const": false,
            "description": "False when validation or conversion failed."
          },
          "error": {
            "type": "object",
            "required": [
              "code",
              "message"
            ],
            "properties": {
              "code": {
                "type": "string",
                "description": "Stable machine-readable error code."
              },
              "message": {
                "type": "string",
                "description": "Human-readable explanation of the failure."
              }
            },
            "description": "Structured error returned by the tool.",
            "additionalProperties": true
          }
        },
        "additionalProperties": false
      }
    ]
  },
  "readme": "README.md",
  "license": {
    "spdx": "MIT"
  },
  "runtime": {
    "type": "python",
    "version": "3.11"
  }
}
Compatibility
NodePython