{
  "openapi": "3.0.0",
  "info": {
    "title": "Copy Markdown Agent Tools",
    "version": "1.1.7",
    "description": "Zero-bloat Webpage to Markdown DOM extraction tools for AI agents and LLMs."
  },
  "paths": {
    "/extract": {
      "post": {
        "summary": "Extract structured markdown from DOM or webpage",
        "description": "Parses HTML content into clean GitHub Flavored Markdown with land-mark prioritization and noise filtering.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "mode": { "type": "string", "enum": ["content", "design", "links"], "default": "content" },
                  "includeImages": { "type": "boolean", "default": false },
                  "includeMeta": { "type": "boolean", "default": false }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successfully parsed Markdown",
            "content": {
              "text/markdown": {
                "schema": { "type": "string" }
              },
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "markdown": { "type": "string" },
                    "stats": { "type": "object" }
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}
