tool

package
v1.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 17, 2026 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Tool

type Tool struct {
	// contains filtered or unexported fields
}

func NewTool

func NewTool(db *sql.DB, engineType string) *Tool

func (*Tool) ExecuteQuery

func (t *Tool) ExecuteQuery() (
	*mcp.Tool,
	mcp.ToolHandlerFor[ToolInput, ToolOutput],
)

type ToolInput

type ToolInput struct {
	Query string `json:"query" jsonschema:"SQL SELECT query to execute on the database (maximum 50 rows)"`
}

type ToolOutput

type ToolOutput struct {
	Detail   string           `json:"detail" jsonschema:"Message describing the result of the query execution"`
	RowCount int              `json:"row_count" jsonschema:"Number of rows returned by the query"`
	Results  []map[string]any `json:"results" jsonschema:"Results of the query execution"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL