Class CurrencyFormatTool
A built-in tool for formatting, parsing, and rounding currency amounts, and retrieving currency metadata.
Supports locale-aware formatting with symbols, parsing currency strings back to numeric values, rounding with multiple modes (banker, standard, up, down, truncate), and querying currency info by code.
public sealed class CurrencyFormatTool : IBuiltInTool, ITool, IToolMetadata
- Inheritance
-
CurrencyFormatTool
- Implements
- Inherited Members
Examples
var tool = new CurrencyFormatTool();
var result = await tool.InvokeAsync(@"{""action"":""format"",""amount"":1234.56,""currency"":""EUR""}");
Constructors
- CurrencyFormatTool()
Initializes a new instance of the CurrencyFormatTool class.
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.