users

package
v0.0.0-...-65e65ef Latest Latest
Warning

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

Go to latest
Published: Jul 18, 2025 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// GetUserInfoToolName is the instruction to get authenticated user information
	GetUserInfoToolName = "get_user_info"
)
View Source
const (
	SearchUsers = "search_users"
)

Variables

View Source
var GetUserInfoTool = mcp.NewTool(
	GetUserInfoToolName,
	mcp.WithDescription("This is a tool from the gitee MCP server.\nGet information about the authenticated user"),
)

GetUserInfoTool defines the tool for getting authorized user information

View Source
var SearchUsersTool = mcp.NewTool(SearchUsers,
	mcp.WithDescription("Search users on Gitee"),
	mcp.WithString(
		"q",
		mcp.Description("Search keywords"),
		mcp.Required(),
	),
	mcp.WithNumber(
		"page",
		mcp.Description("Page number"),
		mcp.DefaultNumber(1),
	),
	mcp.WithNumber(
		"per_page",
		mcp.Description("Number of results per page"),
		mcp.DefaultNumber(20),
	),
)

Functions

func GetUserInfoHandleFunc

func GetUserInfoHandleFunc() server.ToolHandlerFunc

GetUserInfoHandleFunc returns a server.ToolHandlerFunc for handling get user info requests

func GetUserInfoHandler

func GetUserInfoHandler(ctx context.Context, request mcp.CallToolRequest) (*mcp.CallToolResult, error)

GetUserInfoHandler handles the request to get authorized user information

func SearchUsersHandler

func SearchUsersHandler(ctx context.Context, request mcp.CallToolRequest) (*mcp.CallToolResult, error)

Types

This section is empty.

Jump to

Keyboard shortcuts

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