Class DocumentToMarkdownTool
Converts any supported document (PDF, DOCX, HTML, EML, MBOX, XLSX, PPTX, images, plain text) to Markdown using the unified DocumentToMarkdown converter.
public sealed class DocumentToMarkdownTool : IBuiltInTool, ITool, IToolMetadata
- Inheritance
-
DocumentToMarkdownTool
- Implements
- Inherited Members
Examples
Letting an agent normalize uploaded documents to Markdown for downstream RAG indexing:
using LMKit.Agents;
using LMKit.Agents.Tools.BuiltIn.Document;
var agent = Agent.CreateBuilder(model)
.WithTools(t => t.Register(new DocumentToMarkdownTool()))
.Build();
var result = await agent.RunAsync(@"Convert C:\docs\spec.pdf to Markdown and save it next to the source.");
Properties
- Description
Gets a concise description of what the tool does.
- InputSchema
Gets the JSON Schema defining the expected input arguments.
- Name
Gets the stable, unique identifier for this tool.
Methods
- InvokeAsync(string, CancellationToken)
Executes the tool with the specified JSON arguments.