mcp

package
v0.10.4 Latest Latest
Warning

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

Go to latest
Published: Apr 16, 2026 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewHTTPHandler

func NewHTTPHandler() *mcp.StreamableHTTPHandler

func NewServer

func NewServer() *mcp.Server

Types

type DatabasesInput

type DatabasesInput struct {
}

type DatabasesOutput

type DatabasesOutput struct {
	Databases []string `json:"databases" jsonschema:"The list of database identifiers.,example=[\"ha.db\", \"test.db\"]"`
}

func Databases

func Databases(ctx context.Context, req *mcp.CallToolRequest, input DatabasesInput) (result *mcp.CallToolResult, output DatabasesOutput, err error)

type QueryInput

type QueryInput struct {
	DatabaseID string `json:"database_id" jsonschema:"The identifier of the database to query.,example=ha.db"`
	// The query string to be executed.
	Query string `json:"query" jsonschema:"The query string to be executed.,example=SELECT * FROM users WHERE active = true"`
	// Optional parameters for the query.
	Params map[string]any `json:"params,omitempty" jsonschema:"Optional parameters for the query.,example={\"limit\": 10, \"offset\": 0}"`
}

type QueryOutput

type QueryOutput struct {
	// The results of the query.
	Results [][]any `` /* 128-byte string literal not displayed */
}

func Query

func Query(ctx context.Context, req *mcp.CallToolRequest, input QueryInput) (result *mcp.CallToolResult, output QueryOutput, err error)

Jump to

Keyboard shortcuts

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