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

Function uiGetIssueFields

pkg/github/ui_tools.go:381–398  ·  view source on GitHub ↗
(ctx context.Context, deps ToolDependencies, args map[string]any, owner string)

Source from the content-addressed store, hash-verified

379}
380
381func uiGetIssueFields(ctx context.Context, deps ToolDependencies, args map[string]any, owner string) (*mcp.CallToolResult, any, error) {
382 repo, err := RequiredParam[string](args, "repo")
383 if err != nil {
384 return utils.NewToolResultError(err.Error()), nil, nil
385 }
386
387 gqlClient, err := deps.GetGQLClient(ctx)
388 if err != nil {
389 return utils.NewToolResultErrorFromErr("failed to get GitHub GraphQL client", err), nil, nil
390 }
391
392 fields, err := fetchIssueFields(ctx, gqlClient, owner, repo)
393 if err != nil {
394 return ghErrors.NewGitHubGraphQLErrorResponse(ctx, "failed to list issue fields", err), nil, nil
395 }
396
397 return marshalUIGetIssueFields(fields)
398}
399
400func marshalUIGetIssueFields(fields []IssueField) (*mcp.CallToolResult, any, error) {
401 resultFields := make([]map[string]any, 0, len(fields))

Callers 1

UIGetFunction · 0.85

Calls 6

NewToolResultErrorFunction · 0.92
fetchIssueFieldsFunction · 0.85
marshalUIGetIssueFieldsFunction · 0.85
GetGQLClientMethod · 0.65
ErrorMethod · 0.45

Tested by

no test coverage detected