Class XmlConvertTool
A built-in tool for converting between XML and JSON formats, or pretty-printing XML.
Supports converting XML to JSON, JSON to XML, and formatting (pretty-printing) XML.
public sealed class XmlConvertTool : IBuiltInTool, ITool, IToolMetadata
- Inheritance
-
XmlConvertTool
- Implements
- Inherited Members
Examples
var tool = new XmlConvertTool();
registry.Register(tool);
// Agent can now: convert XML to JSON, convert JSON to XML, pretty-print XML
Constructors
- XmlConvertTool()
Initializes a new instance.
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.