Class DurationParseTool
A built-in tool for parsing and formatting time durations.
Parse human-readable durations like "2h30m", format to various styles, convert to different units.
public sealed class DurationParseTool : IBuiltInTool, ITool, IToolMetadata
- Inheritance
-
DurationParseTool
- Implements
- Inherited Members
Examples
var tool = new DurationParseTool();
registry.Register(tool);
// Agent can now use: parse durations, format to human-readable, convert units
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.