Table of Contents

Class EncodingConvertTool

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

Converts text between encodings, encodes text to bytes, decodes bytes to text, or fixes mojibake.

Supports all standard .NET encodings including UTF-8, UTF-16, ISO-8859-1, Windows-1252, Shift-JIS, and more.

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

Examples

Letting an agent re-encode text or fix mojibake during a doc-cleanup task:

using LMKit.Agents;
using LMKit.Agents.Tools.BuiltIn.Text;

var agent = Agent.CreateBuilder(model) .WithTools(t => t.Register(new EncodingConvertTool())) .Build();

var result = await agent.RunAsync("Re-encode this Latin-1 byte stream to UTF-8: 48 65 6C 6C 6F E9");

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