Class DatabaseVacuumTool
A built-in tool for compacting and optimizing a SQLite database by running VACUUM.
Reclaims unused space and defragments the database file. Reports the file size before and after the operation.
public sealed class DatabaseVacuumTool : IBuiltInTool, ITool, IToolMetadata
- Inheritance
-
DatabaseVacuumTool
- Implements
- Inherited Members
Examples
var options = new DatabaseToolOptions { AllowWrite = true };
var vacuumTool = new DatabaseVacuumTool(options);
var result = await vacuumTool.InvokeAsync(@"{""database"":""data.db""}");
Constructors
- DatabaseVacuumTool()
Initializes a new instance with default options.
- DatabaseVacuumTool(DatabaseToolOptions)
Initializes a new instance with the specified 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.