Documentation
¶
Index ¶
- Constants
- type Capabilities
- type DBExecuteQueryColumn
- type DBExecuteQueryInput
- type DBExecuteQueryOutput
- type ProxyClient
- func (p *ProxyClient) Close() error
- func (p *ProxyClient) RegisterPrompts(ctx context.Context, server *mcp.Server) error
- func (p *ProxyClient) RegisterResourceTemplates(ctx context.Context, server *mcp.Server) error
- func (p *ProxyClient) RegisterResources(ctx context.Context, server *mcp.Server) error
- func (p *ProxyClient) RegisterTools(ctx context.Context, server *mcp.Server) error
- type ResourceInfo
- type ResultSet
- type Server
- type ServiceCreateInput
- type ServiceCreateOutput
- type ServiceDetail
- type ServiceForkInput
- type ServiceForkOutput
- type ServiceGetInput
- type ServiceGetOutput
- type ServiceInfo
- type ServiceListInput
- type ServiceListOutput
- type ServiceLogsInput
- type ServiceLogsOutput
- type ServiceResizeInput
- type ServiceResizeOutput
- type ServiceStartInput
- type ServiceStartOutput
- type ServiceStopInput
- type ServiceStopOutput
- type ServiceUpdatePasswordInput
- type ServiceUpdatePasswordOutput
Constants ¶
const (
ServerName = "tiger"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Capabilities ¶ added in v0.19.0
type Capabilities struct {
Tools []*mcp.Tool `json:"tools" yaml:"tools"`
Prompts []*mcp.Prompt `json:"prompts" yaml:"prompts"`
Resources []*mcp.Resource `json:"resources" yaml:"resources"`
ResourceTemplates []*mcp.ResourceTemplate `json:"resource_templates" yaml:"resource_templates"`
}
Capabilities holds all MCP server capabilities
func (*Capabilities) Get ¶ added in v0.20.0
func (c *Capabilities) Get(name string) any
Get finds any capability (tool, prompt, resource, or resource template) by name. Returns the capability if found, or nil if not found. Note that if there are duplicate names (e.g. a tool and a prompt with the same name) it will return the first found. We should therefore aim to avoid duplicate capability names.
func (*Capabilities) Names ¶ added in v0.20.0
func (c *Capabilities) Names() []string
type DBExecuteQueryColumn ¶ added in v0.7.0
DBExecuteQueryColumn represents a column in the query result
type DBExecuteQueryInput ¶ added in v0.7.0
type DBExecuteQueryInput struct {
ServiceID string `json:"service_id"`
Query string `json:"query"`
Parameters []string `json:"parameters,omitempty"`
TimeoutSeconds int `json:"timeout_seconds,omitempty"`
Role string `json:"role,omitempty"`
Pooled bool `json:"pooled,omitempty"`
}
DBExecuteQueryInput represents input for db_execute_query
func (DBExecuteQueryInput) Schema ¶ added in v0.7.0
func (DBExecuteQueryInput) Schema() *jsonschema.Schema
type DBExecuteQueryOutput ¶ added in v0.7.0
type DBExecuteQueryOutput struct {
ResultSets []ResultSet `json:"result_sets"`
ExecutionTime string `json:"execution_time"`
}
DBExecuteQueryOutput represents output for db_execute_query
func (DBExecuteQueryOutput) Schema ¶ added in v0.7.0
func (DBExecuteQueryOutput) Schema() *jsonschema.Schema
type ProxyClient ¶
type ProxyClient struct {
// contains filtered or unexported fields
}
ProxyClient manages connection to a remote MCP server and forwards requests
func NewProxyClient ¶
func NewProxyClient(ctx context.Context, url string) (*ProxyClient, error)
NewProxyClient creates a new proxy client for the given remote server configuration
func (*ProxyClient) Close ¶
func (p *ProxyClient) Close() error
Close closes the connection to the remote MCP server
func (*ProxyClient) RegisterPrompts ¶
RegisterPrompts discovers prompts from remote server and registers them as proxy prompts
func (*ProxyClient) RegisterResourceTemplates ¶
RegisterResourceTemplates discovers resource templates from remote server and registers them as proxy resource templates
func (*ProxyClient) RegisterResources ¶
RegisterResources discovers resources from remote server and registers them as proxy resources
func (*ProxyClient) RegisterTools ¶
RegisterTools discovers tools from remote server and registers them as proxy tools
type ResourceInfo ¶
type ResourceInfo struct {
CPU string `json:"cpu,omitempty" jsonschema:"CPU allocation (e.g., '0.5 cores', '1 core')"`
Memory string `json:"memory,omitempty" jsonschema:"Memory allocation (e.g., '2 GB', '4 GB')"`
}
ResourceInfo represents resource allocation information
type ResultSet ¶ added in v0.19.4
type ResultSet struct {
CommandTag string `json:"command_tag"`
Columns []DBExecuteQueryColumn `json:"columns,omitempty"`
Rows *[][]any `json:"rows,omitempty"`
RowsAffected int64 `json:"rows_affected"`
}
ResultSet represents a single query result set
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
Server wraps the MCP server with Tiger-specific functionality
func (*Server) HTTPHandler ¶
Returns an HTTP handler that implements the http transport
func (*Server) ListCapabilities ¶ added in v0.19.0
func (s *Server) ListCapabilities(ctx context.Context) (*Capabilities, error)
ListCapabilities creates a temporary in-memory client connection to list all capabilities (tools, prompts, resources, and resource templates).
type ServiceCreateInput ¶
type ServiceCreateInput struct {
Name string `json:"name,omitempty"`
Addons []string `json:"addons,omitempty"`
Region *string `json:"region,omitempty"`
CPUMemory string `json:"cpu_memory,omitempty"`
Replicas int `json:"replicas,omitempty"`
Wait bool `json:"wait,omitempty"`
SetDefault bool `json:"set_default,omitempty"`
WithPassword bool `json:"with_password,omitempty"`
}
ServiceCreateInput represents input for service_create
func (ServiceCreateInput) Schema ¶
func (ServiceCreateInput) Schema() *jsonschema.Schema
type ServiceCreateOutput ¶
type ServiceCreateOutput struct {
Service ServiceDetail `json:"service"`
Message string `json:"message"`
PasswordStorage *common.PasswordStorageResult `json:"password_storage,omitempty"`
}
ServiceCreateOutput represents output for service_create
func (ServiceCreateOutput) Schema ¶ added in v0.7.0
func (ServiceCreateOutput) Schema() *jsonschema.Schema
type ServiceDetail ¶
type ServiceDetail struct {
ServiceID string `json:"id" jsonschema:"Service identifier (10-character alphanumeric string)"`
Name string `json:"name"`
Status string `json:"status" jsonschema:"Service status (e.g., READY, PAUSED, CONFIGURING, UPGRADING)"`
Type string `json:"type"`
Region string `json:"region"`
Created string `json:"created,omitempty"`
Resources *ResourceInfo `json:"resources,omitempty"`
Replicas int `json:"replicas" jsonschema:"Number of HA replicas (0=single node/no HA, 1+=HA enabled)"`
DirectEndpoint string `json:"direct_endpoint,omitempty" jsonschema:"Direct database connection endpoint"`
PoolerEndpoint string `json:"pooler_endpoint,omitempty" jsonschema:"Connection pooler endpoint"`
Password string `json:"password,omitempty" jsonschema:"Password for tsdbadmin user (only included if with_password=true)"`
ConnectionString string `json:"connection_string" jsonschema:"PostgreSQL connection string (password embedded only if with_password=true)"`
}
ServiceDetail represents detailed service information
func (ServiceDetail) Schema ¶ added in v0.7.0
func (ServiceDetail) Schema() *jsonschema.Schema
type ServiceForkInput ¶ added in v0.15.0
type ServiceForkInput struct {
ServiceID string `json:"service_id"`
Name string `json:"name,omitempty"`
ForkStrategy api.ForkStrategy `json:"fork_strategy"`
TargetTime *time.Time `json:"target_time,omitempty"`
CPUMemory string `json:"cpu_memory,omitempty"`
Wait bool `json:"wait,omitempty"`
SetDefault bool `json:"set_default,omitempty"`
WithPassword bool `json:"with_password,omitempty"`
}
ServiceForkInput represents input for service_fork
func (ServiceForkInput) Schema ¶ added in v0.15.0
func (ServiceForkInput) Schema() *jsonschema.Schema
type ServiceForkOutput ¶ added in v0.15.0
type ServiceForkOutput struct {
Service ServiceDetail `json:"service"`
Message string `json:"message"`
PasswordStorage *common.PasswordStorageResult `json:"password_storage,omitempty"`
}
ServiceForkOutput represents output for service_fork
func (ServiceForkOutput) Schema ¶ added in v0.15.0
func (ServiceForkOutput) Schema() *jsonschema.Schema
type ServiceGetInput ¶ added in v0.7.2
type ServiceGetInput struct {
ServiceID string `json:"service_id"`
WithPassword bool `json:"with_password,omitempty"`
}
ServiceGetInput represents input for service_get
func (ServiceGetInput) Schema ¶ added in v0.7.2
func (ServiceGetInput) Schema() *jsonschema.Schema
type ServiceGetOutput ¶ added in v0.7.2
type ServiceGetOutput struct {
Service ServiceDetail `json:"service"`
}
ServiceGetOutput represents output for service_get
func (ServiceGetOutput) Schema ¶ added in v0.7.2
func (ServiceGetOutput) Schema() *jsonschema.Schema
type ServiceInfo ¶
type ServiceInfo struct {
ServiceID string `json:"id" jsonschema:"Service identifier (10-character alphanumeric string)"`
Name string `json:"name"`
Status string `json:"status" jsonschema:"Service status (e.g., READY, PAUSED, CONFIGURING, UPGRADING)"`
Type string `json:"type"`
Region string `json:"region"`
Created string `json:"created,omitempty"`
Resources *ResourceInfo `json:"resources,omitempty"`
}
ServiceInfo represents simplified service information for MCP output
func (ServiceInfo) Schema ¶ added in v0.7.0
func (ServiceInfo) Schema() *jsonschema.Schema
type ServiceListInput ¶
type ServiceListInput struct{}
ServiceListInput represents input for service_list
func (ServiceListInput) Schema ¶
func (ServiceListInput) Schema() *jsonschema.Schema
type ServiceListOutput ¶
type ServiceListOutput struct {
Services []ServiceInfo `json:"services"`
}
ServiceListOutput represents output for service_list
func (ServiceListOutput) Schema ¶ added in v0.7.0
func (ServiceListOutput) Schema() *jsonschema.Schema
type ServiceLogsInput ¶ added in v0.20.0
type ServiceLogsInput struct {
ServiceID string `json:"service_id"`
Node *int `json:"node,omitempty"`
Tail int `json:"tail,omitempty"`
Since *time.Time `json:"since,omitempty"`
Until *time.Time `json:"until,omitempty"`
}
ServiceLogsInput represents input for service_logs
func (ServiceLogsInput) Schema ¶ added in v0.20.0
func (ServiceLogsInput) Schema() *jsonschema.Schema
type ServiceLogsOutput ¶ added in v0.20.0
type ServiceLogsOutput struct {
Logs []string `` /* 142-byte string literal not displayed */
}
ServiceLogsOutput represents output for service_logs
func (ServiceLogsOutput) Schema ¶ added in v0.20.0
func (ServiceLogsOutput) Schema() *jsonschema.Schema
type ServiceResizeInput ¶ added in v0.20.0
type ServiceResizeInput struct {
ServiceID string `json:"service_id"`
CPUMemory string `json:"cpu_memory"`
Wait bool `json:"wait,omitempty"`
}
ServiceResizeInput represents input for service_resize
func (ServiceResizeInput) Schema ¶ added in v0.20.0
func (ServiceResizeInput) Schema() *jsonschema.Schema
type ServiceResizeOutput ¶ added in v0.20.0
type ServiceResizeOutput struct {
Status string `json:"status" jsonschema:"Current service status after resize operation"`
Resources *ResourceInfo `json:"resources,omitempty"`
Message string `json:"message"`
}
ServiceResizeOutput represents output for service_resize
func (ServiceResizeOutput) Schema ¶ added in v0.20.0
func (ServiceResizeOutput) Schema() *jsonschema.Schema
type ServiceStartInput ¶ added in v0.17.0
type ServiceStartInput struct {
ServiceID string `json:"service_id"`
Wait bool `json:"wait,omitempty"`
}
ServiceStartInput represents input for service_start
func (ServiceStartInput) Schema ¶ added in v0.17.0
func (ServiceStartInput) Schema() *jsonschema.Schema
type ServiceStartOutput ¶ added in v0.17.0
type ServiceStartOutput struct {
Status string `json:"status" jsonschema:"Current service status after start operation"`
Message string `json:"message"`
}
ServiceStartOutput represents output for service_start
func (ServiceStartOutput) Schema ¶ added in v0.17.0
func (ServiceStartOutput) Schema() *jsonschema.Schema
type ServiceStopInput ¶ added in v0.17.0
type ServiceStopInput struct {
ServiceID string `json:"service_id"`
Wait bool `json:"wait,omitempty"`
}
ServiceStopInput represents input for service_stop
func (ServiceStopInput) Schema ¶ added in v0.17.0
func (ServiceStopInput) Schema() *jsonschema.Schema
type ServiceStopOutput ¶ added in v0.17.0
type ServiceStopOutput struct {
Status string `json:"status" jsonschema:"Current service status after stop operation"`
Message string `json:"message"`
}
ServiceStopOutput represents output for service_stop
func (ServiceStopOutput) Schema ¶ added in v0.17.0
func (ServiceStopOutput) Schema() *jsonschema.Schema
type ServiceUpdatePasswordInput ¶
type ServiceUpdatePasswordInput struct {
ServiceID string `json:"service_id"`
Password string `json:"password"`
}
ServiceUpdatePasswordInput represents input for service_update_password
func (ServiceUpdatePasswordInput) Schema ¶
func (ServiceUpdatePasswordInput) Schema() *jsonschema.Schema
type ServiceUpdatePasswordOutput ¶
type ServiceUpdatePasswordOutput struct {
Message string `json:"message"`
PasswordStorage *common.PasswordStorageResult `json:"password_storage,omitempty"`
}
ServiceUpdatePasswordOutput represents output for service_update_password
func (ServiceUpdatePasswordOutput) Schema ¶ added in v0.7.0
func (ServiceUpdatePasswordOutput) Schema() *jsonschema.Schema