Class RegexValidateTool
A built-in tool for validating regex patterns and escaping special characters.
Validates whether a pattern is syntactically correct and reports its capture groups, or escapes special regex characters in a string for safe literal matching.
public sealed class RegexValidateTool : IBuiltInTool, ITool, IToolMetadata
- Inheritance
-
RegexValidateTool
- Implements
- Inherited Members
Examples
var tool = new RegexValidateTool();
registry.Register(tool);
// Agent can now: validate regex patterns, escape text for regex
Constructors
- RegexValidateTool()
Initializes a new instance with default settings.
- RegexValidateTool(RegexToolOptions)
Initializes a new instance with custom options.
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.