ormcp

package
v0.9.6 Latest Latest
Warning

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

Go to latest
Published: Jun 17, 2026 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DaemonProvider added in v0.9.6

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

DaemonProvider implements mcp.ToolProvider for the MCP daemon. Tools are registered at startup; SetDB wires the live connection at runtime.

func NewDaemonProvider added in v0.9.6

func NewDaemonProvider() *DaemonProvider

NewDaemonProvider creates a new DaemonProvider.

func (*DaemonProvider) SetDB added in v0.9.6

func (p *DaemonProvider) SetDB(db *orm.DB)

SetDB swaps the active DB. Call with nil when the project stops.

func (*DaemonProvider) Tools added in v0.9.6

func (p *DaemonProvider) Tools() []mcp.Tool

Tools returns db_schema (always), db_query, db_exec — fixed schemas, no DB required.

type ExecArgs

type ExecArgs struct {
	SQL string
}

func (*ExecArgs) Pointers

func (m *ExecArgs) Pointers() []any

func (*ExecArgs) Schema

func (m *ExecArgs) Schema() []fmt.Field

func (*ExecArgs) Validate

func (m *ExecArgs) Validate(action byte) error

type Provider

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

Provider implements mcp.ToolProvider for a live *orm.DB connection.

func NewProvider

func NewProvider(db *orm.DB) *Provider

NewProvider creates a new MCP tool provider wrapping the given DB.

func (*Provider) Tools

func (p *Provider) Tools() []mcp.Tool

Tools returns the MCP tools available for this DB connection. db_schema is only included if the underlying executor implements orm.SchemaInspector.

type QueryArgs

type QueryArgs struct {
	SQL string
}

func (*QueryArgs) Pointers

func (m *QueryArgs) Pointers() []any

func (*QueryArgs) Schema

func (m *QueryArgs) Schema() []fmt.Field

func (*QueryArgs) Validate

func (m *QueryArgs) Validate(action byte) error

Jump to

Keyboard shortcuts

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