mcp

package
v0.0.0-...-0f488bb Latest Latest
Warning

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

Go to latest
Published: Sep 14, 2026 License: Apache-2.0 Imports: 10 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetIndexerByFileBase64ContentTool

func GetIndexerByFileBase64ContentTool() *protocol.Tool

func GetIndexerByFilePathTool

func GetIndexerByFilePathTool() *protocol.Tool

func GetKnowledgeBaseTool

func GetKnowledgeBaseTool() *protocol.Tool

func GetRetrieverTool

func GetRetrieverTool() *protocol.Tool

func GetWebSearchTool

func GetWebSearchTool() *protocol.Tool

func HandleIndexerByFileBase64Content

func HandleIndexerByFileBase64Content(ctx context.Context, req *protocol.CallToolRequest) (*protocol.CallToolResult, error)

func HandleKnowledgeBase

func HandleKnowledgeBase(ctx context.Context, toolReq *protocol.CallToolRequest) (res *protocol.CallToolResult, err error)

func HandleRetriever

func HandleRetriever(ctx context.Context, toolReq *protocol.CallToolRequest) (res *protocol.CallToolResult, err error)

func HandleWebSearch

func HandleWebSearch(ctx context.Context, toolReq *protocol.CallToolRequest) (res *protocol.CallToolResult, err error)

Types

type IndexFileParam

type IndexFileParam struct {
	Filename      string `json:"filename" description:"文件名字" required:"true"`
	Content       string `json:"content" description:"被base64编码后的文件内容,先调用工具获取base64信息" required:"true"` // 可以是文件路径(pdf,html,md等),也可以是网址文件" required:"true"` // 可以是文件路径(pdf,html,md等),也可以是网址
	KnowledgeName string ``                                                                             /* 199-byte string literal not displayed */
}

type IndexParam

type IndexParam struct {
	URI           string `json:"uri" description:"文件路径" required:"true"` // 可以是文件路径(pdf,html,md等),也可以是网址
	KnowledgeName string ``                                              /* 199-byte string literal not displayed */
}

type KnowledgeBaseParam

type KnowledgeBaseParam struct {
}

type RetrieverParam

type RetrieverParam struct {
	Question      string  `json:"question" description:"用户提问的问题" required:"true"`
	KnowledgeName string  ``                                                              /* 165-byte string literal not displayed */
	TopK          int     `json:"top_k" description:"检索结果的数量,默认为5" required:"false"`      // 默认为5
	Score         float64 `json:"score"  description:"检索结果的分数阀值,默认为0.2" required:"false"` // 默认为0.2
}

type WebSearchParam

type WebSearchParam struct {
	Question string `json:"question" description:"用户提问的问题,将通过 You.com 联网检索" required:"true"`
	TopK     int    `json:"top_k" description:"检索结果数量;不传时使用服务端配置(默认5)" required:"false"` // 默认为5
}

Jump to

Keyboard shortcuts

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