Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewHTTPHandler ¶
func NewHTTPHandler() *mcp.StreamableHTTPHandler
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)
Click to show internal directories.
Click to hide internal directories.