Documentation
¶
Index ¶
- Constants
- Variables
- func CreateReleaseHandleFunc(ctx context.Context, request mcp.CallToolRequest) (*mcp.CallToolResult, error)
- func CreateRepoHandleFunc(createType string) server.ToolHandlerFunc
- func ForkRepositoryHandler(ctx context.Context, request mcp.CallToolRequest) (*mcp.CallToolResult, error)
- func GetFileContentHandler(ctx context.Context, request mcp.CallToolRequest) (*mcp.CallToolResult, error)
- func ListReleasesHandleFunc(ctx context.Context, request mcp.CallToolRequest) (*mcp.CallToolResult, error)
- func ListUserReposHandler(ctx context.Context, request mcp.CallToolRequest) (*mcp.CallToolResult, error)
- func NewCreateRepoTool(createType string) mcp.Tool
- func SearchOpenSourceReposHandler(ctx context.Context, request mcp.CallToolRequest) (*mcp.CallToolResult, error)
Constants ¶
View Source
const ( CreateUserRepo = "create_user_repo" CreateOrgRepo = "create_org_repo" CreateEnterRepo = "create_enterprise_repo" )
View Source
const (
CreateReleaseToolName = "create_release"
)
View Source
const (
ForkRepositoryToolName = "fork_repository"
)
View Source
const (
// GetFileContentToolName is the tool name for getting file content
GetFileContentToolName = "get_file_content"
)
View Source
const (
ListReleasesToolName = "list_releases"
)
View Source
const (
// ListUserReposToolName is the name of the tool
ListUserReposToolName = "list_user_repos"
)
View Source
const (
SearchOpenSourceRepositories = "search_open_source_repositories"
)
Variables ¶
View Source
var CreateReleaseTool = mcp.NewTool( CreateReleaseToolName, mcp.WithDescription("Create a release"), mcp.WithString( "owner", mcp.Description("The space address to which the repository belongs (the address path of the enterprise, organization or individual)"), mcp.Required(), ), mcp.WithString( "repo", mcp.Description("The path of the repository"), mcp.Required(), ), mcp.WithString( "tag_name", mcp.Description("The name of the tag"), mcp.Required(), ), mcp.WithString( "name", mcp.Description("The name of the release"), mcp.Required(), ), mcp.WithString( "body", mcp.Description("The description of the release"), mcp.Required(), ), mcp.WithBoolean( "prerelease", mcp.Description("Whether the release is a prerelease"), mcp.DefaultBool(false), ), mcp.WithString( "target_commitish", mcp.Description("The branch name or commit SHA, defaults to the repository's default branch"), mcp.Required(), ), )
View Source
var ForkRepositoryTool = mcp.NewTool( ForkRepositoryToolName, mcp.WithDescription("Fork a repository"), mcp.WithString( "owner", mcp.Description("The space address to which the repository belongs (the address path of the enterprise, organization or individual)"), mcp.Required(), ), mcp.WithString( "repo", mcp.Description("The path of the repository"), mcp.Required(), ), mcp.WithString( "organization", mcp.Description("The full address of the organization space to which the repository belongs, default for current user"), ), mcp.WithString( "name", mcp.Description("The name of the forked repository, default is the same as the original repository"), ), mcp.WithString( "path", mcp.Description("The path of the forked repository, default is the same as the original repository"), ), )
View Source
var GetFileContentTool = mcp.NewTool( GetFileContentToolName, mcp.WithDescription("Get the content of the specified file in the repository"), mcp.WithString( "owner", mcp.Description("The space address to which the repository belongs (the address path of the enterprise, organization or individual)"), mcp.Required(), ), mcp.WithString( "repo", mcp.Description("The path of the repository"), mcp.Required(), ), mcp.WithString( "path", mcp.Description("The path of the file"), mcp.Required(), ), mcp.WithString( "ref", mcp.Description("The branch name or commit ID"), ), )
View Source
var ListReleasesTool = mcp.NewTool( ListReleasesToolName, mcp.WithDescription("List repository releases"), mcp.WithString( "owner", mcp.Description("The space address to which the repository belongs (the address path of the enterprise, organization or individual)"), mcp.Required(), ), mcp.WithString( "repo", mcp.Description("The path of the repository"), mcp.Required(), ), mcp.WithNumber( "page", mcp.Description("Current page number"), mcp.DefaultNumber(1), ), mcp.WithNumber( "per_page", mcp.Description("Number of results per page, maximum 100"), mcp.DefaultNumber(20), ), mcp.WithString( "direction", mcp.Description("Optional. Ascending/descending. Not filled in is ascending"), mcp.Enum("asc", "desc"), ), )
View Source
var ListUserReposTool = mcp.NewTool( ListUserReposToolName, mcp.WithDescription("List user authorized repositories"), mcp.WithString( "visibility", mcp.Description("Visibility of repository"), mcp.Enum("public", "private", "all"), ), mcp.WithString( "affiliation", mcp.Description("Affiliation between user and repository"), mcp.Enum("owner", "collaborator", "organization_member", "enterprise_member", "admin"), ), mcp.WithString( "type", mcp.Description("Filter user repositories: their creation (owner), personal (personal), their membership (member), public (public), private (private), cannot be used together with visibility or affiliation parameters, otherwise a 422 error will be reported"), mcp.Enum("all", "owner", "personal", "member", "public", "private"), ), mcp.WithString( "sort", mcp.Description("Sorting method: creation time (created), update time (updated), last push time (pushed), warehouse ownership and name (full_name). Default: full_name"), mcp.Enum("created", "updated", "pushed", "full_name"), mcp.DefaultString("full_name"), ), mcp.WithString( "direction", mcp.Description("Sorting direction: ascending (asc), descending (desc). Default: asc"), mcp.Enum("asc", "desc"), mcp.DefaultString("asc"), ), mcp.WithString( "q", mcp.Description("Search keywords"), ), mcp.WithNumber( "page", mcp.Description("Page number"), mcp.DefaultNumber(1), ), mcp.WithNumber( "per_page", mcp.Description("Number of results per page"), mcp.DefaultNumber(20), ), )
View Source
var SearchReposTool = mcp.NewTool(SearchOpenSourceRepositories, mcp.WithDescription("Search open source repositories on Gitee"), mcp.WithString( "q", mcp.Description("Search keywords"), mcp.Required(), ), mcp.WithNumber( "from", mcp.Description("Search starting position"), mcp.DefaultNumber(0), ), mcp.WithNumber( "size", mcp.Description("Page size"), mcp.DefaultNumber(20), ), mcp.WithString( "sort_by_f", mcp.Description("Sorting field"), mcp.Enum("star", "last_push_at"), ), )
Functions ¶
func CreateReleaseHandleFunc ¶
func CreateReleaseHandleFunc(ctx context.Context, request mcp.CallToolRequest) (*mcp.CallToolResult, error)
func CreateRepoHandleFunc ¶
func CreateRepoHandleFunc(createType string) server.ToolHandlerFunc
func ForkRepositoryHandler ¶ added in v0.1.8
func ForkRepositoryHandler(ctx context.Context, request mcp.CallToolRequest) (*mcp.CallToolResult, error)
func GetFileContentHandler ¶
func GetFileContentHandler(ctx context.Context, request mcp.CallToolRequest) (*mcp.CallToolResult, error)
func ListReleasesHandleFunc ¶
func ListReleasesHandleFunc(ctx context.Context, request mcp.CallToolRequest) (*mcp.CallToolResult, error)
func ListUserReposHandler ¶
func ListUserReposHandler(ctx context.Context, request mcp.CallToolRequest) (*mcp.CallToolResult, error)
func NewCreateRepoTool ¶
func SearchOpenSourceReposHandler ¶ added in v0.1.7
func SearchOpenSourceReposHandler(ctx context.Context, request mcp.CallToolRequest) (*mcp.CallToolResult, error)
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.