Skip to content
Prev Previous commit
fix: ensure proper return values in custom properties functions
  • Loading branch information
patrick-knight committed Aug 5, 2025
commit ee4166109bde8775e7d488911bafb67656e52000
6 changes: 3 additions & 3 deletions pkg/github/custom_properties.go
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ func GetRepositoryCustomProperties(getClient GetClientFn, t translations.Transla
return mcp.NewToolResultError(err.Error()), nil
}

return MarshalledTextResult(props)
return MarshalledTextResult(props), nil
}
}

Expand Down Expand Up @@ -124,7 +124,7 @@ func GetOrganizationCustomProperties(getClient GetClientFn, t translations.Trans
if err != nil {
return mcp.NewToolResultError(err.Error()), nil
}
return MarshalledTextResult("Organization custom properties for "+org, props)
return MarshalledTextResult(props), nil
}
}

Expand Down Expand Up @@ -191,7 +191,7 @@ func GetEnterpriseCustomProperties(getClient GetClientFn, t translations.Transla
if err != nil {
return mcp.NewToolResultError(err.Error()), nil
}
return MarshalledTextResult(props)
return MarshalledTextResult(props), nil
}
}

Expand Down
7 changes: 1 addition & 6 deletions pkg/github/tools.go
Original file line number Diff line number Diff line change
Expand Up @@ -62,12 +62,7 @@ func DefaultToolsetGroup(readOnly bool, getClient GetClientFn, getGQLClient GetG
AddWriteTools(func() server.ServerTool {
tool, handler := CreateOrUpdateRepositoryCustomProperties(getClient, t)
return toolsets.NewServerTool(tool, handler)
AddReadTools(
toolsets.NewServerTool(GetRepositoryCustomProperties(getClient, t)),
).
AddWriteTools(
toolsets.NewServerTool(CreateOrUpdateRepositoryCustomProperties(getClient, t)),
)
}())
Comment thread
patrick-knight marked this conversation as resolved.
issues := toolsets.NewToolset("issues", "GitHub Issues related tools").
AddReadTools(
toolsets.NewServerTool(GetIssue(getClient, t)),
Expand Down