MCPcopy
hub / github.com/github/github-mcp-server / IssueWrite

Function IssueWrite

pkg/github/issues.go:1895–2156  ·  view source on GitHub ↗

IssueWrite is the FeatureFlagIssueFields-enabled variant of issue_write (with the issue_fields parameter). LegacyIssueWrite is served when the flag is off. Both register under the tool name "issue_write"; exactly one is active at a time via mutually exclusive feature-flag annotations. When the flag

(t translations.TranslationHelperFunc)

Source from the content-addressed store, hash-verified

1893// flag is removed, delete LegacyIssueWrite outright and drop the feature-flag
1894// fields on IssueWrite.
1895func IssueWrite(t translations.TranslationHelperFunc) inventory.ServerTool {
1896 st := NewTool(
1897 ToolsetMetadataIssues,
1898 mcp.Tool{
1899 Name: "issue_write",
1900 Description: t("TOOL_ISSUE_WRITE_DESCRIPTION", "Create a new or update an existing issue in a GitHub repository."),
1901 Annotations: &mcp.ToolAnnotations{
1902 Title: t("TOOL_ISSUE_WRITE_USER_TITLE", "Create or update issue/pull request"),
1903 ReadOnlyHint: false,
1904 },
1905 Meta: mcp.Meta{
1906 "ui": map[string]any{
1907 "resourceUri": IssueWriteUIResourceURI,
1908 "visibility": []string{"model", "app"},
1909 },
1910 },
1911 InputSchema: &jsonschema.Schema{
1912 Type: "object",
1913 Properties: map[string]*jsonschema.Schema{
1914 "method": {
1915 Type: "string",
1916 Description: `Write operation to perform on a single issue.
1917Options are:
1918- 'create' - creates a new issue.
1919- 'update' - updates an existing issue.
1920`,
1921 Enum: []any{"create", "update"},
1922 },
1923 "owner": {
1924 Type: "string",
1925 Description: "Repository owner",
1926 },
1927 "repo": {
1928 Type: "string",
1929 Description: "Repository name",
1930 },
1931 "issue_number": {
1932 Type: "number",
1933 Description: "Issue number to update",
1934 },
1935 "title": {
1936 Type: "string",
1937 Description: "Issue title",
1938 },
1939 "body": {
1940 Type: "string",
1941 Description: "Issue body content",
1942 },
1943 "assignees": {
1944 Type: "array",
1945 Description: "Usernames to assign to this issue",
1946 Items: &jsonschema.Schema{
1947 Type: "string",
1948 },
1949 },
1950 "labels": {
1951 Type: "array",
1952 Description: "Labels to apply to this issue",

Callers 6

AllToolsFunction · 0.85
Test_CreateIssueFunction · 0.85
Test_UpdateIssueFunction · 0.85

Calls 15

NewToolResultErrorFunction · 0.92
NewToolFunction · 0.85
shouldDeferToFormFunction · 0.85
RequiredIntFunction · 0.85
OptionalStringArrayParamFunction · 0.85
OptionalIntParamFunction · 0.85
optionalIssueWriteFieldsFunction · 0.85
CreateIssueFunction · 0.85
UpdateIssueFunction · 0.85