mcpcatalog

package
v1.2.17 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	PricingData MCPPricingData
}

type MCPCatalog

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

func Init

func Init(ctx context.Context, config *Config, logger schemas.Logger) (*MCPCatalog, error)

Init initializes the MCP catalog

func (*MCPCatalog) Cleanup

func (mc *MCPCatalog) Cleanup()

Cleanup cleans up the MCP catalog

func (*MCPCatalog) DeletePricingData

func (mc *MCPCatalog) DeletePricingData(server string, toolName string)

DeletePricingData deletes the pricing data for the given server and tool name

func (*MCPCatalog) GetAllPricingData

func (mc *MCPCatalog) GetAllPricingData() MCPPricingData

GetAllPricingData returns all the pricing data

func (*MCPCatalog) GetPricingData

func (mc *MCPCatalog) GetPricingData(server string, toolName string) (PricingEntry, bool)

GetPricingData returns the pricing data for the given server and tool name

func (*MCPCatalog) UpdatePricingData

func (mc *MCPCatalog) UpdatePricingData(server string, toolName string, costPerExecution float64)

UpdatePricingData updates the pricing data for the given server and tool name

type MCPPricingData

type MCPPricingData map[string]PricingEntry // Map of [{server_label}/{tool_name}] -> PricingEntry

type PricingEntry

type PricingEntry struct {
	Server           string  `json:"server"`
	ToolName         string  `json:"tool_name"`
	CostPerExecution float64 `json:"cost_per_execution"`
}

PricingEntry represents a single MCP server's tool call pricing information

Jump to

Keyboard shortcuts

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