Table of Contents

Class CurrencyMathTool

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

A built-in tool for currency arithmetic with proper banker's rounding.

Supports add, subtract, multiply, divide, and compare operations on currency amounts, automatically rounding to the correct number of decimal places for the specified currency.

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

Examples

var tool = new CurrencyMathTool();
var result = await tool.InvokeAsync(@"{""amount"":100.50,""amount2"":49.99,""currency"":""USD"",""op"":""add""}");

Constructors

CurrencyMathTool()

Initializes a new instance of the CurrencyMathTool 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.

Share