Class HtmlExtractTool
A built-in tool for extracting structured data from HTML content.
Supports extracting plain text, links, images, metadata, tables, or arbitrary elements by tag name.
public sealed class HtmlExtractTool : IBuiltInTool, ITool, IToolMetadata
- Inheritance
-
HtmlExtractTool
- Implements
- Inherited Members
Examples
var tool = new HtmlExtractTool();
var result = await tool.InvokeAsync(@"{""html"":""<a href='x'>link</a>"",""target"":""links""}");
Remarks
Uses regex-based parsing. For complex HTML, consider a proper HTML parser library.
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.