stocktool

package
v1.6.1 Latest Latest
Warning

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

Go to latest
Published: Oct 19, 2026 License: MIT Imports: 3 Imported by: 0

Documentation

Overview

Package stocktool serves the stock tools of app api over MCP.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Handler

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

Handler serves the stock tools.

func New

func New(stock stock.Service) *Handler

New provides the handler; the generated mcp door gets it from here. @Provide(index=0)

func (*Handler) CheckStock

func (h *Handler) CheckStock(ctx context.Context, _ *mcp.CallToolRequest, in Input) (*mcp.CallToolResult, Output, error)

CheckStock tells whether an item can be ordered. @MCP

type Input

type Input struct {
	Item string `json:"item" jsonschema:"the item to check"`
}

Input is the item a stock tool asks about.

type Output

type Output struct {
	Available bool `json:"available"`
}

Output tells whether the item can be ordered.

Jump to

Keyboard shortcuts

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