Documentation
¶
Overview ¶
Package issue provides MCP tools for managing Forgejo issues and their comments.
It includes tools for listing, retrieving, creating, editing, and deleting issues and comments.
Index ¶
- type AddIssueBlockingImpl
- type AddIssueBlockingParams
- type AddIssueDependencyImpl
- type AddIssueDependencyParams
- type AddIssueLabelsImpl
- type AddIssueLabelsParams
- type CreateIssueCommentImpl
- type CreateIssueCommentParams
- type CreateIssueImpl
- type CreateIssueParams
- type DeleteIssueAttachmentImpl
- type DeleteIssueAttachmentParams
- type DeleteIssueCommentImpl
- type DeleteIssueCommentParams
- type EditIssueAttachmentImpl
- type EditIssueAttachmentParams
- type EditIssueCommentImpl
- type EditIssueCommentParams
- type EditIssueImpl
- type EditIssueParams
- type GetIssueImpl
- type GetIssueParams
- type ListIssueAttachmentsImpl
- type ListIssueAttachmentsParams
- type ListIssueBlockingImpl
- type ListIssueBlockingParams
- type ListIssueCommentsImpl
- type ListIssueCommentsParams
- type ListIssueDependenciesImpl
- type ListIssueDependenciesParams
- type ListRepoIssuesImpl
- type ListRepoIssuesParams
- type RemoveIssueBlockingImpl
- type RemoveIssueBlockingParams
- type RemoveIssueDependencyImpl
- type RemoveIssueDependencyParams
- type RemoveIssueLabelImpl
- type RemoveIssueLabelParams
- type ReplaceIssueLabelsImpl
- type ReplaceIssueLabelsParams
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AddIssueBlockingImpl ¶ added in v0.0.3
AddIssueBlockingImpl implements the MCP tool for adding a blocking relationship to an issue. This is an idempotent operation. Note: This feature is not supported by the official Forgejo SDK and requires a custom HTTP implementation.
func (AddIssueBlockingImpl) Definition ¶ added in v0.0.3
func (AddIssueBlockingImpl) Definition() *mcp.Tool
Definition describes the `add_issue_blocking` tool. It requires the `index` of the blocking issue and the `blocked_index` of the issue it will block. It is marked as idempotent.
func (AddIssueBlockingImpl) Handler ¶ added in v0.0.3
func (impl AddIssueBlockingImpl) Handler() mcp.ToolHandlerFor[AddIssueBlockingParams, any]
Handler implements the logic for adding an issue blocking relationship. It performs a custom HTTP POST request to the `/repos/{owner}/{repo}/issues/{index}/blocks` endpoint. It will return an error if either issue cannot be found.
type AddIssueBlockingParams ¶ added in v0.0.3
type AddIssueBlockingParams struct {
// Owner is the username or organization name that owns the repository.
Owner string `json:"owner"`
// Repo is the name of the repository.
Repo string `json:"repo"`
// Index is the issue number of the blocking issue.
Index int `json:"index"`
// BlockedIndex is the issue number of the issue that will be blocked by `Index`.
BlockedIndex int `json:"blocked_index"`
}
AddIssueBlockingParams defines the parameters for the add_issue_blocking tool. It specifies the two issues to link in a blocking relationship.
type AddIssueDependencyImpl ¶
AddIssueDependencyImpl implements the MCP tool for adding a dependency to an issue. This is an idempotent operation. Note: This feature is not supported by the official Forgejo SDK and requires a custom HTTP implementation.
func (AddIssueDependencyImpl) Definition ¶
func (AddIssueDependencyImpl) Definition() *mcp.Tool
Definition describes the `add_issue_dependency` tool. It requires the `index` of the dependent issue and the `dependency_index` of the issue it depends on. It is marked as idempotent.
func (AddIssueDependencyImpl) Handler ¶
func (impl AddIssueDependencyImpl) Handler() mcp.ToolHandlerFor[AddIssueDependencyParams, any]
Handler implements the logic for adding an issue dependency. It performs a custom HTTP POST request to the `/repos/{owner}/{repo}/issues/{index}/dependencies` endpoint. It will return an error if either issue cannot be found.
type AddIssueDependencyParams ¶
type AddIssueDependencyParams struct {
// Owner is the username or organization name that owns the repository.
Owner string `json:"owner"`
// Repo is the name of the repository.
Repo string `json:"repo"`
// Index is the issue number of the dependent issue.
Index int `json:"index"`
// DependencyIndex is the issue number of the issue that `Index` will depend on.
DependencyIndex int `json:"dependency_index"`
}
AddIssueDependencyParams defines the parameters for the add_issue_dependency tool. It specifies the two issues to link in a dependency relationship.
type AddIssueLabelsImpl ¶
AddIssueLabelsImpl implements the MCP tool for adding labels to an issue. This is an idempotent operation that uses the Forgejo SDK to associate one or more existing labels with an issue.
func (AddIssueLabelsImpl) Definition ¶
func (AddIssueLabelsImpl) Definition() *mcp.Tool
Definition describes the `add_issue_labels` tool. It requires the issue's `index` and an array of `labels` (IDs). It is marked as idempotent.
func (AddIssueLabelsImpl) Handler ¶
func (impl AddIssueLabelsImpl) Handler() mcp.ToolHandlerFor[AddIssueLabelsParams, any]
Handler implements the logic for adding labels to an issue. It calls the Forgejo SDK's `AddIssueLabels` function. It will return an error if the issue or any of the label IDs are not found.
type AddIssueLabelsParams ¶
type AddIssueLabelsParams struct {
// Owner is the username or organization name that owns the repository.
Owner string `json:"owner"`
// Repo is the name of the repository.
Repo string `json:"repo"`
// Index is the issue number.
Index int `json:"index"`
// Labels is a slice of label IDs to add to the issue.
Labels []int `json:"labels"`
}
AddIssueLabelsParams defines the parameters for the add_issue_labels tool. It specifies the issue and the label IDs to be added.
type CreateIssueCommentImpl ¶
CreateIssueCommentImpl implements the MCP tool for creating a new comment on an issue. This is a non-idempotent operation that posts a new comment using the Forgejo SDK.
func (CreateIssueCommentImpl) Definition ¶
func (CreateIssueCommentImpl) Definition() *mcp.Tool
Definition describes the `create_issue_comment` tool. It requires the issue `index` and the comment `body`. It is not idempotent, as multiple calls will create multiple identical comments.
func (CreateIssueCommentImpl) Handler ¶
func (impl CreateIssueCommentImpl) Handler() mcp.ToolHandlerFor[CreateIssueCommentParams, any]
Handler implements the logic for creating an issue comment. It calls the Forgejo SDK's `CreateIssueComment` function and returns the details of the new comment.
type CreateIssueCommentParams ¶
type CreateIssueCommentParams struct {
// Owner is the username or organization name that owns the repository.
Owner string `json:"owner"`
// Repo is the name of the repository.
Repo string `json:"repo"`
// Index is the issue number.
Index int `json:"index"`
// Body is the markdown content of the comment.
Body string `json:"body"`
}
CreateIssueCommentParams defines the parameters for the create_issue_comment tool. It specifies the issue to comment on and the content of the comment.
type CreateIssueImpl ¶
CreateIssueImpl implements the MCP tool for creating a new issue. This is a non-idempotent operation that creates a new issue using the Forgejo SDK.
func (CreateIssueImpl) Definition ¶
func (CreateIssueImpl) Definition() *mcp.Tool
Definition describes the `create_issue` tool. It requires `owner`, `repo`, a `title`, and a `body`. It is not idempotent, as multiple calls will create multiple identical issues.
func (CreateIssueImpl) Handler ¶
func (impl CreateIssueImpl) Handler() mcp.ToolHandlerFor[CreateIssueParams, any]
Handler implements the logic for creating an issue. It calls the Forgejo SDK's `CreateIssue` function and returns the details of the newly created issue.
type CreateIssueParams ¶
type CreateIssueParams struct {
// Owner is the username or organization name that owns the repository.
Owner string `json:"owner"`
// Repo is the name of the repository.
Repo string `json:"repo"`
// Title is the title of the new issue.
Title string `json:"title"`
// Body is the markdown content of the issue.
Body string `json:"body"`
// Assignees is a slice of usernames to assign to the issue.
Assignees []string `json:"assignees,omitempty"`
// Milestone is the ID of a milestone to assign to the issue.
Milestone int `json:"milestone,omitempty"`
// Labels is a slice of label IDs to assign to the issue.
Labels []int `json:"labels,omitempty"`
// DueDate is the optional due date for the issue.
DueDate time.Time `json:"due_date,omitempty"`
}
CreateIssueParams defines the parameters for the create_issue tool. It includes the title, body, and optional metadata for the new issue.
type DeleteIssueAttachmentImpl ¶
DeleteIssueAttachmentImpl implements the destructive MCP tool for deleting an issue attachment. This is an idempotent but irreversible operation. Note: This feature is not supported by the official Forgejo SDK and requires a custom HTTP implementation.
func (DeleteIssueAttachmentImpl) Definition ¶
func (DeleteIssueAttachmentImpl) Definition() *mcp.Tool
Definition describes the `delete_issue_attachment` tool. It requires the issue `index` and `attachment_id`. It is marked as a destructive operation.
func (DeleteIssueAttachmentImpl) Handler ¶
func (impl DeleteIssueAttachmentImpl) Handler() mcp.ToolHandlerFor[DeleteIssueAttachmentParams, any]
Handler implements the logic for deleting an issue attachment. It performs a custom HTTP DELETE request to the `/repos/{owner}/{repo}/issues/{index}/assets/{attachment_id}` endpoint. On success, it returns a simple text confirmation.
type DeleteIssueAttachmentParams ¶
type DeleteIssueAttachmentParams struct {
// Owner is the username or organization name that owns the repository.
Owner string `json:"owner"`
// Repo is the name of the repository.
Repo string `json:"repo"`
// Index is the issue number containing the attachment.
Index int `json:"index"`
// AttachmentID is the unique identifier of the attachment to delete.
AttachmentID string `json:"attachment_id"`
}
DeleteIssueAttachmentParams defines the parameters for deleting an issue attachment. It specifies the attachment to be deleted by its ID.
type DeleteIssueCommentImpl ¶
DeleteIssueCommentImpl implements the destructive MCP tool for deleting an issue comment. This is an idempotent but irreversible operation that removes a comment using the Forgejo SDK.
func (DeleteIssueCommentImpl) Definition ¶
func (DeleteIssueCommentImpl) Definition() *mcp.Tool
Definition describes the `delete_issue_comment` tool. It requires the `comment_id` to be deleted. It is marked as a destructive operation to ensure clients can warn the user before execution.
func (DeleteIssueCommentImpl) Handler ¶
func (impl DeleteIssueCommentImpl) Handler() mcp.ToolHandlerFor[DeleteIssueCommentParams, any]
Handler implements the logic for deleting an issue comment. It calls the Forgejo SDK's `DeleteIssueComment` function. On success, it returns a simple text confirmation. It will return an error if the comment does not exist.
type DeleteIssueCommentParams ¶
type DeleteIssueCommentParams struct {
// Owner is the username or organization name that owns the repository.
Owner string `json:"owner"`
// Repo is the name of the repository.
Repo string `json:"repo"`
// CommentID is the unique identifier of the comment to delete.
CommentID int `json:"comment_id"`
}
DeleteIssueCommentParams defines the parameters for the delete_issue_comment tool. It specifies the comment to be deleted by its ID.
type EditIssueAttachmentImpl ¶
EditIssueAttachmentImpl implements the MCP tool for editing an issue attachment. This is an idempotent operation. Note: This feature is not supported by the official Forgejo SDK and requires a custom HTTP implementation.
func (EditIssueAttachmentImpl) Definition ¶
func (EditIssueAttachmentImpl) Definition() *mcp.Tool
Definition describes the `edit_issue_attachment` tool. It requires the issue `index`, `attachment_id`, and a new `name`. It is marked as idempotent.
func (EditIssueAttachmentImpl) Handler ¶
func (impl EditIssueAttachmentImpl) Handler() mcp.ToolHandlerFor[EditIssueAttachmentParams, any]
Handler implements the logic for editing an issue attachment. It performs a custom HTTP PATCH request to the `/repos/{owner}/{repo}/issues/{index}/assets/{attachment_id}` endpoint. It will return an error if the attachment is not found.
type EditIssueAttachmentParams ¶
type EditIssueAttachmentParams struct {
// Owner is the username or organization name that owns the repository.
Owner string `json:"owner"`
// Repo is the name of the repository.
Repo string `json:"repo"`
// Index is the issue number containing the attachment.
Index int `json:"index"`
// AttachmentID is the unique identifier of the attachment to edit.
AttachmentID string `json:"attachment_id"`
// Name is the new display name for the attachment.
Name string `json:"name"`
}
EditIssueAttachmentParams defines the parameters for editing an issue attachment. It specifies the attachment to edit and its new name.
type EditIssueCommentImpl ¶
EditIssueCommentImpl implements the MCP tool for editing an existing issue comment. This is an idempotent operation that modifies a comment's content using the Forgejo SDK.
func (EditIssueCommentImpl) Definition ¶
func (EditIssueCommentImpl) Definition() *mcp.Tool
Definition describes the `edit_issue_comment` tool. It requires the `comment_id` and the new `body`. It is marked as idempotent.
func (EditIssueCommentImpl) Handler ¶
func (impl EditIssueCommentImpl) Handler() mcp.ToolHandlerFor[EditIssueCommentParams, any]
Handler implements the logic for editing an issue comment. It calls the Forgejo SDK's `EditIssueComment` function. It will return an error if the comment ID is not found.
type EditIssueCommentParams ¶
type EditIssueCommentParams struct {
// Owner is the username or organization name that owns the repository.
Owner string `json:"owner"`
// Repo is the name of the repository.
Repo string `json:"repo"`
// CommentID is the unique identifier of the comment to edit.
CommentID int `json:"comment_id"`
// Body is the new markdown content for the comment.
Body string `json:"body"`
}
EditIssueCommentParams defines the parameters for the edit_issue_comment tool. It specifies the comment to edit by its ID and the new content.
type EditIssueImpl ¶
EditIssueImpl implements the MCP tool for editing an existing issue. This is an idempotent operation that modifies an issue's metadata using the Forgejo SDK.
func (EditIssueImpl) Definition ¶
func (EditIssueImpl) Definition() *mcp.Tool
Definition describes the `edit_issue` tool. It requires `owner`, `repo`, and the issue `index`. It is marked as idempotent.
func (EditIssueImpl) Handler ¶
func (impl EditIssueImpl) Handler() mcp.ToolHandlerFor[EditIssueParams, any]
Handler implements the logic for editing an issue. It calls the Forgejo SDK's `EditIssue` function. It will return an error if the issue is not found.
type EditIssueParams ¶
type EditIssueParams struct {
// Owner is the username or organization name that owns the repository.
Owner string `json:"owner"`
// Repo is the name of the repository.
Repo string `json:"repo"`
// Index is the issue number.
Index int `json:"index"`
// Title is the new title for the issue.
Title string `json:"title,omitempty"`
// Body is the new markdown content for the issue.
Body string `json:"body,omitempty"`
// State is the new state for the issue (e.g., 'open', 'closed').
State string `json:"state,omitempty"`
// Assignees is the new list of usernames to assign to the issue.
Assignees []string `json:"assignees,omitempty"`
// Milestone is the new milestone ID to assign to the issue.
Milestone int `json:"milestone,omitempty"`
// DueDate is the new optional due date for the issue.
DueDate time.Time `json:"due_date,omitempty"`
}
EditIssueParams defines the parameters for the edit_issue tool. It specifies the issue to edit by ID and the fields to update.
type GetIssueImpl ¶
GetIssueImpl implements the read-only MCP tool for fetching a single issue. This is a safe, idempotent operation that uses the Forgejo SDK to retrieve detailed information about a specific issue.
func (GetIssueImpl) Definition ¶
func (GetIssueImpl) Definition() *mcp.Tool
Definition describes the `get_issue` tool. It requires `owner`, `repo`, and the issue `index`. It is marked as a safe, read-only operation.
func (GetIssueImpl) Handler ¶
func (impl GetIssueImpl) Handler() mcp.ToolHandlerFor[GetIssueParams, any]
Handler implements the logic for fetching an issue. It calls the Forgejo SDK's `GetIssue` function and formats the result into a detailed markdown view. It will return an error if the issue is not found.
type GetIssueParams ¶
type GetIssueParams struct {
// Owner is the username or organization name that owns the repository.
Owner string `json:"owner"`
// Repo is the name of the repository.
Repo string `json:"repo"`
// Index is the issue number.
Index int `json:"index"`
}
GetIssueParams defines the parameters for the get_issue tool. It specifies the issue to retrieve by its owner, repository, and index.
type ListIssueAttachmentsImpl ¶
ListIssueAttachmentsImpl implements the read-only MCP tool for listing issue attachments. This is a safe, idempotent operation. Note: This feature is not supported by the official Forgejo SDK and requires a custom HTTP implementation.
func (ListIssueAttachmentsImpl) Definition ¶
func (ListIssueAttachmentsImpl) Definition() *mcp.Tool
Definition describes the `list_issue_attachments` tool. It requires `owner`, `repo`, and the issue `index`. It is marked as a safe, read-only operation.
func (ListIssueAttachmentsImpl) Handler ¶
func (impl ListIssueAttachmentsImpl) Handler() mcp.ToolHandlerFor[ListIssueAttachmentsParams, any]
Handler implements the logic for listing issue attachments. It performs a custom HTTP GET request to the `/repos/{owner}/{repo}/issues/{index}/assets` endpoint and formats the results into a markdown list.
type ListIssueAttachmentsParams ¶
type ListIssueAttachmentsParams struct {
// Owner is the username or organization name that owns the repository.
Owner string `json:"owner"`
// Repo is the name of the repository.
Repo string `json:"repo"`
// Index is the issue number.
Index int `json:"index"`
}
ListIssueAttachmentsParams defines the parameters for the list_issue_attachments tool. It specifies the issue from which to list attachments.
type ListIssueBlockingImpl ¶ added in v0.0.3
ListIssueBlockingImpl implements the read-only MCP tool for listing issue blocking relationships. This is a safe, idempotent operation. Note: This feature is not supported by the official Forgejo SDK and requires a custom HTTP implementation.
func (ListIssueBlockingImpl) Definition ¶ added in v0.0.3
func (ListIssueBlockingImpl) Definition() *mcp.Tool
Definition describes the `list_issue_blocking` tool. It requires `owner`, `repo`, and the issue `index`. It is marked as a safe, read-only operation.
func (ListIssueBlockingImpl) Handler ¶ added in v0.0.3
func (impl ListIssueBlockingImpl) Handler() mcp.ToolHandlerFor[ListIssueBlockingParams, any]
Handler implements the logic for listing issue blocking relationships. It performs a custom HTTP GET request to the `/repos/{owner}/{repo}/issues/{index}/blocks` endpoint and formats the results into a markdown list.
type ListIssueBlockingParams ¶ added in v0.0.3
type ListIssueBlockingParams struct {
// Owner is the username or organization name that owns the repository.
Owner string `json:"owner"`
// Repo is the name of the repository.
Repo string `json:"repo"`
// Index is the issue number.
Index int `json:"index"`
}
ListIssueBlockingParams defines the parameters for the list_issue_blocking tool. It specifies the issue for which to list blocking relationships.
type ListIssueCommentsImpl ¶
ListIssueCommentsImpl implements the read-only MCP tool for listing issue comments. This is a safe, idempotent operation that uses the Forgejo SDK to fetch a list of comments for a specific issue.
func (ListIssueCommentsImpl) Definition ¶
func (ListIssueCommentsImpl) Definition() *mcp.Tool
Definition describes the `list_issue_comments` tool. It requires `owner`, `repo`, and the issue `index`. It supports time-based filtering and pagination and is marked as a safe, read-only operation.
func (ListIssueCommentsImpl) Handler ¶
func (impl ListIssueCommentsImpl) Handler() mcp.ToolHandlerFor[ListIssueCommentsParams, any]
Handler implements the logic for listing issue comments. It calls the Forgejo SDK's `ListIssueComments` function and formats the results into a markdown list.
type ListIssueCommentsParams ¶
type ListIssueCommentsParams struct {
// Owner is the username or organization name that owns the repository.
Owner string `json:"owner"`
// Repo is the name of the repository.
Repo string `json:"repo"`
// Index is the issue number.
Index int `json:"index"`
// Since filters for comments updated after the given time.
Since time.Time `json:"since,omitempty"`
// Before filters for comments updated before the given time.
Before time.Time `json:"before,omitempty"`
// Page is the page number for pagination.
Page int `json:"page,omitempty"`
// Limit is the number of comments to return per page.
Limit int `json:"limit,omitempty"`
}
ListIssueCommentsParams defines the parameters for the list_issue_comments tool. It specifies the issue and includes optional filters for pagination and time range.
type ListIssueDependenciesImpl ¶
ListIssueDependenciesImpl implements the read-only MCP tool for listing issue dependencies. This is a safe, idempotent operation. Note: This feature is not supported by the official Forgejo SDK and requires a custom HTTP implementation.
func (ListIssueDependenciesImpl) Definition ¶
func (ListIssueDependenciesImpl) Definition() *mcp.Tool
Definition describes the `list_issue_dependencies` tool. It requires `owner`, `repo`, and the issue `index`. It is marked as a safe, read-only operation.
func (ListIssueDependenciesImpl) Handler ¶
func (impl ListIssueDependenciesImpl) Handler() mcp.ToolHandlerFor[ListIssueDependenciesParams, any]
Handler implements the logic for listing issue dependencies. It performs a custom HTTP GET request to the `/repos/{owner}/{repo}/issues/{index}/dependencies` endpoint and formats the results into a markdown list.
type ListIssueDependenciesParams ¶
type ListIssueDependenciesParams struct {
// Owner is the username or organization name that owns the repository.
Owner string `json:"owner"`
// Repo is the name of the repository.
Repo string `json:"repo"`
// Index is the issue number.
Index int `json:"index"`
}
ListIssueDependenciesParams defines the parameters for the list_issue_dependencies tool. It specifies the issue for which to list dependencies.
type ListRepoIssuesImpl ¶
ListRepoIssuesImpl implements the read-only MCP tool for listing repository issues. This is a safe, idempotent operation that uses the Forgejo SDK to fetch a list of issues with powerful filtering and sorting capabilities.
func (ListRepoIssuesImpl) Definition ¶
func (ListRepoIssuesImpl) Definition() *mcp.Tool
Definition describes the `list_repo_issues` tool. It requires `owner` and `repo` and supports a rich set of optional parameters for filtering and sorting. It is marked as a safe, read-only operation.
func (ListRepoIssuesImpl) Handler ¶
func (impl ListRepoIssuesImpl) Handler() mcp.ToolHandlerFor[ListRepoIssuesParams, any]
Handler implements the logic for listing issues. It calls the Forgejo SDK's `ListRepoIssues` function with the provided filters and formats the results into a markdown table.
type ListRepoIssuesParams ¶
type ListRepoIssuesParams struct {
// Owner is the username or organization name that owns the repository.
Owner string `json:"owner"`
// Repo is the name of the repository.
Repo string `json:"repo"`
// State filters issues by their state (e.g., 'open', 'closed').
State string `json:"state,omitempty"`
// Labels is a comma-separated list of label names to filter by.
Labels string `json:"labels,omitempty"`
// Milestones is a comma-separated list of milestone names to filter by.
Milestones string `json:"milestones,omitempty"`
// Assignees is a comma-separated list of usernames to filter by assignee.
Assignees string `json:"assignees,omitempty"`
// Q is a search query string to filter issues by.
Q string `json:"q,omitempty"`
// Sort specifies the sort order for the results.
Sort string `json:"sort,omitempty"`
// Order specifies the sort direction (asc or desc).
Order string `json:"order,omitempty"`
// Page is the page number for pagination.
Page int `json:"page,omitempty"`
// Limit is the number of issues to return per page.
Limit int `json:"limit,omitempty"`
// Since is a timestamp in RFC 3339 format to show only issues updated after this time.
Since *string `json:"since,omitempty"`
// Before is a timestamp in RFC 3339 format to show only issues updated before this time.
Before *string `json:"before,omitempty"`
}
ListRepoIssuesParams defines the parameters for the list_repo_issues tool. It includes extensive options for filtering, sorting, and paginating issues.
type RemoveIssueBlockingImpl ¶ added in v0.0.3
RemoveIssueBlockingImpl implements the destructive MCP tool for removing an issue blocking relationship. This is an idempotent but destructive operation. Note: This feature is not supported by the official Forgejo SDK and requires a custom HTTP implementation.
func (RemoveIssueBlockingImpl) Definition ¶ added in v0.0.3
func (RemoveIssueBlockingImpl) Definition() *mcp.Tool
Definition describes the `remove_issue_blocking` tool. It requires the `index` of the blocking issue and the `blocked_index` to remove. It is marked as a destructive operation.
func (RemoveIssueBlockingImpl) Handler ¶ added in v0.0.3
func (impl RemoveIssueBlockingImpl) Handler() mcp.ToolHandlerFor[RemoveIssueBlockingParams, any]
Handler implements the logic for removing an issue blocking relationship. It performs a custom HTTP DELETE request to the `/repos/{owner}/{repo}/issues/{index}/blocks/{blocked_index}` endpoint. On success, it returns a simple text confirmation.
type RemoveIssueBlockingParams ¶ added in v0.0.3
type RemoveIssueBlockingParams struct {
// Owner is the username or organization name that owns the repository.
Owner string `json:"owner"`
// Repo is the name of the repository.
Repo string `json:"repo"`
// Index is the issue number of the blocking issue.
Index int `json:"index"`
// BlockedIndex is the issue number of the blocked issue to be unblocked.
BlockedIndex int `json:"blocked_index"`
}
RemoveIssueBlockingParams defines the parameters for the remove_issue_blocking tool. It specifies the two issues for which to remove the blocking relationship.
type RemoveIssueDependencyImpl ¶
RemoveIssueDependencyImpl implements the destructive MCP tool for removing an issue dependency. This is an idempotent but destructive operation. Note: This feature is not supported by the official Forgejo SDK and requires a custom HTTP implementation.
func (RemoveIssueDependencyImpl) Definition ¶
func (RemoveIssueDependencyImpl) Definition() *mcp.Tool
Definition describes the `remove_issue_dependency` tool. It requires the `index` of the dependent issue and the `dependency_index` to remove. It is marked as a destructive operation.
func (RemoveIssueDependencyImpl) Handler ¶
func (impl RemoveIssueDependencyImpl) Handler() mcp.ToolHandlerFor[RemoveIssueDependencyParams, any]
Handler implements the logic for removing an issue dependency. It performs a custom HTTP DELETE request to the `/repos/{owner}/{repo}/issues/{index}/dependencies/{dependency_index}` endpoint. On success, it returns a simple text confirmation.
type RemoveIssueDependencyParams ¶
type RemoveIssueDependencyParams struct {
// Owner is the username or organization name that owns the repository.
Owner string `json:"owner"`
// Repo is the name of the repository.
Repo string `json:"repo"`
// Index is the issue number of the dependent issue.
Index int `json:"index"`
// DependencyIndex is the issue number of the dependency to be removed.
DependencyIndex int `json:"dependency_index"`
}
RemoveIssueDependencyParams defines the parameters for the remove_issue_dependency tool. It specifies the two issues for which to remove the dependency relationship.
type RemoveIssueLabelImpl ¶
RemoveIssueLabelImpl implements the MCP tool for removing a label from an issue. This is an idempotent operation that uses the Forgejo SDK to disassociate a label from an issue.
func (RemoveIssueLabelImpl) Definition ¶
func (RemoveIssueLabelImpl) Definition() *mcp.Tool
Definition describes the `remove_issue_label` tool. It requires the issue's `index` and a single `label` ID to remove. It is marked as idempotent.
func (RemoveIssueLabelImpl) Handler ¶
func (impl RemoveIssueLabelImpl) Handler() mcp.ToolHandlerFor[RemoveIssueLabelParams, any]
Handler implements the logic for removing a label from an issue. It calls the Forgejo SDK's `DeleteIssueLabel` function. On success, it returns a simple text confirmation. It will return an error if the issue or label is not found.
type RemoveIssueLabelParams ¶
type RemoveIssueLabelParams struct {
// Owner is the username or organization name that owns the repository.
Owner string `json:"owner"`
// Repo is the name of the repository.
Repo string `json:"repo"`
// Index is the issue number.
Index int `json:"index"`
// Label is the ID of the label to remove from the issue.
Label int `json:"label"`
}
RemoveIssueLabelParams defines the parameters for the remove_issue_label tool. It specifies the issue and the single label ID to be removed.
type ReplaceIssueLabelsImpl ¶
ReplaceIssueLabelsImpl implements the MCP tool for replacing all labels on an issue. This is an idempotent operation that uses the Forgejo SDK to set the definitive list of labels for an issue.
func (ReplaceIssueLabelsImpl) Definition ¶
func (ReplaceIssueLabelsImpl) Definition() *mcp.Tool
Definition describes the `replace_issue_labels` tool. It requires the issue's `index` and an array of `labels` (IDs) to apply. It is marked as idempotent.
func (ReplaceIssueLabelsImpl) Handler ¶
func (impl ReplaceIssueLabelsImpl) Handler() mcp.ToolHandlerFor[ReplaceIssueLabelsParams, any]
Handler implements the logic for replacing issue labels. It calls the Forgejo SDK's `ReplaceIssueLabels` function. It will return an error if the issue or any of the label IDs are not found.
type ReplaceIssueLabelsParams ¶
type ReplaceIssueLabelsParams struct {
// Owner is the username or organization name that owns the repository.
Owner string `json:"owner"`
// Repo is the name of the repository.
Repo string `json:"repo"`
// Index is the issue number.
Index int `json:"index"`
// Labels is a slice of label IDs that will replace all existing labels on the issue.
Labels []int `json:"labels"`
}
ReplaceIssueLabelsParams defines the parameters for the replace_issue_labels tool. It specifies the issue and the new set of label IDs.