Class JsonFormatTool
A built-in tool for formatting or minifying JSON strings.
Pretty-prints JSON with indentation by default, or minifies to a compact single-line representation when requested.
public sealed class JsonFormatTool : IBuiltInTool, ITool, IToolMetadata
- Inheritance
-
JsonFormatTool
- Implements
- Inherited Members
Examples
var tool = new JsonFormatTool();
var result = await tool.InvokeAsync(@"{""json"":""{\"name\":\"Alice\"}""}");
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.