Documentation
¶
Index ¶
- func NewGithubTool(server *mcp.Server)
- type GithubTool
- func (gh *GithubTool) ListUserPullRequests(ctx context.Context, req *mcp.CallToolRequest, input ListUserPullRequestsInput) (*mcp.CallToolResult, ListUserPullRequestsOutput, error)
- func (gh *GithubTool) ListUserRepos(ctx context.Context, req *mcp.CallToolRequest, input ListUserReposInput) (*mcp.CallToolResult, ListUserReposOutput, error)
- type GithubToolInput
- type ListUserPullRequestsInput
- type ListUserPullRequestsOutput
- type ListUserReposInput
- type ListUserReposOutput
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewGithubTool ¶
Types ¶
type GithubTool ¶
type GithubTool struct {
// contains filtered or unexported fields
}
func (*GithubTool) ListUserPullRequests ¶
func (gh *GithubTool) ListUserPullRequests(ctx context.Context, req *mcp.CallToolRequest, input ListUserPullRequestsInput) (*mcp.CallToolResult, ListUserPullRequestsOutput, error)
func (*GithubTool) ListUserRepos ¶
func (gh *GithubTool) ListUserRepos(ctx context.Context, req *mcp.CallToolRequest, input ListUserReposInput) (*mcp.CallToolResult, ListUserReposOutput, error)
type GithubToolInput ¶
type GithubToolInput struct {
UserName string `json:"user_name" jsonschema:"The GitHub username to interact with."`
PerPage *int `json:"per_page,omitempty" jsonschema:"The number of items to return per page."`
MaxPages *int `json:"max_pages,omitempty" jsonschema:"The maximum number of pages to return."`
}
func (*GithubToolInput) GetMaxPages ¶
func (i *GithubToolInput) GetMaxPages() int
func (*GithubToolInput) GetPerPage ¶
func (i *GithubToolInput) GetPerPage() int
type ListUserPullRequestsInput ¶
type ListUserPullRequestsInput struct {
GithubToolInput
RepoName string `json:"repo_name" jsonschema:"The name of the repository to list pull requests from." jsonschema_extras:"example=Hello-World"`
State string `json:"state" jsonschema:"The state of the pull requests to list (open, closed, all)." jsonschema_extras:"example=open"`
}
type ListUserPullRequestsOutput ¶
type ListUserPullRequestsOutput struct {
PullRequests []string `json:"pull_requests" jsonschema:"The list of pull request urls."`
}
type ListUserReposInput ¶
type ListUserReposInput struct {
GithubToolInput
Type string `json:"type" jsonschema:"The type of repositories to list." jsonschema_extras:"example=owner"`
Sort string `json:"sort" jsonschema:"The sorting method for the repositories." jsonschema_extras:"example=created"`
}
type ListUserReposOutput ¶
type ListUserReposOutput struct {
Repositories []string `json:"repositories" jsonschema:"The list of repository names."`
}
Click to show internal directories.
Click to hide internal directories.