MCPcopy Index your code
hub / github.com/github/github-mcp-server / GranularSetIssueFields

Function GranularSetIssueFields

pkg/github/issues_granular.go:929–1200  ·  view source on GitHub ↗

GranularSetIssueFields creates a tool to set issue field values on an issue using GraphQL.

(t translations.TranslationHelperFunc)

Source from the content-addressed store, hash-verified

927
928// GranularSetIssueFields creates a tool to set issue field values on an issue using GraphQL.
929func GranularSetIssueFields(t translations.TranslationHelperFunc) inventory.ServerTool {
930 st := NewTool(
931 ToolsetMetadataIssues,
932 mcp.Tool{
933 Name: "set_issue_fields",
934 Description: t("TOOL_SET_ISSUE_FIELDS_DESCRIPTION", "Set issue field values for an issue. Fields are organization-level custom fields (text, number, date, or single select). Use this to create or update field values on an issue."),
935 Annotations: &mcp.ToolAnnotations{
936 Title: t("TOOL_SET_ISSUE_FIELDS_USER_TITLE", "Set Issue Fields"),
937 ReadOnlyHint: false,
938 DestructiveHint: jsonschema.Ptr(false),
939 OpenWorldHint: jsonschema.Ptr(true),
940 },
941 InputSchema: &jsonschema.Schema{
942 Type: "object",
943 Properties: map[string]*jsonschema.Schema{
944 "owner": {
945 Type: "string",
946 Description: "Repository owner (username or organization)",
947 },
948 "repo": {
949 Type: "string",
950 Description: "Repository name",
951 },
952 "issue_number": {
953 Type: "number",
954 Description: "The issue number to update",
955 Minimum: jsonschema.Ptr(1.0),
956 },
957 "fields": {
958 Type: "array",
959 Description: "Array of issue field values to set. Each element must have a 'field_id' (string, the GraphQL node ID of the field) and exactly one value field: 'text_value' for text fields, 'number_value' for number fields, 'date_value' (ISO 8601 date string) for date fields, or 'single_select_option_id' (the GraphQL node ID of the option) for single select fields. Set 'delete' to true to remove a field value.",
960 MinItems: jsonschema.Ptr(1),
961 Items: &jsonschema.Schema{
962 Type: "object",
963 Properties: map[string]*jsonschema.Schema{
964 "field_id": {
965 Type: "string",
966 Description: "The GraphQL node ID of the issue field",
967 },
968 "text_value": {
969 Type: "string",
970 Description: "The value to set for a text field",
971 },
972 "number_value": {
973 Type: "number",
974 Description: "The value to set for a number field",
975 },
976 "date_value": {
977 Type: "string",
978 Description: "The value to set for a date field (ISO 8601 date string)",
979 },
980 "single_select_option_id": {
981 Type: "string",
982 Description: "The GraphQL node ID of the option to set for a single select field",
983 },
984 "delete": {
985 Type: "boolean",
986 Description: "Set to true to delete this field value",

Callers 2

AllToolsFunction · 0.85

Calls 10

NewToolResultErrorFunction · 0.92
NewToolResultTextFunction · 0.92
NewToolFunction · 0.85
RequiredIntFunction · 0.85
normalizeConfidenceFunction · 0.85
fetchIssueIDsFunction · 0.85
GetGQLClientMethod · 0.65
ErrorMethod · 0.45
StringMethod · 0.45

Tested by 1