Table of Contents

Class DatabaseQueryTool

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

A built-in tool for executing read-only SQL queries on a SQLite database.

Supports executing SELECT queries, listing tables, and inspecting table schemas. All operations open the database in read-only mode, ensuring no data is modified.

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

Examples

var queryTool = new DatabaseQueryTool();
var result = await queryTool.InvokeAsync(@"{""database"":""data.db"",""sql"":""SELECT * FROM users""}");

Constructors

DatabaseQueryTool()

Initializes a new instance with default options.

DatabaseQueryTool(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.

Share