github/github-mcp-server · error
invalid layout %q: must be \"table\", \"board\", or \"roadma
Error message
invalid layout %q: must be \"table\", \"board\", or \"roadmap\"
What it means
Error "invalid layout %q: must be \"table\", \"board\", or \"roadmap\"" thrown in github/github-mcp-server.
Source
Thrown at pkg/github/projects.go:1929
case githubv4.ProjectV2ViewLayoutBoardLayout:
return "board"
case githubv4.ProjectV2ViewLayoutRoadmapLayout:
return "roadmap"
default:
return strings.ToLower(strings.TrimSuffix(string(layout), "_LAYOUT"))
}
}
func parseProjectViewLayout(layout string) (githubv4.ProjectV2ViewLayout, error) {
switch strings.ToLower(strings.TrimSpace(layout)) {
case "table":
return githubv4.ProjectV2ViewLayoutTableLayout, nil
case "board":
return githubv4.ProjectV2ViewLayoutBoardLayout, nil
case "roadmap":
return githubv4.ProjectV2ViewLayoutRoadmapLayout, nil
default:
return "", fmt.Errorf("invalid layout %q: must be \"table\", \"board\", or \"roadmap\"", layout)
}
}
func listProjectViews(ctx context.Context, gqlClient *githubv4.Client, args map[string]any, owner, ownerType string) (*mcp.CallToolResult, bool, any, error) {
if ownerType != "user" && ownerType != "org" {
return utils.NewToolResultError(fmt.Sprintf("invalid owner_type %q: must be \"user\" or \"org\"", ownerType)), false, nil, nil
}
projectNumber, err := RequiredInt(args, "project_number")
if err != nil {
return utils.NewToolResultError(err.Error()), false, nil, nil
}
perPage, err := OptionalIntParamWithDefault(args, "per_page", MaxProjectsPerPage)
if err != nil {
return utils.NewToolResultError(err.Error()), false, nil, nil
}
if perPage < 1 || perPage > MaxProjectsPerPage {
perPage = MaxProjectsPerPageView on GitHub (pinned to 0ea1f775a7)
When it happens
Trigger: Thrown at pkg/github/projects.go:1929 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of github/github-mcp-server@0ea1f775a7 (2026-08-15).
Data as JSON: /api/errors/34bc6d2f191f0b10.
Report an issue: GitHub.