tools

package
v0.22.1 Latest Latest
Warning

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

Go to latest
Published: May 7, 2026 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Module = fx.Options(
	fx.Provide(
		fx.Annotate(
			NewQueryTool,
			fx.ResultTags(`group:"vef:mcp:tools"`),
		),
	),
)

Module provides MCP built-in tools.

Functions

func NewQueryTool

func NewQueryTool(db orm.DB) mcp.ToolProvider

NewQueryTool creates a new QueryTool instance.

Types

type QueryArgs

type QueryArgs struct {
	SQL    string `json:"sql" jsonschema:"required,description=The SQL query with placeholders (?) for parameters"`
	Params []any  `json:"params,omitempty" jsonschema:"description=Parameters for the SQL query placeholders"`
}

QueryArgs defines the expected arguments for the database_query tool.

type QueryTool

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

QueryTool provides MCP tool for executing parameterized SQL queries.

func (*QueryTool) Tools

func (t *QueryTool) Tools() []mcp.ToolDefinition

Tools implements mcp.ToolProvider.

Jump to

Keyboard shortcuts

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