ops

package
v2.8.1 Latest Latest
Warning

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

Go to latest
Published: Jun 19, 2026 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const DefaultListLimit = 50

DefaultListLimit caps list-style operations when the caller omits a limit so MCP clients do not accidentally pull large result sets into context.

View Source
const NoLimit = -1

NoLimit is the sentinel callers pass when they want to bypass the safety cap and fetch every result. The CLI translates `--limit 0` into this value before invoking ops; MCP callers should never use it.

Variables

View Source
var IssueRelationTypes = []string{
	"relates",
	"duplicates",
	"duplicated",
	"blocks",
	"blocked",
	"precedes",
	"follows",
	"copied_to",
	"copied_from",
}

IssueRelationTypes are the valid relation_type values accepted by Redmine. Reference: https://www.redmine.org/projects/redmine/wiki/Rest_IssueRelations

View Source
var IssueRelationTypesSupportingDelay = []string{"precedes", "follows"}

IssueRelationTypesSupportingDelay lists relation types that accept a delay value. Redmine rejects delay on any other type.

Functions

func CreateGroup

func CreateGroup(ctx context.Context, client *api.Client, input CreateGroupInput) (*models.Group, error)

func CreateIssue

func CreateIssue(ctx context.Context, client *api.Client, input CreateIssueInput) (*models.Issue, error)

func CreateIssueRelation added in v2.6.0

func CreateIssueRelation(ctx context.Context, client *api.Client, input CreateIssueRelationInput) (*models.IssueRelation, error)

func CreateMembership

func CreateMembership(ctx context.Context, client *api.Client, input CreateMembershipInput) (*models.Membership, error)

func CreateProject

func CreateProject(ctx context.Context, client *api.Client, input CreateProjectInput) (*models.Project, error)

func CreateTimeEntry

func CreateTimeEntry(ctx context.Context, client *api.Client, input CreateTimeEntryInput) (*models.TimeEntry, error)

func CreateUser

func CreateUser(ctx context.Context, client *api.Client, input CreateUserInput) (*models.User, error)

func CreateVersion

func CreateVersion(ctx context.Context, client *api.Client, input CreateVersionInput) (*models.Version, error)

func CreateWikiPage

func CreateWikiPage(ctx context.Context, client *api.Client, input CreateWikiPageInput) (*models.WikiPage, error)

func GetAttachment added in v2.8.0

func GetAttachment(ctx context.Context, client *api.Client, input GetAttachmentInput) (*models.Attachment, error)

func GetCurrentUser

func GetCurrentUser(ctx context.Context, client *api.Client, input GetCurrentUserInput) (*models.User, error)

func GetCurrentUserForResource

func GetCurrentUserForResource(ctx context.Context, client *api.Client) (*models.User, error)

func GetCustomField added in v2.6.0

func GetCustomField(ctx context.Context, client *api.Client, input GetCustomFieldInput) (*models.CustomField, error)

func GetGroup

func GetGroup(ctx context.Context, client *api.Client, input GetGroupInput) (*models.Group, error)

func GetIssue

func GetIssue(ctx context.Context, client *api.Client, input GetIssueInput) (*models.Issue, error)

func GetIssueForResource

func GetIssueForResource(ctx context.Context, client *api.Client, id int) (*models.Issue, error)

func GetIssueRelation added in v2.6.0

func GetIssueRelation(ctx context.Context, client *api.Client, input GetIssueRelationInput) (*models.IssueRelation, error)

func GetMembership

func GetMembership(ctx context.Context, client *api.Client, input GetMembershipInput) (*models.Membership, error)

func GetMyAccount added in v2.6.0

func GetMyAccount(ctx context.Context, client *api.Client, _ GetMyAccountInput) (*models.User, error)

func GetProject

func GetProject(ctx context.Context, client *api.Client, input GetProjectInput) (*models.Project, error)

func GetProjectForResource

func GetProjectForResource(ctx context.Context, client *api.Client, identifier string) (*models.Project, error)

func GetRole added in v2.6.0

func GetRole(ctx context.Context, client *api.Client, input GetRoleInput) (*models.Role, error)

func GetTimeEntry

func GetTimeEntry(ctx context.Context, client *api.Client, input GetTimeEntryInput) (*models.TimeEntry, error)

func GetTimeEntryForResource

func GetTimeEntryForResource(ctx context.Context, client *api.Client, id int) (*models.TimeEntry, error)

func GetTracker added in v2.6.0

func GetTracker(ctx context.Context, client *api.Client, input GetTrackerInput) (*models.Tracker, error)

func GetUser

func GetUser(ctx context.Context, client *api.Client, input GetUserInput) (*models.User, error)

func GetUserForResource

func GetUserForResource(ctx context.Context, client *api.Client, id int) (*models.User, error)

func GetVersion

func GetVersion(ctx context.Context, client *api.Client, input GetVersionInput) (*models.Version, error)

func GetVersionForResource

func GetVersionForResource(ctx context.Context, client *api.Client, id int) (*models.Version, error)

func GetWikiPage

func GetWikiPage(ctx context.Context, client *api.Client, input GetWikiPageInput) (*models.WikiPage, error)

func GetWikiPageForResource

func GetWikiPageForResource(ctx context.Context, client *api.Client, projectID, page string) (*models.WikiPage, error)

func ListLimit

func ListLimit(requested int) int

ListLimit returns the effective limit for a list operation.

The exact NoLimit sentinel is translated to the API client's "0 = unlimited" convention. Zero applies the MCP-safety default. Other negatives also clamp to the safety default so a stray negative value cannot quietly bypass the cap (the MCP wrapper additionally clamps before reaching this function). Positive values pass through unchanged.

Types

type AddIssueCommentInput

type AddIssueCommentInput struct {
	ID           int    `json:"id" jsonschema:"Issue ID to comment on."`
	Notes        string `json:"notes" jsonschema:"Comment body (journal note)."`
	PrivateNotes bool   `json:"private_notes,omitempty" jsonschema:"Mark the note as private."`
}

type AddIssueWatcherInput added in v2.6.0

type AddIssueWatcherInput struct {
	ID     int `json:"id" jsonschema:"Issue ID to add a watcher to."`
	UserID int `json:"user_id" jsonschema:"User ID to add as watcher (must be > 0)."`
}

type ArchiveProjectInput added in v2.6.0

type ArchiveProjectInput struct {
	Identifier string `json:"identifier" jsonschema:"Project identifier or numeric ID to archive. Requires Redmine 5.0+."`
}

type AssignIssueInput

type AssignIssueInput struct {
	ID         int `json:"id" jsonschema:"Issue ID to assign."`
	AssigneeID int `json:"assignee_id" jsonschema:"User ID to assign. Must be > 0 (use update_issue to unassign)."`
}

type CategoriesListResult

type CategoriesListResult struct {
	Categories []models.IssueCategory `json:"issue_categories"`
	Count      int                    `json:"count"`
	TotalCount int                    `json:"total_count"`
}

func ListCategories

func ListCategories(ctx context.Context, client *api.Client, input ListCategoriesInput) (CategoriesListResult, error)

type CloseIssueInput

type CloseIssueInput struct {
	ID    int    `json:"id" jsonschema:"Issue ID to close."`
	Notes string `json:"notes,omitempty" jsonschema:"Optional journal note to attach."`
}

type CreateGroupInput

type CreateGroupInput struct {
	Name    string `json:"name" jsonschema:"Group name."`
	UserIDs []int  `json:"user_ids,omitempty" jsonschema:"Optional list of user IDs to add as group members."`
}

type CreateIssueInput

type CreateIssueInput struct {
	ProjectID         int               `json:"project_id" jsonschema:"Numeric project ID to create the issue in."`
	Subject           string            `json:"subject" jsonschema:"Issue subject (title)."`
	Description       string            `json:"description,omitempty" jsonschema:"Issue body (Textile or Markdown depending on the Redmine configuration)."`
	TrackerID         int               `json:"tracker_id,omitempty" jsonschema:"Tracker ID (Bug, Feature, ...). Use list_trackers to discover."`
	StatusID          int               `json:"status_id,omitempty" jsonschema:"Initial status ID. Use list_statuses to discover."`
	PriorityID        int               `json:"priority_id,omitempty" jsonschema:"Priority ID."`
	AssignedToID      int               `json:"assigned_to_id,omitempty" jsonschema:"User ID of the assignee."`
	CategoryID        int               `json:"category_id,omitempty" jsonschema:"Issue category ID. Use list_categories to discover."`
	FixedVersionID    int               `json:"fixed_version_id,omitempty" jsonschema:"Fixed version (milestone) ID."`
	ParentIssueID     int               `json:"parent_issue_id,omitempty" jsonschema:"Parent issue ID for sub-tasks."`
	StartDate         string            `json:"start_date,omitempty" jsonschema:"Start date (YYYY-MM-DD)."`
	DueDate           string            `json:"due_date,omitempty" jsonschema:"Due date (YYYY-MM-DD)."`
	EstimatedHours    float64           `json:"estimated_hours,omitempty" jsonschema:"Estimated effort in hours."`
	IsPrivate         *bool             `json:"is_private,omitempty" jsonschema:"Mark the issue as private."`
	WatcherUserIDs    []int             `json:"watcher_user_ids,omitempty" jsonschema:"Initial watcher user IDs (numeric)."`
	CustomFieldValues map[string]string `` /* 149-byte string literal not displayed */
	Uploads           []models.Upload   `json:"-"`
}

type CreateIssueRelationInput added in v2.6.0

type CreateIssueRelationInput struct {
	IssueID      int    `json:"issue_id" jsonschema:"Source issue ID."`
	IssueToID    int    `json:"issue_to_id" jsonschema:"Target issue ID."`
	RelationType string `` /* 174-byte string literal not displayed */
	Delay        *int   `json:"delay,omitempty" jsonschema:"Number of days delay. Only meaningful for relation types 'precedes' and 'follows'."`
}

type CreateMembershipInput

type CreateMembershipInput struct {
	ProjectID string `json:"project_id" jsonschema:"Project identifier or numeric ID."`
	UserID    int    `json:"user_id" jsonschema:"Numeric user ID to add as a member."`
	RoleIDs   []int  `json:"role_ids" jsonschema:"One or more role IDs to grant. Use list_roles to discover valid values."`
}

type CreateProjectInput

type CreateProjectInput struct {
	Name                string            `json:"name" jsonschema:"Human-readable project name."`
	Identifier          string            `json:"identifier" jsonschema:"URL-safe project identifier (slug)."`
	Description         string            `json:"description,omitempty" jsonschema:"Project description."`
	Homepage            string            `json:"homepage,omitempty" jsonschema:"Project homepage URL."`
	IsPublic            *bool             `json:"is_public,omitempty" jsonschema:"Mark the project as public."`
	ParentID            int               `json:"parent_id,omitempty" jsonschema:"Parent project numeric ID."`
	InheritMembers      bool              `json:"inherit_members,omitempty" jsonschema:"Inherit members from the parent project."`
	DefaultAssignedToID int               `json:"default_assigned_to_id,omitempty" jsonschema:"Numeric user ID set as the default assignee for new issues."`
	DefaultVersionID    int               `` /* 187-byte string literal not displayed */
	TrackerIDs          []int             `` /* 131-byte string literal not displayed */
	EnabledModuleNames  []string          `` /* 228-byte string literal not displayed */
	IssueCustomFieldIDs []int             `json:"issue_custom_field_ids,omitempty" jsonschema:"Numeric IDs of issue-level custom fields enabled for this project."`
	CustomFieldValues   map[string]string `` /* 127-byte string literal not displayed */
}

type CreateTimeEntryInput

type CreateTimeEntryInput struct {
	IssueID    int     `json:"issue_id,omitempty" jsonschema:"Issue to log time against. Either issue_id or project_id is required."`
	ProjectID  string  `json:"project_id,omitempty" jsonschema:"Project identifier or numeric ID. Either issue_id or project_id is required."`
	Hours      float64 `json:"hours" jsonschema:"Hours worked (decimal, e.g. 1.5)."`
	ActivityID int     `json:"activity_id,omitempty" jsonschema:"Activity enumeration ID."`
	SpentOn    string  `json:"spent_on,omitempty" jsonschema:"Date the work was done (YYYY-MM-DD). Defaults to today."`
	Comments   string  `json:"comments,omitempty" jsonschema:"Free-text comment."`
	UserID     int     `` /* 156-byte string literal not displayed */
}

type CreateUserInput

type CreateUserInput struct {
	Login            string  `json:"login" jsonschema:"Unique login name."`
	Password         string  `json:"password,omitempty" jsonschema:"Initial password. Omit when generate_password is true."`
	FirstName        string  `json:"firstname" jsonschema:"Given name."`
	LastName         string  `json:"lastname" jsonschema:"Family name."`
	Mail             string  `json:"mail" jsonschema:"Email address."`
	Admin            bool    `json:"admin,omitempty" jsonschema:"Grant admin privileges."`
	MailNotification *string `` /* 145-byte string literal not displayed */
	MustChangePasswd *bool   `json:"must_change_passwd,omitempty" jsonschema:"Force the user to change their password on next login."`
	GeneratePassword *bool   `json:"generate_password,omitempty" jsonschema:"Server generates a random password."`
	AuthSourceID     *int    `json:"auth_source_id,omitempty" jsonschema:"Numeric authentication source ID for external auth."`
	SendInformation  bool    `json:"send_information,omitempty" jsonschema:"Email the account info to the new user."`
}

type CreateVersionInput

type CreateVersionInput struct {
	ProjectID     string `json:"project_id" jsonschema:"Project identifier or numeric ID."`
	Name          string `json:"name" jsonschema:"Version name."`
	Status        string `json:"status,omitempty" jsonschema:"Version status: open, locked, or closed."`
	Sharing       string `json:"sharing,omitempty" jsonschema:"Version sharing: none, descendants, hierarchy, tree, or system."`
	DueDate       string `json:"due_date,omitempty" jsonschema:"Due date (YYYY-MM-DD)."`
	Description   string `json:"description,omitempty" jsonschema:"Version description."`
	WikiPageTitle string `json:"wiki_page_title,omitempty" jsonschema:"Associated wiki page title."`
}

type CreateWikiPageInput

type CreateWikiPageInput struct {
	ProjectID string          `json:"project_id" jsonschema:"Project identifier or numeric ID."`
	Page      string          `json:"page" jsonschema:"Wiki page title (slug) to create or overwrite."`
	Text      string          `json:"text" jsonschema:"Page body (Textile or Markdown depending on the Redmine configuration)."`
	Title     string          `json:"title,omitempty" jsonschema:"Optional display title; may differ from the slug."`
	Comments  string          `json:"comments,omitempty" jsonschema:"Edit comment."`
	Uploads   []models.Upload `json:"-"`
}

type CustomFieldsListResult added in v2.6.0

type CustomFieldsListResult struct {
	CustomFields []models.CustomField `json:"custom_fields"`
	Count        int                  `json:"count"`
}

func ListCustomFields added in v2.6.0

func ListCustomFields(ctx context.Context, client *api.Client, _ struct{}) (CustomFieldsListResult, error)

type DeleteGroupInput

type DeleteGroupInput struct {
	ID int `json:"id" jsonschema:"Group ID to delete. Destructive."`
}

type DeleteIssueInput

type DeleteIssueInput struct {
	ID int `json:"id" jsonschema:"Issue ID to delete."`
}

type DeleteIssueRelationInput added in v2.6.0

type DeleteIssueRelationInput struct {
	ID int `json:"id" jsonschema:"Relation ID to delete."`
}

type DeleteMembershipInput

type DeleteMembershipInput struct {
	ID int `json:"id" jsonschema:"Numeric membership ID to delete. Destructive."`
}

type DeleteProjectInput

type DeleteProjectInput struct {
	Identifier string `json:"identifier" jsonschema:"Project identifier or numeric ID to delete. Destructive."`
}

type DeleteTimeEntryInput

type DeleteTimeEntryInput struct {
	ID int `json:"id" jsonschema:"Time entry numeric ID."`
}

type DeleteUserInput

type DeleteUserInput struct {
	ID int `json:"id" jsonschema:"Numeric user ID to delete. Destructive."`
}

type DeleteVersionInput

type DeleteVersionInput struct {
	ID int `json:"id" jsonschema:"Numeric version (milestone) ID to delete. Destructive."`
}

type DeleteWikiPageInput

type DeleteWikiPageInput struct {
	ProjectID string `json:"project_id" jsonschema:"Project identifier or numeric ID."`
	Page      string `json:"page" jsonschema:"Wiki page title (slug) to delete. Destructive."`
}

type GetAttachmentInput added in v2.8.0

type GetAttachmentInput struct {
	ID int `json:"id" jsonschema:"Numeric attachment ID. Discover IDs via get_issue with includes=[\"attachments\"]."`
}

type GetCurrentUserInput added in v2.6.0

type GetCurrentUserInput struct {
	Includes []string `json:"includes,omitempty" jsonschema:"Optional includes: 'memberships', 'groups' (Redmine 2.1+)."`
}

type GetCustomFieldInput added in v2.6.0

type GetCustomFieldInput struct {
	ID int `json:"id" jsonschema:"Numeric custom field definition ID."`
}

type GetGroupInput

type GetGroupInput struct {
	ID       int      `json:"id" jsonschema:"Numeric group ID."`
	Includes []string `json:"includes,omitempty" jsonschema:"Extra sections to include: 'users', 'memberships'."`
}

type GetIssueInput

type GetIssueInput struct {
	ID       int      `json:"id" jsonschema:"Numeric issue ID."`
	Includes []string `json:"includes,omitempty" jsonschema:"Extra sections to include: journals, attachments, relations, children, watchers."`
}

type GetIssueRelationInput added in v2.6.0

type GetIssueRelationInput struct {
	ID int `json:"id" jsonschema:"Relation ID."`
}

type GetMembershipInput

type GetMembershipInput struct {
	ID int `json:"id" jsonschema:"Numeric membership ID."`
}

type GetMyAccountInput added in v2.6.0

type GetMyAccountInput struct{}

type GetProjectInput

type GetProjectInput struct {
	Identifier string   `json:"identifier" jsonschema:"Project identifier (slug) or numeric ID."`
	Includes   []string `` /* 154-byte string literal not displayed */
}

type GetRoleInput added in v2.6.0

type GetRoleInput struct {
	ID int `json:"id" jsonschema:"Numeric role ID."`
}

type GetTimeEntryInput

type GetTimeEntryInput struct {
	ID int `json:"id" jsonschema:"Time entry numeric ID."`
}

type GetTrackerInput added in v2.6.0

type GetTrackerInput struct {
	ID int `json:"id" jsonschema:"Numeric tracker ID."`
}

type GetUserInput

type GetUserInput struct {
	ID       int      `json:"id" jsonschema:"Numeric user ID."`
	Includes []string `json:"includes,omitempty" jsonschema:"Optional includes: 'memberships', 'groups' (Redmine 2.1+)."`
}

type GetVersionInput

type GetVersionInput struct {
	ID int `json:"id" jsonschema:"Numeric version (milestone) ID."`
}

type GetWikiPageInput

type GetWikiPageInput struct {
	ProjectID string   `json:"project_id" jsonschema:"Project identifier or numeric ID."`
	Page      string   `json:"page" jsonschema:"Wiki page title (slug)."`
	Includes  []string `json:"includes,omitempty" jsonschema:"Extra sections to include, e.g. 'attachments'."`
}

type GroupUserInput

type GroupUserInput struct {
	GroupID int `json:"group_id" jsonschema:"Group ID."`
	UserID  int `json:"user_id" jsonschema:"User ID."`
}

type GroupsListResult

type GroupsListResult struct {
	Groups     []models.Group `json:"groups"`
	Count      int            `json:"count"`
	TotalCount int            `json:"total_count"`
}

func ListGroups

func ListGroups(ctx context.Context, client *api.Client, input ListGroupsInput) (GroupsListResult, error)

type IssueRelationsResult added in v2.6.0

type IssueRelationsResult struct {
	Relations []models.IssueRelation `json:"relations"`
	Count     int                    `json:"count"`
}

func ListIssueRelations added in v2.6.0

func ListIssueRelations(ctx context.Context, client *api.Client, input ListIssueRelationsInput) (IssueRelationsResult, error)

type IssueWatchersResult added in v2.6.0

type IssueWatchersResult struct {
	Watchers []models.IDName `json:"watchers"`
	Count    int             `json:"count"`
}

func ListIssueWatchers added in v2.6.0

func ListIssueWatchers(ctx context.Context, client *api.Client, input ListIssueWatchersInput) (IssueWatchersResult, error)

type IssuesListResult

type IssuesListResult struct {
	Issues     []models.Issue `json:"issues"`
	Count      int            `json:"count"`
	TotalCount int            `json:"total_count"`
}

func ListIssues

func ListIssues(ctx context.Context, client *api.Client, input ListIssuesInput) (IssuesListResult, error)

type ListCategoriesInput

type ListCategoriesInput struct {
	ProjectID string `json:"project_id" jsonschema:"Project identifier or numeric ID."`
}

type ListGroupsInput

type ListGroupsInput struct {
	Limit  int `json:"limit,omitempty" jsonschema:"Max results to return. Defaults to 50 when omitted."`
	Offset int `json:"offset,omitempty" jsonschema:"Number of leading results to skip (pagination)."`
}

type ListIssueRelationsInput added in v2.6.0

type ListIssueRelationsInput struct {
	IssueID int `json:"issue_id" jsonschema:"Issue ID to list relations for."`
}

type ListIssueWatchersInput added in v2.6.0

type ListIssueWatchersInput struct {
	ID int `json:"id" jsonschema:"Issue ID."`
}

type ListIssuesInput

type ListIssuesInput struct {
	ProjectID      string            `json:"project_id,omitempty" jsonschema:"Project identifier or numeric ID to filter by."`
	SubprojectID   string            `` /* 142-byte string literal not displayed */
	TrackerID      int               `json:"tracker_id,omitempty" jsonschema:"Tracker ID (use list_trackers to discover)."`
	StatusID       string            `json:"status_id,omitempty" jsonschema:"Status filter: 'open', 'closed', '*', or a numeric status ID."`
	AssignedToID   string            `json:"assigned_to_id,omitempty" jsonschema:"Assignee: numeric user ID or 'me'."`
	AuthorID       string            `json:"author_id,omitempty" jsonschema:"Author: numeric user ID or 'me'."`
	PriorityID     string            `json:"priority_id,omitempty" jsonschema:"Priority: numeric ID (use list_priorities to discover)."`
	CategoryID     int               `json:"category_id,omitempty" jsonschema:"Issue category ID (use list_categories to discover)."`
	FixedVersionID int               `json:"fixed_version_id,omitempty" jsonschema:"Fixed version (milestone) ID."`
	ParentID       int               `json:"parent_id,omitempty" jsonschema:"Restrict to children of this issue ID."`
	IsPrivate      *bool             `json:"is_private,omitempty" jsonschema:"Filter by privacy: true returns only private issues, false returns only public ones."`
	QueryID        int               `` /* 140-byte string literal not displayed */
	Sort           string            `json:"sort,omitempty" jsonschema:"Sort expression, e.g. 'updated_on:desc'."`
	Includes       []string          `json:"includes,omitempty" jsonschema:"Extra fields to include: attachments, relations, children, watchers."`
	ExtraParams    map[string]string `` /* 178-byte string literal not displayed */
	Limit          int               `json:"limit,omitempty" jsonschema:"Max results to return. Defaults to 50 when omitted."`
	Offset         int               `json:"offset,omitempty" jsonschema:"Number of leading results to skip (pagination)."`
}

type ListMembershipsInput

type ListMembershipsInput struct {
	ProjectID string `json:"project_id" jsonschema:"Project identifier or numeric ID."`
	Limit     int    `json:"limit,omitempty" jsonschema:"Max results to return. Defaults to 50 when omitted."`
	Offset    int    `json:"offset,omitempty" jsonschema:"Number of leading results to skip."`
}

type ListProjectFilesInput added in v2.6.0

type ListProjectFilesInput struct {
	ProjectID string `json:"project_id" jsonschema:"Project identifier or numeric ID."`
	Limit     int    `json:"limit,omitempty" jsonschema:"Max results to return. Defaults to 50 when omitted."`
	Offset    int    `json:"offset,omitempty" jsonschema:"Number of leading results to skip."`
}

type ListProjectMembersInput

type ListProjectMembersInput struct {
	Identifier string `json:"identifier" jsonschema:"Project identifier or numeric ID."`
	Limit      int    `json:"limit,omitempty" jsonschema:"Max results to return. Defaults to 50 when omitted."`
	Offset     int    `json:"offset,omitempty" jsonschema:"Number of leading results to skip."`
}

type ListProjectsInput

type ListProjectsInput struct {
	Includes []string `` /* 154-byte string literal not displayed */
	Limit    int      `json:"limit,omitempty" jsonschema:"Max results to return. Defaults to 50 when omitted."`
	Offset   int      `json:"offset,omitempty" jsonschema:"Number of leading results to skip."`
}

type ListQueriesInput added in v2.6.0

type ListQueriesInput struct {
	Limit  int `json:"limit,omitempty" jsonschema:"Max results to return. Defaults to 50 when omitted."`
	Offset int `json:"offset,omitempty" jsonschema:"Number of leading results to skip (pagination)."`
}

type ListTimeEntriesInput

type ListTimeEntriesInput struct {
	ProjectID  string `json:"project_id,omitempty" jsonschema:"Project identifier or numeric ID to filter by."`
	UserID     string `json:"user_id,omitempty" jsonschema:"User numeric ID or 'me'."`
	IssueID    int    `json:"issue_id,omitempty" jsonschema:"Issue numeric ID to filter by."`
	ActivityID int    `json:"activity_id,omitempty" jsonschema:"Activity enumeration ID."`
	From       string `json:"from,omitempty" jsonschema:"Inclusive start date (YYYY-MM-DD)."`
	To         string `json:"to,omitempty" jsonschema:"Inclusive end date (YYYY-MM-DD)."`
	Limit      int    `json:"limit,omitempty" jsonschema:"Max results to return. Defaults to 50 when omitted."`
	Offset     int    `json:"offset,omitempty" jsonschema:"Number of leading results to skip."`
}

type ListUsersInput

type ListUsersInput struct {
	Status  string `json:"status,omitempty" jsonschema:"Filter by status: 'active', 'registered', 'locked', or a numeric code."`
	Name    string `json:"name,omitempty" jsonschema:"Filter by name substring."`
	GroupID int    `json:"group_id,omitempty" jsonschema:"Filter users that belong to the given group ID."`
	Limit   int    `json:"limit,omitempty" jsonschema:"Max results to return. Defaults to 50 when omitted."`
	Offset  int    `json:"offset,omitempty" jsonschema:"Number of leading results to skip."`
}

type ListVersionsInput

type ListVersionsInput struct {
	ProjectID string `json:"project_id" jsonschema:"Project identifier or numeric ID."`
	Limit     int    `json:"limit,omitempty" jsonschema:"Max results to return. Defaults to 50 when omitted."`
	Offset    int    `json:"offset,omitempty" jsonschema:"Number of leading results to skip."`
}

type ListWikiPagesInput

type ListWikiPagesInput struct {
	ProjectID string `json:"project_id" jsonschema:"Project identifier or numeric ID."`
	Limit     int    `json:"limit,omitempty" jsonschema:"Max results to return. Defaults to 50 when omitted."`
	Offset    int    `json:"offset,omitempty" jsonschema:"Number of leading results to skip."`
}

type MembershipsListResult

type MembershipsListResult struct {
	Memberships []models.Membership `json:"memberships"`
	Count       int                 `json:"count"`
	TotalCount  int                 `json:"total_count"`
}

func ListMemberships

func ListMemberships(ctx context.Context, client *api.Client, input ListMembershipsInput) (MembershipsListResult, error)

type MessageResult

type MessageResult struct {
	Message string `json:"message"`
}

MessageResult is a simple acknowledgement payload for mutating operations.

func AddGroupUser

func AddGroupUser(ctx context.Context, client *api.Client, input GroupUserInput) (MessageResult, error)

func AddIssueComment

func AddIssueComment(ctx context.Context, client *api.Client, input AddIssueCommentInput) (MessageResult, error)

func AddIssueWatcher added in v2.6.0

func AddIssueWatcher(ctx context.Context, client *api.Client, input AddIssueWatcherInput) (MessageResult, error)

func ArchiveProject added in v2.6.0

func ArchiveProject(ctx context.Context, client *api.Client, input ArchiveProjectInput) (MessageResult, error)

func AssignIssue

func AssignIssue(ctx context.Context, client *api.Client, input AssignIssueInput) (MessageResult, error)

func CloseIssue

func CloseIssue(ctx context.Context, client *api.Client, input CloseIssueInput) (MessageResult, error)

func DeleteGroup

func DeleteGroup(ctx context.Context, client *api.Client, input DeleteGroupInput) (MessageResult, error)

func DeleteIssue

func DeleteIssue(ctx context.Context, client *api.Client, input DeleteIssueInput) (MessageResult, error)

func DeleteIssueRelation added in v2.6.0

func DeleteIssueRelation(ctx context.Context, client *api.Client, input DeleteIssueRelationInput) (MessageResult, error)

func DeleteMembership

func DeleteMembership(ctx context.Context, client *api.Client, input DeleteMembershipInput) (MessageResult, error)

func DeleteProject

func DeleteProject(ctx context.Context, client *api.Client, input DeleteProjectInput) (MessageResult, error)

func DeleteTimeEntry

func DeleteTimeEntry(ctx context.Context, client *api.Client, input DeleteTimeEntryInput) (MessageResult, error)

func DeleteUser

func DeleteUser(ctx context.Context, client *api.Client, input DeleteUserInput) (MessageResult, error)

func DeleteVersion

func DeleteVersion(ctx context.Context, client *api.Client, input DeleteVersionInput) (MessageResult, error)

func DeleteWikiPage

func DeleteWikiPage(ctx context.Context, client *api.Client, input DeleteWikiPageInput) (MessageResult, error)

func RemoveGroupUser

func RemoveGroupUser(ctx context.Context, client *api.Client, input GroupUserInput) (MessageResult, error)

func RemoveIssueWatcher added in v2.6.0

func RemoveIssueWatcher(ctx context.Context, client *api.Client, input RemoveIssueWatcherInput) (MessageResult, error)

func ReopenIssue

func ReopenIssue(ctx context.Context, client *api.Client, input ReopenIssueInput) (MessageResult, error)

func UnarchiveProject added in v2.6.0

func UnarchiveProject(ctx context.Context, client *api.Client, input UnarchiveProjectInput) (MessageResult, error)

func UpdateGroup

func UpdateGroup(ctx context.Context, client *api.Client, input UpdateGroupInput) (MessageResult, error)

func UpdateIssue

func UpdateIssue(ctx context.Context, client *api.Client, input UpdateIssueInput) (MessageResult, error)

func UpdateMembership

func UpdateMembership(ctx context.Context, client *api.Client, input UpdateMembershipInput) (MessageResult, error)

func UpdateMyAccount added in v2.6.0

func UpdateMyAccount(ctx context.Context, client *api.Client, input UpdateMyAccountInput) (MessageResult, error)

func UpdateProject

func UpdateProject(ctx context.Context, client *api.Client, input UpdateProjectInput) (MessageResult, error)

func UpdateTimeEntry

func UpdateTimeEntry(ctx context.Context, client *api.Client, input UpdateTimeEntryInput) (MessageResult, error)

func UpdateUser

func UpdateUser(ctx context.Context, client *api.Client, input UpdateUserInput) (MessageResult, error)

func UpdateVersion

func UpdateVersion(ctx context.Context, client *api.Client, input UpdateVersionInput) (MessageResult, error)

func UpdateWikiPage

func UpdateWikiPage(ctx context.Context, client *api.Client, input UpdateWikiPageInput) (MessageResult, error)

func UploadProjectFile added in v2.6.0

func UploadProjectFile(ctx context.Context, client *api.Client, input UploadProjectFileInput) (MessageResult, error)

UploadProjectFile attaches a previously uploaded file (via the /uploads.json flow) to a project. The Redmine API returns no body on success; callers can re-list the project's files to surface the resulting record.

Deliberately not exposed as an MCP tool: the function requires an upload token obtained by streaming bytes to /uploads.json, and MCP has no tool that produces such a token, so exposing it alone would be unusable.

func (MessageResult) MCPMessage

func (m MessageResult) MCPMessage() string

MCPMessage exposes the human-readable message used by the MCP wrapper.

type ProjectFilesListResult added in v2.6.0

type ProjectFilesListResult struct {
	Files      []models.ProjectFile `json:"files"`
	Count      int                  `json:"count"`
	TotalCount int                  `json:"total_count"`
}

func ListProjectFiles added in v2.6.0

func ListProjectFiles(ctx context.Context, client *api.Client, input ListProjectFilesInput) (ProjectFilesListResult, error)

type ProjectMembersListResult

type ProjectMembersListResult struct {
	Members    []models.Membership `json:"members"`
	Count      int                 `json:"count"`
	TotalCount int                 `json:"total_count"`
}

type ProjectsListResult

type ProjectsListResult struct {
	Projects   []models.Project `json:"projects"`
	Count      int              `json:"count"`
	TotalCount int              `json:"total_count"`
}

func ListProjects

func ListProjects(ctx context.Context, client *api.Client, input ListProjectsInput) (ProjectsListResult, error)

type QueriesListResult added in v2.6.0

type QueriesListResult struct {
	Queries    []models.SavedQuery `json:"queries"`
	Count      int                 `json:"count"`
	TotalCount int                 `json:"total_count"`
}

func ListQueries added in v2.6.0

func ListQueries(ctx context.Context, client *api.Client, input ListQueriesInput) (QueriesListResult, error)

type RemoveIssueWatcherInput added in v2.6.0

type RemoveIssueWatcherInput struct {
	ID     int `json:"id" jsonschema:"Issue ID to remove a watcher from."`
	UserID int `json:"user_id" jsonschema:"User ID to remove (must be > 0)."`
}

type ReopenIssueInput

type ReopenIssueInput struct {
	ID    int    `json:"id" jsonschema:"Issue ID to reopen."`
	Notes string `json:"notes,omitempty" jsonschema:"Optional journal note to attach."`
}

type RolesListResult added in v2.6.0

type RolesListResult struct {
	Roles []models.Role `json:"roles"`
	Count int           `json:"count"`
}

func ListRoles added in v2.6.0

func ListRoles(ctx context.Context, client *api.Client, _ struct{}) (RolesListResult, error)

type SearchInput

type SearchInput struct {
	Query      string `json:"query" jsonschema:"Full-text search query."`
	ProjectID  string `json:"project_id,omitempty" jsonschema:"Scope search to a single project (identifier or numeric ID)."`
	Scope      string `json:"scope,omitempty" jsonschema:"One of 'all', 'my_projects', 'subprojects'."`
	Issues     bool   `json:"issues,omitempty" jsonschema:"Include issues in results."`
	News       bool   `json:"news,omitempty" jsonschema:"Include news in results."`
	Documents  bool   `json:"documents,omitempty" jsonschema:"Include documents in results."`
	Changesets bool   `json:"changesets,omitempty" jsonschema:"Include changesets in results."`
	WikiPages  bool   `json:"wiki_pages,omitempty" jsonschema:"Include wiki pages in results."`
	Messages   bool   `json:"messages,omitempty" jsonschema:"Include forum messages in results."`
	Projects   bool   `json:"projects,omitempty" jsonschema:"Include projects in results."`
	AllWords   bool   `json:"all_words,omitempty" jsonschema:"Require all query words to match."`
	TitlesOnly bool   `json:"titles_only,omitempty" jsonschema:"Match query against titles only."`
	OpenIssues bool   `json:"open_issues,omitempty" jsonschema:"Limit issue results to open issues."`
	Limit      int    `json:"limit,omitempty" jsonschema:"Max results to return. Defaults to 50 when omitted."`
	Offset     int    `json:"offset,omitempty" jsonschema:"Number of leading results to skip."`
}

type SearchResultsListResult

type SearchResultsListResult struct {
	Results    []models.SearchResult `json:"results"`
	Count      int                   `json:"count"`
	TotalCount int                   `json:"total_count"`
}
func Search(ctx context.Context, client *api.Client, input SearchInput) (SearchResultsListResult, error)

type StatusesListResult

type StatusesListResult struct {
	Statuses []models.IssueStatus `json:"issue_statuses"`
	Count    int                  `json:"count"`
}

func ListStatuses

func ListStatuses(ctx context.Context, client *api.Client, _ struct{}) (StatusesListResult, error)

type SummaryTimeEntriesInput

type SummaryTimeEntriesInput struct {
	ProjectID string `json:"project_id,omitempty" jsonschema:"Project identifier or numeric ID to filter by."`
	UserID    string `json:"user_id,omitempty" jsonschema:"User numeric ID or 'me'."`
	From      string `json:"from,omitempty" jsonschema:"Inclusive start date (YYYY-MM-DD)."`
	To        string `json:"to,omitempty" jsonschema:"Inclusive end date (YYYY-MM-DD)."`
	GroupBy   string `json:"group_by,omitempty" jsonschema:"One of 'day' (default), 'project', 'activity'."`
}

type TimeEntriesListResult

type TimeEntriesListResult struct {
	TimeEntries []models.TimeEntry `json:"time_entries"`
	Count       int                `json:"count"`
	TotalCount  int                `json:"total_count"`
}

func ListTimeEntries

func ListTimeEntries(ctx context.Context, client *api.Client, input ListTimeEntriesInput) (TimeEntriesListResult, error)

type TimeSummaryResult

type TimeSummaryResult struct {
	GroupBy    string           `json:"group_by"`
	From       string           `json:"from,omitempty"`
	To         string           `json:"to,omitempty"`
	Rows       []TimeSummaryRow `json:"rows"`
	TotalHours float64          `json:"total_hours"`
}

func SummaryTimeEntries

func SummaryTimeEntries(ctx context.Context, client *api.Client, input SummaryTimeEntriesInput) (TimeSummaryResult, error)

type TimeSummaryRow

type TimeSummaryRow struct {
	Group string  `json:"group"`
	Hours float64 `json:"hours"`
}

type TrackersListResult

type TrackersListResult struct {
	Trackers []models.Tracker `json:"trackers"`
	Count    int              `json:"count"`
}

func ListTrackers

func ListTrackers(ctx context.Context, client *api.Client, _ struct{}) (TrackersListResult, error)

type UnarchiveProjectInput added in v2.6.0

type UnarchiveProjectInput struct {
	Identifier string `json:"identifier" jsonschema:"Project identifier or numeric ID to unarchive. Requires Redmine 5.0+."`
}

type UpdateGroupInput

type UpdateGroupInput struct {
	ID      int     `json:"id" jsonschema:"Group ID to update."`
	Name    *string `json:"name,omitempty" jsonschema:"New group name."`
	UserIDs *[]int  `json:"user_ids,omitempty" jsonschema:"Replacement set of user IDs. Pass an empty list to remove all members."`
}

type UpdateIssueInput

type UpdateIssueInput struct {
	ID                int               `json:"id" jsonschema:"Issue ID to update."`
	Subject           *string           `json:"subject,omitempty" jsonschema:"New subject (title)."`
	Description       *string           `json:"description,omitempty" jsonschema:"New description body."`
	TrackerID         *int              `json:"tracker_id,omitempty" jsonschema:"New tracker ID."`
	StatusID          *int              `json:"status_id,omitempty" jsonschema:"New status ID."`
	PriorityID        *int              `json:"priority_id,omitempty" jsonschema:"New priority ID."`
	AssignedToID      *int              `json:"assigned_to_id,omitempty" jsonschema:"Positive user ID to assign the issue to."`
	CategoryID        *int              `json:"category_id,omitempty" jsonschema:"Issue category ID."`
	FixedVersionID    *int              `json:"fixed_version_id,omitempty" jsonschema:"Fixed version ID."`
	ParentIssueID     *int              `json:"parent_issue_id,omitempty" jsonschema:"Parent issue ID for sub-tasks. Set to 0 to remove the parent."`
	DoneRatio         *int              `json:"done_ratio,omitempty" jsonschema:"Completion percentage (0-100)."`
	EstimatedHours    *float64          `json:"estimated_hours,omitempty" jsonschema:"Estimated effort in hours."`
	StartDate         *string           `json:"start_date,omitempty" jsonschema:"Start date (YYYY-MM-DD). Use empty string to clear."`
	DueDate           *string           `json:"due_date,omitempty" jsonschema:"Due date (YYYY-MM-DD). Use empty string to clear."`
	Notes             *string           `json:"notes,omitempty" jsonschema:"Journal note to attach to the update."`
	PrivateNotes      *bool             `json:"private_notes,omitempty" jsonschema:"Mark the note attached via 'notes' as private."`
	IsPrivate         *bool             `json:"is_private,omitempty" jsonschema:"Toggle issue privacy."`
	CustomFieldValues map[string]string `json:"custom_field_values,omitempty" jsonschema:"Custom field values keyed by numeric custom-field ID."`
	Uploads           []models.Upload   `json:"-"`
}

type UpdateMembershipInput

type UpdateMembershipInput struct {
	ID      int   `json:"id" jsonschema:"Numeric membership ID."`
	RoleIDs []int `json:"role_ids" jsonschema:"Replacement set of role IDs. Use list_roles to discover valid values."`
}

type UpdateMyAccountInput added in v2.6.0

type UpdateMyAccountInput struct {
	FirstName        *string `json:"firstname,omitempty" jsonschema:"New given name."`
	LastName         *string `json:"lastname,omitempty" jsonschema:"New family name."`
	Mail             *string `json:"mail,omitempty" jsonschema:"New email address."`
	MailNotification *string `` /* 145-byte string literal not displayed */
}

type UpdateProjectInput

type UpdateProjectInput struct {
	Identifier          string            `json:"identifier" jsonschema:"Project identifier or numeric ID to update."`
	Name                *string           `json:"name,omitempty" jsonschema:"New project name."`
	Description         *string           `json:"description,omitempty" jsonschema:"New project description."`
	Homepage            *string           `json:"homepage,omitempty" jsonschema:"New project homepage URL."`
	IsPublic            *bool             `json:"is_public,omitempty" jsonschema:"Toggle public visibility."`
	ParentID            *int              `json:"parent_id,omitempty" jsonschema:"New parent project numeric ID. 0 detaches the project from its parent."`
	InheritMembers      *bool             `json:"inherit_members,omitempty" jsonschema:"Toggle inheriting members from the parent project."`
	DefaultAssignedToID *int              `` /* 134-byte string literal not displayed */
	DefaultVersionID    *int              `` /* 132-byte string literal not displayed */
	TrackerIDs          []int             `json:"tracker_ids,omitempty" jsonschema:"Replace the enabled tracker set with the given IDs."`
	EnabledModuleNames  []string          `json:"enabled_module_names,omitempty" jsonschema:"Replace the enabled module set with the given names."`
	IssueCustomFieldIDs []int             `json:"issue_custom_field_ids,omitempty" jsonschema:"Replace the enabled issue custom-field set with the given IDs."`
	CustomFieldValues   map[string]string `` /* 127-byte string literal not displayed */
}

type UpdateTimeEntryInput

type UpdateTimeEntryInput struct {
	ID         int      `json:"id" jsonschema:"Time entry numeric ID."`
	Hours      *float64 `json:"hours,omitempty" jsonschema:"New hours worked."`
	ActivityID *int     `json:"activity_id,omitempty" jsonschema:"New activity enumeration ID."`
	SpentOn    *string  `json:"spent_on,omitempty" jsonschema:"New date (YYYY-MM-DD)."`
	Comments   *string  `json:"comments,omitempty" jsonschema:"New comment body."`
}

type UpdateUserInput

type UpdateUserInput struct {
	ID               int     `json:"id" jsonschema:"Numeric user ID to update."`
	FirstName        *string `json:"firstname,omitempty" jsonschema:"New given name."`
	LastName         *string `json:"lastname,omitempty" jsonschema:"New family name."`
	Mail             *string `json:"mail,omitempty" jsonschema:"New email address."`
	Admin            *bool   `json:"admin,omitempty" jsonschema:"Toggle admin privileges."`
	Status           *int    `json:"status,omitempty" jsonschema:"Numeric status code (1 active, 2 registered, 3 locked)."`
	MailNotification *string `` /* 145-byte string literal not displayed */
	MustChangePasswd *bool   `json:"must_change_passwd,omitempty" jsonschema:"Force the user to change their password on next login."`
	GeneratePassword *bool   `json:"generate_password,omitempty" jsonschema:"Server generates a random password."`
	AuthSourceID     *int    `json:"auth_source_id,omitempty" jsonschema:"Numeric authentication source ID for external auth."`
}

type UpdateVersionInput

type UpdateVersionInput struct {
	ID            int     `json:"id" jsonschema:"Numeric version (milestone) ID."`
	Name          *string `json:"name,omitempty" jsonschema:"New version name."`
	Status        *string `json:"status,omitempty" jsonschema:"New status: open, locked, or closed."`
	Sharing       *string `json:"sharing,omitempty" jsonschema:"New sharing: none, descendants, hierarchy, tree, or system."`
	DueDate       *string `json:"due_date,omitempty" jsonschema:"New due date (YYYY-MM-DD)."`
	Description   *string `json:"description,omitempty" jsonschema:"New description."`
	WikiPageTitle *string `json:"wiki_page_title,omitempty" jsonschema:"New associated wiki page title."`
}

type UpdateWikiPageInput

type UpdateWikiPageInput struct {
	ProjectID   string          `json:"project_id" jsonschema:"Project identifier or numeric ID."`
	Page        string          `json:"page" jsonschema:"Wiki page title (slug) to update."`
	Text        *string         `json:"text,omitempty" jsonschema:"New page body, or new section content when --section is set."`
	Title       *string         `json:"title,omitempty" jsonschema:"New display title."`
	Comments    *string         `json:"comments,omitempty" jsonschema:"Edit comment."`
	Version     *int            `` /* 182-byte string literal not displayed */
	Uploads     []models.Upload `json:"-"`
	Section     *int            `json:"section,omitempty" jsonschema:"Section number (1-based) to update instead of the full page."`
	SectionHash *string         `` /* 137-byte string literal not displayed */
}

type UploadProjectFileInput added in v2.6.0

type UploadProjectFileInput struct {
	ProjectID   string `json:"project_id" jsonschema:"Project identifier or numeric ID."`
	Token       string `json:"token" jsonschema:"Upload token returned by the /uploads.json endpoint."`
	Filename    string `json:"filename,omitempty" jsonschema:"File name shown in Redmine. Defaults to the uploaded file's name."`
	VersionID   int    `json:"version_id,omitempty" jsonschema:"Optional version (milestone) to attach the file to."`
	Description string `json:"description,omitempty" jsonschema:"Optional human-readable description."`
	ContentType string `json:"content_type,omitempty" jsonschema:"Optional MIME type override."`
}

type UsersListResult

type UsersListResult struct {
	Users      []models.User `json:"users"`
	Count      int           `json:"count"`
	TotalCount int           `json:"total_count"`
}

func ListUsers

func ListUsers(ctx context.Context, client *api.Client, input ListUsersInput) (UsersListResult, error)

type VersionsListResult

type VersionsListResult struct {
	Versions   []models.Version `json:"versions"`
	Count      int              `json:"count"`
	TotalCount int              `json:"total_count"`
}

func ListVersions

func ListVersions(ctx context.Context, client *api.Client, input ListVersionsInput) (VersionsListResult, error)

type WikiPagesListResult

type WikiPagesListResult struct {
	Pages      []models.WikiPageIndex `json:"pages"`
	Count      int                    `json:"count"`
	TotalCount int                    `json:"total_count"`
}

func ListWikiPages

func ListWikiPages(ctx context.Context, client *api.Client, input ListWikiPagesInput) (WikiPagesListResult, error)

Jump to

Keyboard shortcuts

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