Table of Contents

Class HtmlEncodeTool

Namespace
LMKit.Agents.Tools.BuiltIn.Data
Assembly
LM-Kit.NET.dll

A built-in tool for encoding or decoding HTML entities.

Converts special characters to their HTML entity equivalents (encode), or converts HTML entities back to their original characters (decode).

public sealed class HtmlEncodeTool : IBuiltInTool, ITool, IToolMetadata
Inheritance
HtmlEncodeTool
Implements
Inherited Members

Examples

var tool = new HtmlEncodeTool();
// Encode: < becomes &lt;
var encoded = await tool.InvokeAsync(@"{""text"":""<div>hello</div>""}");
// Decode: &lt; becomes <
var decoded = await tool.InvokeAsync(@"{""text"":""&lt;div&gt;hello&lt;/div&gt;"",""decode"":true}");

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.

Share