Documentation
¶
Overview ¶
This is a new file
Index ¶
- Variables
- func AckIncident(getClient GetFlashdutyClientFn, t translations.TranslationHelperFunc) (tool mcp.Tool, handler server.ToolHandlerFunc)
- func AddResponder(getClient GetFlashdutyClientFn, t translations.TranslationHelperFunc) (tool mcp.Tool, handler server.ToolHandlerFunc)
- func AssignIncident(getClient GetFlashdutyClientFn, t translations.TranslationHelperFunc) (tool mcp.Tool, handler server.ToolHandlerFunc)
- func ChannelInfos(getClient GetFlashdutyClientFn, t translations.TranslationHelperFunc) (tool mcp.Tool, handler server.ToolHandlerFunc)
- func CommentIncident(getClient GetFlashdutyClientFn, t translations.TranslationHelperFunc) (tool mcp.Tool, handler server.ToolHandlerFunc)
- func CreateIncident(getClient GetFlashdutyClientFn, t translations.TranslationHelperFunc) (tool mcp.Tool, handler server.ToolHandlerFunc)
- func DefaultToolsetGroup(getClient GetFlashdutyClientFn, readOnly bool, ...) *toolsets.ToolsetGroup
- func GetIncidentAlerts(getClient GetFlashdutyClientFn, t translations.TranslationHelperFunc) (tool mcp.Tool, handler server.ToolHandlerFunc)
- func GetIncidentTimeline(getClient GetFlashdutyClientFn, t translations.TranslationHelperFunc) (tool mcp.Tool, handler server.ToolHandlerFunc)
- func IncidentInfos(getClient GetFlashdutyClientFn, t translations.TranslationHelperFunc) (tool mcp.Tool, handler server.ToolHandlerFunc)
- func ListChannels(getClient GetFlashdutyClientFn, t translations.TranslationHelperFunc) (tool mcp.Tool, handler server.ToolHandlerFunc)
- func ListIncidents(getClient GetFlashdutyClientFn, t translations.TranslationHelperFunc) (tool mcp.Tool, handler server.ToolHandlerFunc)
- func ListPastIncidents(getClient GetFlashdutyClientFn, t translations.TranslationHelperFunc) (tool mcp.Tool, handler server.ToolHandlerFunc)
- func MarshalledTextResult(v any) *mcp.CallToolResult
- func MemberInfos(getClient GetFlashdutyClientFn, t translations.TranslationHelperFunc) (tool mcp.Tool, handler server.ToolHandlerFunc)
- func MergeIncident(getClient GetFlashdutyClientFn, t translations.TranslationHelperFunc) (tool mcp.Tool, handler server.ToolHandlerFunc)
- func OptionalInt(r mcp.CallToolRequest, p string) (int, error)
- func OptionalParam[T any](r mcp.CallToolRequest, p string) (T, error)
- func RequiredInt(r mcp.CallToolRequest, p string) (int, error)
- func RequiredParam[T comparable](r mcp.CallToolRequest, p string) (T, error)
- func ResolveIncident(getClient GetFlashdutyClientFn, t translations.TranslationHelperFunc) (tool mcp.Tool, handler server.ToolHandlerFunc)
- func SnoozeIncident(getClient GetFlashdutyClientFn, t translations.TranslationHelperFunc) (tool mcp.Tool, handler server.ToolHandlerFunc)
- func TeamInfos(getClient GetFlashdutyClientFn, t translations.TranslationHelperFunc) (tool mcp.Tool, handler server.ToolHandlerFunc)
- func ToBoolPtr(b bool) *bool
- func UpdateIncidentDescription(getClient GetFlashdutyClientFn, t translations.TranslationHelperFunc) (tool mcp.Tool, handler server.ToolHandlerFunc)
- func UpdateIncidentFields(getClient GetFlashdutyClientFn, t translations.TranslationHelperFunc) (tool mcp.Tool, handler server.ToolHandlerFunc)
- func UpdateIncidentImpact(getClient GetFlashdutyClientFn, t translations.TranslationHelperFunc) (tool mcp.Tool, handler server.ToolHandlerFunc)
- func UpdateIncidentResolution(getClient GetFlashdutyClientFn, t translations.TranslationHelperFunc) (tool mcp.Tool, handler server.ToolHandlerFunc)
- func UpdateIncidentRootCause(getClient GetFlashdutyClientFn, t translations.TranslationHelperFunc) (tool mcp.Tool, handler server.ToolHandlerFunc)
- func UpdateIncidentSeverity(getClient GetFlashdutyClientFn, t translations.TranslationHelperFunc) (tool mcp.Tool, handler server.ToolHandlerFunc)
- func UpdateIncidentTitle(getClient GetFlashdutyClientFn, t translations.TranslationHelperFunc) (tool mcp.Tool, handler server.ToolHandlerFunc)
- type Client
- type DutyError
- type FlashdutyResponse
- type GetFlashdutyClientFn
- type MemberItem
- type MemberItemShort
- type MemberListResponse
Constants ¶
This section is empty.
Variables ¶
var DefaultTools = []string{"flashduty_members", "flashduty_teams", "flashduty_channels", "flashduty_incidents"}
DefaultTools is the default list of enabled Flashduty toolsets
Functions ¶
func AckIncident ¶
func AckIncident(getClient GetFlashdutyClientFn, t translations.TranslationHelperFunc) (tool mcp.Tool, handler server.ToolHandlerFunc)
AckIncident creates a tool to acknowledge incidents
func AddResponder ¶
func AddResponder(getClient GetFlashdutyClientFn, t translations.TranslationHelperFunc) (tool mcp.Tool, handler server.ToolHandlerFunc)
AddResponder creates a tool to add responders to incidents
func AssignIncident ¶
func AssignIncident(getClient GetFlashdutyClientFn, t translations.TranslationHelperFunc) (tool mcp.Tool, handler server.ToolHandlerFunc)
AssignIncident creates a tool to assign incidents to people or escalation rules
func ChannelInfos ¶
func ChannelInfos(getClient GetFlashdutyClientFn, t translations.TranslationHelperFunc) (tool mcp.Tool, handler server.ToolHandlerFunc)
ChannelInfos creates a tool to get collaboration space information by channel IDs
func CommentIncident ¶
func CommentIncident(getClient GetFlashdutyClientFn, t translations.TranslationHelperFunc) (tool mcp.Tool, handler server.ToolHandlerFunc)
CommentIncident creates a tool to add comments to incidents
func CreateIncident ¶
func CreateIncident(getClient GetFlashdutyClientFn, t translations.TranslationHelperFunc) (tool mcp.Tool, handler server.ToolHandlerFunc)
CreateIncident creates a tool to create a new incident
func DefaultToolsetGroup ¶
func DefaultToolsetGroup(getClient GetFlashdutyClientFn, readOnly bool, t translations.TranslationHelperFunc) *toolsets.ToolsetGroup
DefaultToolsetGroup returns the default toolset group for Flashduty
func GetIncidentAlerts ¶
func GetIncidentAlerts(getClient GetFlashdutyClientFn, t translations.TranslationHelperFunc) (tool mcp.Tool, handler server.ToolHandlerFunc)
GetIncidentAlerts creates a tool to get alerts associated with incidents
func GetIncidentTimeline ¶
func GetIncidentTimeline(getClient GetFlashdutyClientFn, t translations.TranslationHelperFunc) (tool mcp.Tool, handler server.ToolHandlerFunc)
GetIncidentTimeline creates a tool to get incident timeline and feed
func IncidentInfos ¶
func IncidentInfos(getClient GetFlashdutyClientFn, t translations.TranslationHelperFunc) (tool mcp.Tool, handler server.ToolHandlerFunc)
IncidentInfos creates a tool to get incident information by incident IDs
func ListChannels ¶
func ListChannels(getClient GetFlashdutyClientFn, t translations.TranslationHelperFunc) (tool mcp.Tool, handler server.ToolHandlerFunc)
func ListIncidents ¶
func ListIncidents(getClient GetFlashdutyClientFn, t translations.TranslationHelperFunc) (tool mcp.Tool, handler server.ToolHandlerFunc)
ListIncidents creates a tool to list incidents with comprehensive filters
func ListPastIncidents ¶
func ListPastIncidents(getClient GetFlashdutyClientFn, t translations.TranslationHelperFunc) (tool mcp.Tool, handler server.ToolHandlerFunc)
ListPastIncidents creates a tool to list similar historical incidents
func MarshalledTextResult ¶
func MarshalledTextResult(v any) *mcp.CallToolResult
MarshalledTextResult marshals the given value to JSON and returns it as a text result
func MemberInfos ¶
func MemberInfos(getClient GetFlashdutyClientFn, t translations.TranslationHelperFunc) (tool mcp.Tool, handler server.ToolHandlerFunc)
MemberInfos creates a tool to get member information by person IDs
func MergeIncident ¶
func MergeIncident(getClient GetFlashdutyClientFn, t translations.TranslationHelperFunc) (tool mcp.Tool, handler server.ToolHandlerFunc)
MergeIncident creates a tool to merge multiple incidents into one
func OptionalInt ¶
func OptionalInt(r mcp.CallToolRequest, p string) (int, error)
OptionalInt is a helper function that can be used to fetch a requested parameter from the request. It does the following checks: 1. Checks if the parameter is present in the request, if not, it returns its zero-value 2. If it is present, it checks if the parameter is of the expected type and returns it
func OptionalParam ¶
func OptionalParam[T any](r mcp.CallToolRequest, p string) (T, error)
OptionalParam is a helper function that can be used to fetch a requested parameter from the request. It does the following checks: 1. Checks if the parameter is present in the request, if not, it returns its zero-value 2. If it is present, it checks if the parameter is of the expected type and returns it
func RequiredInt ¶
func RequiredInt(r mcp.CallToolRequest, p string) (int, error)
RequiredInt is a helper function that can be used to fetch a requested parameter from the request. It does the following checks: 1. Checks if the parameter is present in the request. 2. Checks if the parameter is of the expected type. 3. Checks if the parameter is not empty, i.e: non-zero value
func RequiredParam ¶
func RequiredParam[T comparable](r mcp.CallToolRequest, p string) (T, error)
RequiredParam is a helper function that can be used to fetch a requested parameter from the request. It does the following checks: 1. Checks if the parameter is present in the request. 2. Checks if the parameter is of the expected type. 3. Checks if the parameter is not empty, i.e: non-zero value
func ResolveIncident ¶
func ResolveIncident(getClient GetFlashdutyClientFn, t translations.TranslationHelperFunc) (tool mcp.Tool, handler server.ToolHandlerFunc)
ResolveIncident creates a tool to resolve incidents
func SnoozeIncident ¶
func SnoozeIncident(getClient GetFlashdutyClientFn, t translations.TranslationHelperFunc) (tool mcp.Tool, handler server.ToolHandlerFunc)
SnoozeIncident creates a tool to snooze incidents for a period
func TeamInfos ¶
func TeamInfos(getClient GetFlashdutyClientFn, t translations.TranslationHelperFunc) (tool mcp.Tool, handler server.ToolHandlerFunc)
TeamInfos creates a tool to get team information by team IDs
func UpdateIncidentDescription ¶
func UpdateIncidentDescription(getClient GetFlashdutyClientFn, t translations.TranslationHelperFunc) (tool mcp.Tool, handler server.ToolHandlerFunc)
UpdateIncidentDescription creates a tool to update incident description
func UpdateIncidentFields ¶
func UpdateIncidentFields(getClient GetFlashdutyClientFn, t translations.TranslationHelperFunc) (tool mcp.Tool, handler server.ToolHandlerFunc)
UpdateIncidentFields creates a tool to update custom fields
func UpdateIncidentImpact ¶
func UpdateIncidentImpact(getClient GetFlashdutyClientFn, t translations.TranslationHelperFunc) (tool mcp.Tool, handler server.ToolHandlerFunc)
UpdateIncidentImpact creates a tool to update incident impact
func UpdateIncidentResolution ¶
func UpdateIncidentResolution(getClient GetFlashdutyClientFn, t translations.TranslationHelperFunc) (tool mcp.Tool, handler server.ToolHandlerFunc)
UpdateIncidentResolution creates a tool to update incident resolution
func UpdateIncidentRootCause ¶
func UpdateIncidentRootCause(getClient GetFlashdutyClientFn, t translations.TranslationHelperFunc) (tool mcp.Tool, handler server.ToolHandlerFunc)
UpdateIncidentRootCause creates a tool to update incident root cause
func UpdateIncidentSeverity ¶
func UpdateIncidentSeverity(getClient GetFlashdutyClientFn, t translations.TranslationHelperFunc) (tool mcp.Tool, handler server.ToolHandlerFunc)
UpdateIncidentSeverity creates a tool to update incident severity
func UpdateIncidentTitle ¶
func UpdateIncidentTitle(getClient GetFlashdutyClientFn, t translations.TranslationHelperFunc) (tool mcp.Tool, handler server.ToolHandlerFunc)
UpdateIncidentTitle creates a tool to update incident title
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client represents a Flashduty API client
func (*Client) SetUserAgent ¶
SetUserAgent sets the user agent for the client
type FlashdutyResponse ¶
type FlashdutyResponse struct {
Error *DutyError `json:"error,omitempty"`
Data interface{} `json:"data,omitempty"`
}
FlashdutyResponse represents the standard Flashduty API response structure
type GetFlashdutyClientFn ¶
GetFlashdutyClientFn is a function that returns a flashduty client
type MemberItem ¶
type MemberItem struct {
MemberID int `json:"member_id"`
MemberName string `json:"member_name"`
Phone string `json:"phone,omitempty"`
PhoneVerified bool `json:"phone_verified,omitempty"`
Email string `json:"email,omitempty"`
EmailVerified bool `json:"email_verified,omitempty"`
AccountRoleIDs []int `json:"account_role_ids,omitempty"`
TimeZone string `json:"time_zone,omitempty"`
Locale string `json:"locale,omitempty"`
Status string `json:"status"`
CreatedAt int64 `json:"created_at"`
UpdatedAt int64 `json:"updated_at"`
RefID string `json:"ref_id,omitempty"`
}
MemberItem represents a member item as defined in the OpenAPI spec
type MemberItemShort ¶
type MemberItemShort struct {
MemberID int `json:"MemberID"`
MemberName string `json:"MemberName"`
}
MemberItemShort represents a short member item for invite response
type MemberListResponse ¶
type MemberListResponse struct {
Error *DutyError `json:"error,omitempty"`
Data *struct {
P int `json:"p"`
Limit int `json:"limit"`
Total int `json:"total"`
Items []MemberItem `json:"items"`
} `json:"data,omitempty"`
}
MemberListResponse represents the response for member list API