Class DoclingTools

java.lang.Object
com.tnsai.tools.document.docling.DoclingTools

public final class DoclingTools extends Object
Function-shape toolkit for advanced document conversion through Docling.
  • Field Details

    • DEFAULT_EXTENSIONS

      public static final Set<String> DEFAULT_EXTENSIONS
      Formats admitted by the Docling document converter.
  • Constructor Details

    • DoclingTools

      public DoclingTools()
      Creates a safe unavailable toolkit; configure MCP or CLI explicitly to enable parsing.
    • DoclingTools

      public DoclingTools(DoclingProvider provider)
    • DoclingTools

      public DoclingTools(DoclingProvider provider, FileGuardConfig guardConfig)
  • Method Details

    • builder

      public static DoclingTools.Builder builder()
    • isAvailable

      public boolean isAvailable()
      Returns whether the configured MCP or subprocess provider is available.
    • parse

      public DocumentResult parse(Path source) throws IOException
      Parses a local file and returns Docling's structured output.
      Throws:
      IOException
    • doclingParse

      @Tool(name="docling_parse", description="Parse a local document with Docling and return bounded Markdown. Use the direct Java parse(Path) API when tables, formulas, figures, or lossless Docling JSON are needed.", keywords={"docling","document","pdf","table","formula","ocr","parse"}, idempotent=true) public String doclingParse(@ToolParam(description="Local document path under the configured file sandbox") String path) throws IOException
      Throws:
      IOException